Linux was started as a learning project by a computer science student,at the Univeristy of Helsinki, Finland, named Linus Torvalds (hence thename Linux). There were two reasons why Linus created Linux. First, hewanted to learn more about the microprocessor he was studying at the time-- and what better way to learn than by creating an operating system totalk to it? Morever, the second reason was that a failing version of Unix,Minix, didn't have the functionality nor features that Linus wanted. Topurchase it would cost way too much for a starving student, so he startedlinux! [TRANSLATION: Linus wanted to bring Unix to the desktop]
He began the Linux experiment nearly a decade ago and has since graduated,but Linus Torvalds is still in charge of the Linux core today, though manycompanies now exist to help promote and distribute the Linux operatingsystem. Millions of computer science students worldwide use Linux dailyfor their calculations and studies, and many of them, as well as many otherpeople, help Linus to maintain Linux, release new versions, and keep itall working well [TRANSLATION: Many people actually code different partsof the OS themselves and send it in for review, if it passes approval thenit is entered into the next kernel revision.]. Linux is a completely freereimplementation of the POSIX specification, with SYSV and BSD extensions(which means it looks like Unix, but does not come from the same sourcecode base) [TRANSLATION: Linux is a free operating system that mimics theUnix operating system and has similar features and functions], which isavailable in both source code and binary form [TRANSLATION: source codeneeds to be compiled and binary code can be untarred]. Its copyright isowned by Linus Torvalds and other contributors, and is freely redistributableunder the terms of the GNU General Public License (GPL). A copy of theGPL is included with the Linux source; you can also get a copy from ftp://prep.ai.mit.edu/pub/gnu/COPYING.Linux, per se, is only the kernel of the operating system, the part thatcontrols hardware, manages files, separates processes, and so forth. Thereare several combinations of Linux with sets of utilities and applicationsto form a complete operating system. Each of these combinations is calleda distribution of Linux [TRANSLATION: ie: Redhat, Debian, Mandrake, SUSE,Caldera, etc.]. The word Linux, though it in its strictest form refersspecifically to the kernel, is also widely and correctly to refer to anentire operating system built around the Linux kernel [TRANSLATION: thecode that makes the OS work.]. For a list and brief discription of variousdistributions, see http://sunsite.unc.edu/LDP/HOWTO/Distribution-HOWTO.htmlNone of these distributions is ''the official Linux''. Linux is not publicdomain, nor is it `shareware'. It is `free' software, commonly called freewareor Open Source Software[tm] (see http://www.opensource.org/),and you may give away or sell copies, but you must include the source codeor make it available in the same way as any binaries you give or sell.If you distribute any modifications, you are legally bound to distributethe source for those modifications [TRANSLATION: it is ok, for instance,to bring your Redhat CD to your friends house so she can install it onher machine as well]. See the GNU General Public License for details.
It is ported to run on various hardware configurations, like PowerPC,Apple
Macintosh, Alpha, Intel i386, and more coming all the time. Withall the
volunteers involved with linux over the past 8 years, and morejoining everyday,
linux looks to have a bright future in the world of computingfor years and years
to come.
Source: linuxnewbie.org
Command Description cp Copy files. Syntax: cp [filename] [destination] df Display empty disk space less Show the content of a file. Syntax: less [filename] ls List files mkdir Make a directory. Syntax: mkdir [new directory] more Show the content of a file mv Move files. Syntax: mv [filename] [destination] rm Remove files. Syntax: rm [file list] rmdir Remove an empty directory. Syntax: rmdir [directory] vi Edit text files
NOTE: Almost everything in Linux is case sensitive. I.e. the user"John" is a different user to "john"localhost login:
Type in your user name followed by the enter key. You will the be promptedfor your password:
Type in your password and press the enter key.localhost login: johnpassword:
NOTE: Your password is not echoed on the screen
You will then, if your user name and password are correct, be logged-inand you will see the following prompt [or similar]:
To quickly log-out you can press Ctrl-D or type log-out at thepromptlocalhost%~:
If you are not sure on what command you want help with, you can searchthe
keyword index which consists of all the commands in the system.
To search
the index type man -k [keyword] where [keyword]is the keyword you are
looking for
E.g.: man -k password will give you a list of all the
manualpages with the word "password" in it
Running a Process in the Backgroundcommand modifiers argumentscommand: what you want to execute
modifiers: the different options for the command [usually precededwith a minus sign]
arguments: specifies what to do with the command
cd
Moves to your home directorycd ..
Moves up one directorycd -
Moves to the previous directorycd /usr/docs
Moves to the /usr/docs directorycd ../usr/docs
Moves up one directory and then into usr/docs
ls
Lists the files in the current directoryls -a
Lists all files as well as hidden onesls -l
Lists files with all their details [access rights, last modified etc.]ls -r
This will recursively list all directories encounteredls -f
This will show the type of file. The following suffixes after the nametell you what type of file it is:/ -> directoryls | less
* -> executable file
@ -> symbolic link
Pipe (pass) the listing of the current directory to the less program,allowing you to scroll up and down a long listing. [The | character iscalled a "pipe".]Less Keys:
Down cursor = Down 1 linels [directory]
Up cursor = Up 1 line
Spacebar = Down 1 screen
b =Back up 1 screen
q =Quit
h =Activate help screen
Where [directory] is the directory where you want to get the file listfrom
cp [source] [destination]cp -r a b
Copy the entire contents of directory a into directory b. [the r isfor recursion]cp a.txt backup
Copy the file a.txt across to the directory backup.cp a.txt backup/a_bk.txt
Copy the file a.txt across to the directory backup and rename it a_bk.txtat the same time. If the file backup/a_bk.txt already existed then it willbe overwritten without warning.cp -i a.txt backup/a_bk.txt
The same as above but asks for confirmation before overwriting an existingfile.cp a b c d
In the above, every parameter but the last - are the files to copy,and the last parameter - is the directory to copy the files too.
Moving a file
mv [file] [directory] where [file] is the file youwant to move, and [directory] is the directory you want to move the filetoRenaming a file
mv [oldfilename] [newfilename] where [oldfilename]is the old file name and [new filename] is the new file name
rm file.txt
Deletes the file named file.txtrm a b c
Deletes the three files a,b,crm -i a b c
Deletes the three files a,b,c, but asks for confirmationrm *.txt
Deletes all files ending in .txtrm -rf work
Deletes the directory work and all sub directories/files in it [thef modifier, means force]
mkdir [directory] where [directory] is your new directorynameTo remove a directory, you use the rmdir command
rmdir [directory] where [directory] is the directoryyou want to delete
Note: rmdir will not remove a directory ifit is not empty, i.e. it contains files and/or other directories
more [filename] where [filename] is the name of thefile you wish to viewOr you can use the less command:
It will scroll through the file one page at a time. Press spacebarto scroll down
less [filename] basically the same as the morecommand
Example:Compression
To make a archive from a directory called work you need todo the following:tar -cvf work.tar workThe general format of the tar command:tar - [options]f [tar file] [source]The common options: [you need to specify one of these]
where [options] are the options, [tar file] is the destination whereyou want the files to be archived [usually ends in .tar]. [source] arethe files of directories that you want archived.Other optionsThere are a lot more, type man tar for more information
Option Description c Create a new archive x Extract files from the archive t List the files in the archive There are a lot more, type man tar for more information
Option Description f Use the archive file [supply the file name after the option] v Verbosely list files processed z Gzip or Gunzip the archive
To compress a file, type the following:gzip [file name]To uncompress a file, type the following:
where [file name] is the name of the file you want to compressgzip -d [file name]
where [file name] is the name of the gzipped file you want to uncompress
To put yourself into command mode <Esc needs to be pressed.This
will allow you to execute the following commands.
| Running vi | |
|---|---|
| vi [filename] | opens [filename] in vi. If the file does not exist ci creates it. |
| Entering Text | |
| i | Start inserting at the cursor position. All characters typed will beinserted until <Esc is pressed. |
| a | Start appending text after the cursor position. All characters typedare inserted until <Esc is pressed. |
| Moving Cursor | |
| h, j, k, l | Moves cursor, left, down, up, and right. The arrow keys *may* workon some systems. |
| $ | Move cursor to the end of the current line. |
| :1 | Go to line 1. Entering another number in place of 1 will bring youto that line instead. |
| :$ | Go to ther last line. |
| Other Commands | |
| dd | Delete the line the cursor is on. |
| x | Delete the character the cursor is on. |
| p, P | Paste the last deleted text at or after the cursor position |
| u | Undo the previous command. |
| U | Undo changes to the current line. |
| J | Join the following line to the end of the current line. |
| <control - L | Re-paint your screen. |
| ? | help |
| Saving and Exiting | |
| :q! | Abandon ALL changes and exit vi. |
| :w | save and return to vi |
| ZZ :wq |
save all changes and exists vi. |
source: http://alt.ben.edu/faculty/rmeeker/linux_manual/vi.html
The screen is your whole ''desktop'', and the words may be usedinterchangeably. Technically it means the primary video display you viewX with, and you can have more than one screen, in fact you can have morethan one computer running off a single X server. This is beyond the scopeof this humble document, but you should be aware of the distinction.
The root window is the background of your screen. It is referredto a window in name alone, it does not behave like any other window, butrather you run your applications on the root window, or put a picture onit, or just a solid color.
The window manager is the main interface between the X Windowsystem and the user. Without the window manager, the system would be ratherdifficult to use, and would certainly not be a very productive tool. Thewindow manager provides such functionality as window borders, menus, icons,virtual desktops, button bars, tool bars, and allows the user to customizeit at will, often adding to its functionality in the process.
The pointer is the arrow or indicator of any given shape whichrepresents the location your mouse (or other pointing device) correspondsto on the screen. The pointer often changes to give you contextual feedbackas to what will happen when you use the mouse at that point on the screen.
The window is a frame in which any given application resideswhich is ''managed'' by the window manager. This includes pretty much anythingexcept the so-called root window. Even windows which do not appear to haveframes, titles, or normal borders of any kind are being managed by yourwindow manger. The active window is the window you are currentlyusing, the window that will receive text when you type, and is traditionallydenoted by the fact that your mouse cursor is pointing at it, though thisis not always the case. The active window is said to have ''focus,'' therest of the windows on your display being ''unfocused.''
Menus and icons behave in X similar to the way they behavein
other windowing systems, and the same general principles apply. Windowswith text
only are called terminal emulators, an example would bexterm,and
these basically emulate a console text-only display, but let you multiplexand
use more than one at a time, and have many other advantages availabledue to
their being used in X.
Source: http://linuxcentral.com/linux/LDP/HOWTO/XWindow-User-HOWTO-2.html