Last update: 22-Oct-2001
Some warnings...
This is not a page to learn even half about linux. This is a page to learn about learning about linux.
Here I introduce some simple commands that, if you know something about dos (at leat looked at dos), you will understand at least the basis.
cd
Change Directory... If you know dos, you'll know what this is all about...
ls
If you know dos, this is the dir command. With this, you can LiSt the directory contents.
mkdir
MaKe DIRectory. I don't think you need much more explanations...
rm
ReMove file. Comand to remove a file, either a normal file or a directory.Be VERY CAREFULL!!!!! Unlike dos, there is no undelete. THERE IS NO UNDELETE!!!
rmdir
ReMove DIRectory. Read also 'rm' command. THERE IS NO UNDELETE!!!
alias
Let's say you type 'alias l=ls'. Everytime you type 'l', the command ls is executed. It's usefull to save time and bytes when you write commands.
chmod
Every file has list of atributes. The most used and changed are read (r), write (w) and execute (x), where it can be applyed to the owner (u), the group (g) or to other users (o). The mode string is like <u><g><o>. Each one of the tree can be coded in a bitmask containing the information for each user(s). A mode with read and execute permitions is like r-x. It can be transformed in an octal mode of 4+0+1 or 5.
Let's say that I want to make a file to have permitions for the owner to read, write and execute. The owner group to have read and execute and the other users not have permitions to nothing. The bitmask is something like 111101000, or rwxr-x---. In octal mode is like 750.
To use the chmod, type 'chmod <octal-mode> <file>. More information in 'man chmod'.
jobs
Here I'll let you know something about job control. When you login in a linux box, normaly you login in a shell. More usual is it to be a bash (bourn again shell) shell. A bash acepts job control. Other shells acept it too, but I'll introduce bash job control here.
When you are in a shell you can only run a program at a time. Not true. You can run several programs at a time, in the same shell. You can run programs in foreground and in background. When you type 'jobs' the list of background jobs is listed. If you type 'jobs' now, you'll get nothing. That's because there is nothing running in the shell you ran 'jobs'.
To put a job running in background, put the ampersand sign at the end of the line. Try 'sleep 5 &' and then 'jobs'. The shell is going to tell you the jobs and their state.
If you already ran a program that is in foreground and you want to put it in background, you can pause it and continue it in background. To pause the program try Ctrl-z and the shell is gives you the job number (not the pid!, the job number). Next, try bg (as in BackGround) and the number of the job, like 'bg 1' or 'bg 2'. If you run 'jobs' now, there is a list of the jobs for the shell and the state of that jobs.
I strongly advise you to read the man pages for this command, as you will find a lot more information and explanations abouts this. Try 'info bash' or 'man bash'. If you are running another shell, try to look at the man page of that shell.
man
With this command, you can view the man page for a command. If you type 'man ls' you'll get the manual pages for the command ls. If you type 'man man' you'll find the manual for man it self.
info
Quite similar with the command man, wend you type 'info bash' you'll find a diferent type of manual. You'll find a formated page with nodes (some kind of links) with a diferent organizated information. Try 'info info'. I preffer info because it can easily relate a command