You are on page 1of 4

LIST OF AVAILABLE COMMANDS IN THE TERMINAL

INTRODUCTION
In order to rise our knowledge level, of the Linux commands, we might need to learn
about Terminal at some point. Well, some people will never learn much of it any way, and
for others who would there it goes.
Some of the basic commands are:
cd,
ls,
mkdir,
mv,
cp,
rm,
ln,
etc...
Let's assume that you have figure out this commands, therefore you might be on the right
path. Then you just might need to figure out some more of them.
After some time, you might learn how to create alias for the commands and that could be a
very interesting, because you would be able to make your own commands that you find
more logical.
So, commands like lho short form of list the hidden ones would be possible.
Now, if you have seen some movies and at some point they have used the commands that
you was not able to apply on your computer, then it is about time that you make you self
few of those kind and incorporate them into Linux.
Then, you would learn the most important command man, which is short of manuals, I
guess.
Next step, is to learn more about those commands with man, and that would be it, ah yes
there is learn also, and some other ways.
You might purchase some nice book or few of them, get you self few manuals from the
Internet and do some more research and then you would ask you self one simple question
at that point.
Well, I have ask it my self, however that doesn't mean that you would ask you self the
same thing for sure, but I guess, you just might.
So, you could need the list of commands from your Linux. First thing that could be good
enough is already available on the Internet, then you would download it and it just could be
a different version that has some differences and you might not be happy and that just

could rise your level of stress.


Now, it is the moment when you need to figure out that Linux provides good forms of
expression and that you have many ways to complete this task.
Therefore, I will try to help you to do something about it.
MAIN
First time I looked for it, I have found some list of commands, that was on the Internet
with key word 'A-Z index of Bash command line for Linux.
And as You might guess, it had no explanation how to actually get it, or how we would
write the command or few of them to get the list of available commands on your Linux,
which might be different from what I have.
I guess, there are more than one way to achieve that task, and that diversity is what make
me happy, you would be able to express you self in more than one way. In this situation
the expression is carried by sending those commands to the shell and manipulating those
text files you have created.
In order to understand how that task is achieved, we would need to know some of the stuff
from Linux.
One of the first things that should be learned is that commands that would be executed,
could be found in this folders:
/bin,
/usr/bin.
Those two folders are very important for users and administrators as well.
Why?
Because, you have your programs in there, and when you type the command into the
terminal that is where they wait to be called.
Then bin would probably be short of binary which explains what is it for, there we store
our binary programs, those already mentioned, or few scripts.
Now there might be sbin, which is like system + bin, so you might need to start them as
administrator.
The second folder /usr/bin has users files, and it could be place where we have some of the
programs. As a very important fact, we would need to say that Linux does not try to hide
the things, well if it has dot in front of it it just means that is not visible.
Now, you might find /usr/temp folder as well, and that is the place where administrator
might install some of its programs.

So, what do we do with that knowledge?


Combine ls with few other ones, export it into textual file and then manipulate with some
text editor.
After that, you might save it as a file or print it or even make picture of it and frame it on
to your wall. This last option might sound funny, but I could tell you that it might be the
best option.
So, how do we actually do this?
One of possible ways is this.
First thing we need to do is to list all commands in our /usr folder. For that we could use ls
command which will list all available programs in our folder.
In order to get few more infos you might need switch -l, or you could found some other
combinations more suitable.
Let's say that we would like it like this
>ls /bin > ls_bin.txt
Now, we have listed the content of bin folder, and redirect it into ls_bin.txt file.
I would recommend you to use ls_bin in order to know what file is for.
However, that .txt is something that some users might find as a reason to annoy them, so if
you are like those users, you might just omit it any way.
Next thing that you might list is our /usr/bin folder
Now, it is pretty obvious what you would do, type this command
>ls /bin > ls_usr_bin.txt
However, if you would prefer it in just one file, you could do something like this
>ls /bin /usr/bin > list_commands.txt
Next thing I did was to remove /bin and /usr/bin with some text editor. That, might not be
worth mentioning any way for more experienced user, however you might try some other
more automated approaches, any way. You know head and tail and wc.
Now, we would need to sort it like this
>ls /bin /usr/bin | sort > list_commands.txt
Now we use | to connect more programs and > is used to redirect it into our file.

There might be few same names, and in order to omit them, there is uniq.
Now, you might type something like this
>uniq list_commands.txt > list_commands
And there you are.
You have a list of your commands!
CONCLUSION
I don't know should I say that you could use pr and lpr, or that you could do it from some
editor that will allow you to do it.

You might also like