A common misconception is that things like
adduser are different from things you install in your system (e.g.
They are not.
All of them are programs. Some already come installed, and others you have to install yourself.
You can find out where a program executable lives using the
$ which mkdir /bin/cd
$ which which /usr/bin/which
However, there are some built-in commands in the Bourne Again SHell (BASH). They are not very many:
- and a few others
If you try executing
which cd, chances are it will not be found, because it is using the built-in command, as opposed to a program.
Some built-in commands, such as
kill, are sometimes overwritten by the distribution.
It is important that you know which commands are available to you. Some consoles may not use BASH, and so the
cd command might not be available. An example of this is the Windows console, which uses
Most Linux distributions use BASH, so you won’t have a problem with that.
Most Linux distributions come with a very handy program called
man. You can use this program to get the help pages of many other programs.
For example, execute the following command:
You can even get the help pages on BASH built-in commands:
It was a short blog post today, but the key thing to remember is that the commands you are executing in your console are really programs which have been installed in your system. They can be un-installed, they can be overwritten, or they can just not be there yet.
You can install programs such as
man and other programs that you might expect to already be there. We'll get to package managers in the next post!