Difference between revisions of "AMuleCMD"

From AMule Project FAQ
Jump to: navigation, search
(reorg, expand)
Line 1: Line 1:
Basically, aMuleCMD is a command line interface to access [[aMule]] or [[aMuled]] locally or remote. To run AMuleCMD simply type the command name at a command prompt. Note it's all lower case.
+
'''AMuleCMD''' is a command-line utility that allows you to control [[aMule]] or [[aMuled]] either locally or remotely. The character-oriented interface offers a subset of aMule functionality, including searching for files, initializing downloads, and viewing your download queue. It also displays status information and allows you to change certain options.
:$>amulecmd
+
(This is based on [[linux.definition|Linux]]. You may need to go to the actual directory on other OS's if it's not in the path.)
+
  
According to the amulecmd help you can perform the following commands:
+
To run aMuleCMD, type "amulecmd" on the command line. The program will start up and display the "aMulecmd$" prompt. The following commands are available:
  
 
*Available
 
*Available
Line 23: Line 21:
 
*Status
 
*Status
  
For full instructions on how to use each command run amulecmd and type 'help <command>'.
+
For full instructions on how to use each command type 'help <command>' from within AmuleCMD.
  
You can use this command to perform scheduled jobs with aMule(d), too. See [[FAQ_amulecmd]] for more details.<br>
+
In addition to running these commands from within aMuleCMD, you can also run them on the shell command line with the "-c" flag, like this:
If you prefer something more graphical use [[AMuleGUI]] (or [[aMule]] of course ;-).
+
  
'''NOTE:''' You must have [[External Connections]] enabled in order to be able to connect to aMule(d).
+
:$amulecmd -c [command]
  
I needed to set "use [http://www.networksorcery.com/enp/protocol/tcp.htm TCP] ports instead of [http://www.unix.org Unix] local sockets" to be on, in Preferences -> Remote Connection -> External Connection Parameters.
+
This enables you to call aMuleCMD from other scripts or from cron. See
 +
[[FAQ amulecmd]] for more details on how to do this.
 +
 
 +
== Installing aMuleCMD ==
 +
 
 +
Many of not most distros have an aMule package in their repositories. If you install aMule by means of RPM, DEB, or other package management system, aMuleCMD will be included in the installation.
 +
 
 +
This is the easiest and preferred method of installing aMule and aMuleCMD.
 +
 
 +
== Compiling aMuleCMD ==
 +
 
 +
If you have not installed aMule by means of a package, you will need to compile it from source.
 +
 
 +
aMuleCMD is not compiled separately; it is compiled at the same time you compile aMule by using the --enable-amulecmd flag when you run configure. (See the Main Page for links to pages on compiling aMule for various operating systems).
 +
 
 +
== Configuring aMuleCMD ==
 +
 
 +
To use aMuleCMD, you first need to set several opions in aMule's Preferences notebook. On the "Remote Controls" page, you will need to:
 +
 
 +
* Enable "Accept External Connections".
 +
* Enter a password for External Connections.
 +
 
 +
You can also modifiy the default aMuleCMD port (4711) and External Connections port (4712) here as well, but if you do so, you will need to restart aMule for the changes to take effect.
 +
 
 +
(If you are running aMuled and don't want to use aMule to configure aMuleCMD, you can also edit "[ExternalConnect]" section of [[amule.conf file |amule.conf]]; see the instructions on the [[AMuleWeb]] page.)
 +
 
 +
Next, you need to do is generate [[remote.conf]], the file where aMuleCMD stores its configuration information. (It can be found in the .aMule directory.) Among other things, this file contains the port number which aMule uses for External Connections as well as the password needed to access aMule. 
 +
 
 +
To create a ''remote.conf'' file, enter at the command line:
 +
 
 +
:amulecmd --create-config-from=/home/username/.aMule/amule.conf
 +
 
 +
were "username" is your user name.
 +
 
 +
aMuleCMD will read the necessary configuration information from amule.conf and generate a ''remote.conf'' file.
 +
 
 +
To do this on a remote system, enter this:
 +
 
 +
:amulecmd -h hostname -p ECport -P ECpassword -w
 +
 
 +
'''Tip''' You can also simply copy ''remote.conf'' from the host system to the the remote computer, changing the hostname line accordingly.

Revision as of 19:43, 19 December 2006

AMuleCMD is a command-line utility that allows you to control aMule or aMuled either locally or remotely. The character-oriented interface offers a subset of aMule functionality, including searching for files, initializing downloads, and viewing your download queue. It also displays status information and allows you to change certain options.

To run aMuleCMD, type "amulecmd" on the command line. The program will start up and display the "aMulecmd$" prompt. The following commands are available:

  • Available
  • Add
  • Cancel
  • Connect
  • Disconnect
  • Exit
  • Get
  • Help
  • Pause
  • Quit
  • Reload
  • Resume
  • Set
  • Show
  • Shutdown
  • Statistics
  • Status

For full instructions on how to use each command type 'help <command>' from within AmuleCMD.

In addition to running these commands from within aMuleCMD, you can also run them on the shell command line with the "-c" flag, like this:

$amulecmd -c [command]

This enables you to call aMuleCMD from other scripts or from cron. See FAQ amulecmd for more details on how to do this.

Installing aMuleCMD

Many of not most distros have an aMule package in their repositories. If you install aMule by means of RPM, DEB, or other package management system, aMuleCMD will be included in the installation.

This is the easiest and preferred method of installing aMule and aMuleCMD.

Compiling aMuleCMD

If you have not installed aMule by means of a package, you will need to compile it from source.

aMuleCMD is not compiled separately; it is compiled at the same time you compile aMule by using the --enable-amulecmd flag when you run configure. (See the Main Page for links to pages on compiling aMule for various operating systems).

Configuring aMuleCMD

To use aMuleCMD, you first need to set several opions in aMule's Preferences notebook. On the "Remote Controls" page, you will need to:

  • Enable "Accept External Connections".
  • Enter a password for External Connections.

You can also modifiy the default aMuleCMD port (4711) and External Connections port (4712) here as well, but if you do so, you will need to restart aMule for the changes to take effect.

(If you are running aMuled and don't want to use aMule to configure aMuleCMD, you can also edit "[ExternalConnect]" section of amule.conf; see the instructions on the AMuleWeb page.)

Next, you need to do is generate remote.conf, the file where aMuleCMD stores its configuration information. (It can be found in the .aMule directory.) Among other things, this file contains the port number which aMule uses for External Connections as well as the password needed to access aMule.

To create a remote.conf file, enter at the command line:

amulecmd --create-config-from=/home/username/.aMule/amule.conf

were "username" is your user name.

aMuleCMD will read the necessary configuration information from amule.conf and generate a remote.conf file.

To do this on a remote system, enter this:

amulecmd -h hostname -p ECport -P ECpassword -w

Tip You can also simply copy remote.conf from the host system to the the remote computer, changing the hostname line accordingly.