View Single Post
Old 24. May 2009, 02:38 AM   #1 (permalink)
debtboy
Senior Member
 
debtboy's Avatar
 
Join Date: May 2009
Location: ~/
Posts: 128
Default Linux command line intro

OK, here goes...
No matter what distro your using, you will have the ability to open a shell terminal or console
(may have different names such as Term, Xtrem, ETerm, Console, Konsole, etc...)
I believe every distro will open to a BASH Shell (Born Again SHell), next generation of the old Bourne Shell.
Open the shell terminal/console and you should see your login name "@" the computer or domain name.
This is what mine looks like:
Sorry, while posting here, I can only use 4 images, so to see the image, use this link:
http://home.comcast.net/~linuxboy/console1.jpg

This is where the real power of Linux comes from, but for this intro we will discuss only 2 or 3 basic commands.
The first command we will try is ls, this command stands for listing, similar to the old DOS dir command.
It gives us a listing of file/directory names but nothing else.
What we want is a long listing with owner, group, size, etc...
so we add the -l switch. see image:


How are we supposed to remember what "switch" to use like -l,
well there are thousands of commands and most have many switch options,
so a built-in manual was included in every Unix and Linux.
It's called man pages (sorry ladies Ha! Ha! Ha!) you type man and then the command your inquiring about.
For example, in our situation, we would type man ls see image:


I've already scrolled down to the area I'm interested in, to scroll down you can use the enter key (line by line) or spacebar (page down) see image:


NOTE: now to make matters worse, after you scroll or page to the bottom, you can't get out... WTH!!
enter the letter q which stands for quit. (you will get used to it)

When we use the ls -l command we see a full listing which includes the owner, the group and access permissions
(we'll worry about this later, in another post).

Now lets do a listing ls and then cd (change directory) into one of the directories available.
Once you've gone into the directory, do a long listing of the files within.
see image:


Two more commands you can try is clear
this command will clear the terminal window and
exit this command will exit the terminal.

ls
ls -l
man
cd
clear
exit

Last edited by debtboy; 24. May 2009 at 03:04 AM.
debtboy is offline   Reply With Quote