Reliable Technicians





Getting to know your Linux operating system can take some time. If everything is setup for you, using your graphical user interface is probably not any harder then navigating through windows. However, you can't really say that you know what your doing, until you figure out the directory structure and command line interface. There are multiple command line interfaces available for Unix and Linux operating systems. Most of us these days are using BASH. It is fairly easy to use and a lot more powerful then CMD in windows.

What is Bash exactly? Bash is a program that allows you to interface with all the cool tools and programs installed on your system. Linux will have 7 versions of it self running by default. To access one hold CTRL, and ALT. While you are holding the keys, press F2. This will bring you to a log on for a Bash console. If you have a GUI installed and running, such as Xterm, Gnome, KDE pressing CTRL, ALT and F7 will bring you back to your colorful mouse based software. But, thats not why your reading this document.

So your at a log on prompt. Hopefully you know your log on. If you are playing with a Linux machine for the first time, and do not want to destroy it do not log on as root. So lets get to it. Remember and memorize commands such as ls, cd, rm, rmdir, >, |, tar, gunzip, more, less, and your currently installed command line text editor. Most likely VI or Nano.

LS is probably going to be the most commonly used. Type LS and hit enter. It will display your current directory and its contents. In a lot of cases directories will be listed first and in a different color, followed by files. Next, CD this is the command to change directories. So I'm sure that this command will also be used very commonly. Now your starting to get somewhere. You can move around and see whats there.

Lets talk for a moment about the common directory structure of a Linux/Unix based machine. You may have already heard this and it is true. Anything and everything can be customized on a open source machine. This includes the directory structure. Most of the time things are organized the same. However, it does not have to be. So I guess your probably already getting impatient and want the entire world at your finger tips. Of course, it's not a good idea to jump ahead of yourself, but if you want to be dangerous. Every command that you have and can type at the prompt are all most likely files located in one of these directories, /bin /usr/bin /sbin /usr/sbin . Bin being the common tools and Sbin being the administrative or system stuff. So wait, I typed ls /usr/bin and there was so much it scrolled off the screen. How am I supposed to find what I'm looking for? Well, if your like me, there is a good chance thats what your thinking at the moment. Hold that thought until the next section. Let me tell you where everything is, well at least, in most cases. /usr this is the place where home directories downloads and common data is stored. /var is the location where log files are stored. /etc is the location where configuration files are stored or in other words text files that allow you to change settings in your software programs. /dev can be thought of like the device manager. It is usually the logical path to your hardware devices. That is created so it can be easily referenced. Not really the same, but think device manager in windows.

So lets talk about a great program that is most likely installed on your machine. The simple program is, "more." Both, "more," and, "less," are CLI based text programs. They allow your output or stuff your seeing on the screen to be paused or viewed with more options. Alone they are helpful. Although, you really got to understand some of the simple stuff that you have to your disposal. So what is this greater then symbol for? Think of it as to put something through. This example, is not a very intelligent command. However, lets get a idea of what it is doing. ls > test.txt . It just comes up with a new prompt. Although this is generic and does not include any variables. What you just did is take a list of the directories and files in your current location and put it in a file called test.txt . You can now open the file and view it, print it, ext.. Now there is the | . This is called pipe. I like to think of this command as, "and." Lets just jump into it and I'm sure you'll understand better. Try ls /usr/bin | more . Now you can see a section of the directory and hit space or any key to continue. Odds are, this is enough to find what you are looking for.

Your on the way to teaching yourself and becoming a expert. However, you still have to master either Nano or VI . These are command line text program that will allow you to manipulate text. Tar is a program that allows you to create archives. Such as take a bunch of files, archive them so that they are all one file. In a lot of cases you may also be using it the other way around. Extract all files from a tar archive. Gunzip is the most common default application that allows you to compress and/or uncompress files on your box.

Finally rm and rmdir . Delete file and delete directory. Take your time, don't mess with them until you know what your doing and/or need to delete something.