Using your Shell
There are two programs you need in order to use your shell account - a telnet client and a FTP client. Telnet is used for performing commands on the shell, while FTP is used for transferring files between the shell and your computer. FileZilla is a popular, free FTP client. One freely available telnet program is PuTTYtel. Windows has a built-in telnet program, but it's quite crude.
Many shells support a secure telnet protocol called SSH (Secure SHell protocol). This works in basically the same way as telnet, but everything is encrypted for better security. If your shell supports SSH, it's a good idea to use that instead of regular telnet. However, you need a client that supports SSH, such as PuTTY.
When your shell account is activated, you should receive information which includes the hostname of the shell, and hostname of the FTP server (although the FTP server often has the same hostname as the shell). The first thing you'll want to do is telnet to the shell. Load up your telnet or SSH client, and enter the address of the shell (e.g. shell1.niceshells.net). You will be prompted for your username/password. After that, a motd will usually be displayed, and then you'll be staring at something that looks (and works) very similarly to a command prompt.
Shell Commands
First up, you need to familiarise yourself with a few shell commands. Listed below are some of the commands you'll need to know to perform basic operations on the shell.
Working with files and directories
cd <directory> - Changes to the specified directory, similar to DOS's cd command. To switch to the directory above the current one, specify two periods as the directory, i.e. cd ... Typing cd ~ will return you to your home directory (the tilde is shorthand for the path your home directory, e.g. /home2/user/cooldude).
ls - This is very similar to the DOS dir command. It lists the contents of the current directory. For a more detailed listing, type ls -al.
mv <oldfile> <newfile> - Renames a file or directory. You can also move a file with this command. For example, mv chatty.tcl scripts/chatty.tcl with move chatty.tcl to the scripts directory (relative to the current directory).
pwd - Shows the current working directory path, e.g. /home2/user/cooldude/mybot.
rm <file> - Deletes a file. To delete a directory and all its contents (including subdirectories), use rm -rf <directory>.
Extracting archives
bzip2 -d <file> - Extracts the contents of a bz2 file (similar to gz files but with superior compression), e.g. bzip2 -d nice.tcl.gz.
gunzip <file> - Extracts the contents of a gz file (which are similar to zip files), e.g. gunzip nice.tcl.gz.
tar -xf <file> - Used to extract a tar file. To extract a tar.gz or .tgz file, use tar -zxf <file> (if that doesn't work, use gunzip <file> then tar -xf <file>). To extract a tar.bz2 file, use tar -jxf <file> (if that doesn't work, use bzip2 -d <file> then tar -xf <file>).
Other commands
kill -9 <pid> - Kills the process with the specified pid number. You can get the pid number of a process by using the ps x command described below. This command is useful for killing your Eggdrop if you're unable to shut it down by other means.
passwd - Allows you to change your shell account password (it will prompt for your old password, then ask you to enter a new one).
pico -w <file> - Opens the specified file in the pico text editor. The -w option prevents Tcl scripts from being messed up due to line wrapping.
ps x - Shows all current 'processes' you have running on the shell. This includes things such as Eggdrop, IRC bouncers, and open telnet and FTP sessions. This command is useful for getting the pid (process ID) number of a process. To view the resource usage of your processes, type ps ux.
The above commands are basically all you need to know in order to setup and run an Eggdrop. You may wish to learn some more commands as you become more experienced using the shell. Some other useful and interesting commands are shown below.
netstat - Displays all connections going to and from the server.
ps aux - Displays all processes running on the system and their resource usage.
quota - Shows how much disk space is allocated to you, and may show much you're using (if not, try du -s).
top - Displays details about system resource usage.
uptime - Displays the current uptime and server load.
vhosts - This will display a list of vhosts available for you to use (note that not all shells have this command).
Using FTP on the Shell
One of the most common uses for shell accounts is to download files from a server to the shell via FTP (note that this is different from transferring files between your machine and the shell via FTP). To do this, you connect to your shell account via telnet or SSH, and use the shell's FTP client. This works similarly to downloading files to your computer, but instead the file downloads to your space on the shell, and you can later download the file from the shell to your computer if needed. A fast shell is capable of downloading files at a much faster rate than a typical dial-up connection.
To download a file, type ftp at the shell prompt. You will then be greeted with the ftp prompt. Below is a list of the basic commands you need to use at the ftp prompt to download a file to your shell (shown in the order one would typically use them).
open <server> - Connects to the specified FTP server. If the connection is successful, you'll be prompted to enter a login name and password (for most servers, type anonymous as login, and [email protected] as your password).
ls - Lists the contents of the current directory on the FTP server.
cd <directory> - Changes to the specified directory on the FTP server. To switch to the directory above the current one, specify two periods as the directory, i.e. cd ...
bin - Switches to binary mode. You need to use this command before you download any files.
hash - Enables the display of hash marks while downloading a file. Useful for monitoring download progress.
prompt - Disables prompting between gets if getting multiple files using mget (below).
get <file> - Downloads the specified file to your shell.
mget <file1 file2 fileN> - Downloads all specified files, one after the other. This command supports wildcards, e.g. mget egg* will download all files in the current directory on the FTP server with names starting with 'egg'.
close - Disconnects from the FTP server.
quit - Quits you from the ftp program.
As a final note, make sure you don't give out your shell password to anyone! Giving others access to your shell is asking for trouble. If you really want to give someone else access to your shell, make sure it's someone you trust and have known for a while.