There are many different commands you can enter to configure and interact
with linux.
These commands can be entered at the shell prompt, or command (line) prompt.
If you use linux with a GUI, look for the shell program icon. If you have
no GUI installed you should be looking at the prompt, and if you log in
remotely you will be at the prompt.
There are two types of commands, shell commands and linux commands.
Shell commands are part of the shell program. There are several different shells (C shell, bash shell, bourne shell etc) to choose from, and each will have a variation of the shell commands built in. The commands vary between shells, but each shell is the same across different linux distros.
Linux commands are not part of the shell. Each one is a seperate executable
program, probably written in the C programming language.
These executables are stored in various directories set up for binary
files, such as /bin and /usr/bin. The location of these directories can
be defined with the $PATH variable so the shells know where to find them.
These commands vary between different linux distrubutions, and remain
the same whichever shell you are using.
What your prompt looks like will depend on the shell you use (bash, borne,
csh etc), and the settings you have for that shell.
I use a bash shell, and have the prompt set up to look like this......
This shows me I am logged in as root, to the computer called James-Laptop,
and I am in a folder called home.
TIP: To see the full path of the folder 'home', use the pwd
command.
Your prompt is bound to look different, so for the purpose of this section I will just use the > to represent the prompt.
Some linux commands are very simple and need nothing more than the command itself.
For example the command ls (list) will simply list the names of the directories and files in the current directory...
In this instance ls shows there are two directories, called files and images, and a text file called index.
However you can often add options or parameters, which are usually added to the command after a '-'.
Adding the option -l will give you a long listing which includes the permissions, ownership, size, date/time, and name of the files and directories...
Another example would be adding -a (ls -a) to list ALL the files in the current directory, including hidden files.
This shows there is a hidden file (hidden files have a '.' before the filename) called '.hiddenfile', as well as the two directories and index file.
You can use more than one option at a time...
ls -l
would produce a long listing format of ALL (including hidden) directories and files in the current working directory.
There are many options for some linux commands, and the best place to find out about then all is the 'man' pages. These man pages show you how to format the command, and what options and parameters there are to use with each command.