linux tutorial by aks

Upload: anilshaw27

Post on 04-Apr-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/31/2019 Linux Tutorial by AKS

    1/4

    LINUX

    Linux is a multiuser, multitasking, operating system first developed by Linus Benedict Torvalds in theyear 1991. LINUX is a 32-bit operating system. It runs on a wide variety of platforms such as intel, Sparc,Alpha etc. it can be considered in every sense as a full-blown implementation of UNIX. But it cannot be

    called as UNIX because UNIX is a registered trademark product owned by AT&T. LINUX is distributed asfree software under a free software license called GNU General public License (GPL).

    Advantage of LINUX:

    A lot of the advantages of Linux are a consequence of Linux' origins, deeply rooted in UNIX, except forthe first advantage, of course:

    Linux is free. Linux is portable to any hardware platform Linux was made to keep on running:

    As with UNIX, a Linux system expects to run without rebooting all the time. That is why a lot of tasks are being executed at night or scheduled automatically for other calm moments, resulting inhigher availability during busier periods and a more balanced use of the hardware. This propertyallows for Linux to be applicable also in environments where people don't have the time or thepossibility to control their systems night and day.

    Linux is secure and versatile:The security model used in Linux is based on the UNIX idea of security, which is known to be robustand of proven quality. But Linux is not only fit for use as a fort against enemy attacks from theInternet: it will adapt equally to other situations, utilizing the same high standards for security. Yourdevelopment machine or control station will be as secure as your firewall.

    Linux is scalable:From a Palmtop with 2 MB of memory to a petabyte storage cluster with hundreds of nodes: add orremove the appropriate packages and Linux fits all. You don't need a supercomputer anymore,because you can use Linux to do big things using the building blocks provided with the system. If youwant to do little things, such as making an operating system for an embedded processor or justrecycling your old 486, Linux will do that as well.

    The Linux OS and Linux applications have very short debugtimes: Because Linux has been developed and tested by thousands of people, both errors and people to fixthem are found very quickly. It often happens that there are only a couple of hours between discoveryand fixing of a bug.

    Disadvantage of LINUX:

    Linux is not very user friendly and confusing for beginners: Is an Open Source product trustworthy?

    USING BASH FEATURE:

    Key or Combination of Key FunctionCtrl +A Move cursor to the beginning of the command line. Ctrl +C End a running program and return the prompt, Ctrl +D Log out of the current shell session, equal to typing exit or logout . Ctrl +E Move cursor to the end of the command line. Ctrl +H Generate backspace character.

  • 7/31/2019 Linux Tutorial by AKS

    2/4

    Ctrl +L Clear this terminal. Ctrl +R Search command history Ctrl +Z Suspend a program ArrowLeft andArrowRight

    Move the cursor one place to the left or right on the command line, so thatyou can insert characters at other places than just at the beginning and theend.

    ArrowUp andArrowDown

    Browse history. Go to the line that you want to repeat, eventually editdetails, and press Enter to save time.

    Shift +PageUp andShift +PageDown

    Browse terminal buffer (to see text that has "scrolled off" the screen).

    Tab Command or filename completion; when multiple choices are possible,the system will either signal with an audio or visual bell, or, if too manychoices are possible, ask you if you want to see them all

    Tab Tab Shows file or command completion possibilities.

    The whatis commands

    A short index of explanations for commands is available using the whatis command, like in the examplesbelow:[your_prompt] whatis lsls (1) list directory contents

    This displays short information about a command, and the first section in the collection of man pages thatcontains an appropriate page

    The help option

    Most GNU commands support the help , which gives a short explanation about how to use thecommand and a list of available options. Below is the output of this option with the cat :

    userprompt@host: cat help Usage: cat [OPTION] [FILE]...Concatenate FILE(s), or standard input, to standard output.A, showall equivalent to vET b, numbernonblank number nonblank output lines e equivalent to vE E, showends display $ at end of each line n, number number all output lines s, squeezeblank never more than one single blank line t equivalent to vT T, showtabs display TAB characters as ^I u (ignored)v, shownonprinting use ^ and M notation, except for LFD and TAB

    help display this help and exit version output version information and exit

    The df command

    On a running system, information about the partitions can be displayed using the df command (whichstands for disk full or disk free ). In Linux, df is the GNU version, and supports the h or human readableoption which greatly improves readability.The df command only displays information about active nonswap partitions.

    freddy:~>df h

  • 7/31/2019 Linux Tutorial by AKS

    3/4

    Filesystem Size Used Avail Use% Mounted on/dev/hda8 496M 183M 288M 39% //dev/hda1 124M 8.4M 109M 8% /boot/dev/hda5 19G 15G 2.7G 85% /opt/dev/hda6 7.0G 5.4G 1.2G 81% /usr/dev/hda7 3.7G 2.7G 867M 77% /varfs1:/home 8.9G 3.7G 4.7G 44% /.automount/fs1/root/home

    FILE system of LINUX:

    LINUX treat everything as file. Even the directory is treated as a file that contains entries for severalothers files. All hardware devices, such as I/O devices, storage device etc. are all treated as files.The linux file system organized in an hierarchy which starts with the root directory. The root isrepresented by a forward slash (/). Under root directory several are several system directories and thehome directory.(LINUX uses forward slash (/) as a separator where windows or DOS uses back slash (\) as seperators.)Depending on the system admin, the operating system and the mission of the UNIX machine, thestructure may vary, and directories may be left out or added at will.

    /bin Common programs, shared by the system, the system administrator and the users. /boot The startup files and the kernel, vmlinuz . In some recent distributions also grub

    data. Grub is the GRand Unified Boot loader and is an attempt to get rid of themany different bootloaders we know today.

    /dev Contains references to all the CPU peripheral hardware, which are represented asfiles with special properties.

    /etc Most important system configuration files are in /etc , this directory contains datasimilar to those in the Control Panel in Windows

    /home Home directories of the common users. /initrd (on some distributions) Information for booting. Do not remove!

    /lib Library files, includes files for all kinds of programs needed by the system and theusers.

    /lost+found Every partition has a lost+found in its upper directory. Files that were savedduring failures are here.

    /misc For miscellaneous purposes. /mnt Standard mount point for external file systems, e.g. a CDROM or a digital camera. /net Standard mount point for entire remote file systems /opt Typically contains extra and third party software. /proc A virtual file system containing information about system resources. More

    information about the meaning of the files in proc is obtained by entering thecommand man proc in a terminal window. The file proc.txt discusses thevirtual file system in detail. If you don't have a Linux machine at hand on which tolocate this file,

    /root The administrative user's home directory. Mind the difference between /, the rootdirectory and /root, the home directory of the root user.

    /sbin Programs for use by the system and the system administrator. /tmp Temporary space for use by the system, cleaned upon reboot, so don't use this for

    saving any work! /usr Programs, libraries, documentation etc. for all userrelated programs. /var Storage for all variable files and temporary files created by users, such as log files,

  • 7/31/2019 Linux Tutorial by AKS

    4/4