Suso Logo suso
Support Site
main site     webmail    

A shell is a powerful interface to your Suso account. It allows you to interact with files and run powerful programs and operations on them. On Suso, it is possible to solely use the shell to interact with your website and email.

What is a shell?

A shell in the world of computers refers to a program that allows the user to interact with the computer through some kind of interface. Usually it deals with files and programs, but some of the more sophisticated shells allow you to do complex program-like operations. Shells can be graphical or text, although most people think of shells today as that "text interface". You don't have to be scared of it, there are only a few commands you need to know. Many people find using the shell more comfortable, faster and more powerful.

In the Linux operating system(which is what Suso uses) and other unix like operating systems, a shell refers to a program that you use when you remotely login to a machine using software like SSH. It allows you navigate directories, see lists of files and edit them using programs like 'cd', 'ls' and 'nano'.

The default shell used in Linux is called the 'bash' shell. BASH stands for Bourne Again SHell. Its name comes from the creator's name, Stephen Bourne. It was a recreation (or rebirth) of the original command shell for the Unix operating system by AT&T, which was just called 'sh'.

What can I do in it?

You are only limited by your imagination. Generally, you are only limited by the command line programs that are available to you. You might do something as simple as list the files in your home directory so that you can see when they were last modified, who owns them and what permissions they have:

ls -l ~/

Or you could do something complex like count the number of unique visitors that have come to your website so far this month:

cat ~/logs/www.yourdomain.com-access_log | awk {'print $1'} | sort | uniq | wc -l

All that might seem very confusing until you realize what the | character does. The | symbol (called a pipe or vertical bar) is a way of sending the output of one command to the input of another. Kinda like a production line in a factory. To type the | symbol, you usually have to use the shift key and press the key with that symbol (its usually close to the enter key). So you can see that the output of the cat command is used as the input for awk, which becomes in the input for sort, then uniq, then wc. Also, the tilde character '~' means the current user's home directory. So ~/logs/www.youdomain.com-access_log refers to /home/username/logs/www.yourdomain.com-access_log.

Here is a description of each part of the pipe line:

  • cat ~/logs/www.yourdomain.com-access_log - cat is a program that reads a file and sends it to the screen. In this case it is sending the contents of the file /home/username/www/www.yourdomain.com-access_log to standard output, which is a pipe in this example.
  • awk {'print $1'} - awk is a program that is actually a sophisticated substitution language. It can automatically detect where columns of text are in output and in this case it prints the first column of text and truncates the rest. The first column of text in the standard Apache log format is that of the DNS reverse hostname of the remote host that makes a request to your website.
  • sort - sort does just that, it sorts output alphabetically or numerically.
  • uniq - Also a descriptive command name, uniq removes repetitions of lines so that there is only one line per instance.
  • wc -l - wc stands for word count. It is a simple program that can count the number of characters, words and lines in a file or output. In this case we use the -l option to tell it to only print the count of the number of lines in the output and thus our answer.

This is the language of the unix command line or shell. As you can see, if you know it, it is possible to communicate with your data.

External links