Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.



Published on

Published in: Technology
  • Be the first to comment


  1. 1. LINUX
  2. 2. CONTENTS <ul><li>Introduction </li></ul><ul><li>Install and configure linux </li></ul><ul><li>Uninstall linux </li></ul><ul><li>Commands </li></ul>
  3. 3. INTRODUCTION <ul><li>Linux is an operating system which enable computer hardware to run various applications </li></ul><ul><li>Linux distros are the variant of linux operating system which is ready for use by the users. </li></ul><ul><li>Every distros have unique advantages such as desktop appearance, software managenent specific applications, updates and technical support. </li></ul>
  5. 5. DOWNLOAD THE RIGHT DISTRO <ul><li>For a great balance of power and ease-of-use, Ubuntu Linux is recommended. </li></ul><ul><li>Ubuntu is a LiveCD version of Debian, which uses the more streamlined Gnome window manager. </li></ul>
  6. 6. <ul><li>To get the latest version of Ubuntu, go to and select a mirror near you. </li></ul><ul><li>You’ll want either the 64-bit version—if you have an Athlon 64 or Pentium 4 that supports AMD64 extensions—or the Intel x86 version, for all other PC CPUs. </li></ul>VERSIONS
  7. 7. <ul><li>Now, you should prep your rig for the actual install. Ubuntu can be installed on a spare hard drive. A 20GB drive will provide more than enough space. </li></ul><ul><li>Ensure that your mobo is set to boot from the optical drive and dropping the Ubuntu disc into the drive, then restarting your computer. </li></ul><ul><li>When the PC boots, you’ll be presented with the screen shown on the right. To start the install, just type “install” and press Enter. </li></ul>Entering the installation...
  8. 8. <ul><li>Now the Ubuntu installer ask information about your system—the language you want to use, the type of keyboard , and the kind of hardware. </li></ul><ul><li>Once the installer collects info about your hardware, and configures the network adapter, you’ll need to assign a hostname. </li></ul><ul><li>Your hostname can range from your actual name to a character. </li></ul><ul><li>Once you’ve selected a hostname, you’ll proceed to disk partitioning. </li></ul>Language preference
  9. 10. <ul><li>The Ubuntu installer will install the grub boot manager, automatically configure it to work with any other OSes you have installed, and restart your computer. </li></ul><ul><li>When you restart, you’ll need to choose your time zone, and then you’ll create a user account. </li></ul><ul><li>Enter your full name, your desired username, and a secure password. </li></ul>Time zone preference
  10. 12. <ul><li>Instead of having the all-powerful root, Ubuntu gives the account you create during the install permission to use “sudo,” which provides your account with temporary root-like privileges. </li></ul><ul><li>If you’re following online instructions that require root privs, you can run the commands on your Ubuntu install by prefacing the command with sudo. </li></ul><ul><li>For example, if you need to edit your fstab file, you’d type sudo nano /etc/fstab instead of nano /etc/fstab. </li></ul>
  11. 13. PARTITION UR DISK <ul><li>Every partition on every hard drive in a Linux machine is given a unique name. </li></ul><ul><li>The formula for names works like this: Parallel ATA hard drive names start with “hd”, SCSI, SATA, USB, and FireWire drive names start with “sd”. </li></ul><ul><li>The next character in each drive’s name is a letter, which tells you which physical drive a partition is on. For example, the first SATA drive in a system will be “sda”, the second will be “sdb”. </li></ul>
  12. 14. <ul><li>After the letter will be a number. This number indicates the partition on a particular drive, so “sdb1” is the first partition on the second SATA drive in the system. (To get an Ubuntu system working, you shouldn’t need to know any of this, but a little knowledge never hurts.) </li></ul><ul><li>If you’re going to wipe an old drive and use it for your Linux drive, you can do that by using the “Erase entire disk” option and selecting the appropriate size disk. </li></ul>
  13. 15. <ul><li>Once you’ve created your account, the installer will configure apt-get , the package management application that Ubuntu shares with Debian. </li></ul><ul><li>Ubuntu developers maintain several huge repositories of software that is preconfigured to run perfectly on Ubuntu. </li></ul>apt-get
  14. 16. <ul><li>Your last task is to select the resolutions your desktop will run at. When choosing your resolution, make absolutely certain you don’t select any options your monitor can’t display. </li></ul><ul><li>If you goof, you won’t be able to boot into the GUI, and you’ll have to either manually tweak the text file that configures your display or reinstall from scratch. You probably don’t want to do either. </li></ul>Resolutions
  15. 17. <ul><li>You can select as many resolutions as you wish, but Ubuntu will default to the highest resolution when you boot the first time. Once you select your setting, the machine will reboot again, and the install will be done! </li></ul><ul><li>Everything you need to use your computer on the web, for email, or for basic office tasks is available to you out of the box. </li></ul>
  16. 18. <ul><li>Generally you would get Linux software in the tarball format (.tgz) </li></ul><ul><li>This file has to be uncompressed into any directory using tar command. In case you download a new tarball by the name game.tgz, then you would have to type the following command </li></ul><ul><li>$ tar xfvz game.tgz </li></ul>
  17. 19. $ ./configure <ul><li>This would create a directory within the current directory and unzip all the files within that new directory. </li></ul><ul><li>Once this is complete the installation instructions ask you to execute the 3 (now famous) commands : configure, make & make install. </li></ul><ul><li>Each software comes with a few files which are solely for the purpose of installation sake. One of them is the configure script. The user has to run the following command at the prompt </li></ul><ul><li>$ ./configure </li></ul>
  18. 20. <ul><li>The command makes the shell run the script named ' configure ' which exists in the current directory. </li></ul><ul><li>The configure script basically consists of many lines which are used to check some details about the machine on which the software is going to be installed. </li></ul><ul><li>This script checks for lots of dependencies on your system. For the particular software to work properly, it may be requiring a lot of things to be existing on your machine already. </li></ul><ul><li>When you run the configure script you would see a lot of output on the screen , each being some sort of question and a respective yes/no as the reply. </li></ul>
  19. 21. <ul><li>If any of the major requirements are missing on your system, the configure script would exit and you cannot proceed with the installation, until you get those required things. </li></ul><ul><li>The main job of the configure script is to create a ' Makefile ' . </li></ul><ul><li>This is a very important file for the installation process. </li></ul><ul><li>Depending on the results of the tests (checks) that the configure script performed it would write down the various steps that need to be taken (while compiling the software) in the file named Makefile. </li></ul>
  20. 22. $make <ul><li>If you get no errors and the configure script runs successfully (if there is any error the last few lines of the output would glaringly be stating the error) then you can proceed with the next command which is $ make </li></ul><ul><li>' make ' is actually a utility which exists on almost all Unix systems. </li></ul><ul><li>For make utility to work it requires a file named Makefile in the same directory in which you run make. As we have seen the configure script's main job was to create a file named Makefile to be used with make utility. </li></ul>
  21. 23. <ul><li>make would use the directions present in the Makefile and proceed with the installation. The Makefile indicates the sequence, that Linux must follow to build various components / sub-programs of your software. The sequence depends on the way the software is designed as well as many other factors. </li></ul><ul><li>The Makefile actually has a lot of labels (sort of names for different sections). Hence depending on what needs to be done the control would be passed to the different sections within the Makefile Or it is possible that at the end of one of the section there is a command to go to some next section. </li></ul>
  22. 24. <ul><li>Basically the make utility compiles all your program code and creates the executables. </li></ul><ul><li>For particular section of the program to complete might require some other part of the code already ready, this is what the Makefile does. </li></ul><ul><li>It sets the sequence for the events so that your program does not complain about missing dependencies. </li></ul><ul><li>One of the labels present in the Makefile happens to be named ' install ' . </li></ul>
  23. 25. $make install <ul><li>If make ran successfully then you are almost done with the installation. Only the last step remains which is $ make install </li></ul><ul><li>As indicated before make uses the file named Makefile in the same directory. When you run make without any parameters, the instruction in the Makefile begin executing from the start and as per the rules defined within the Makefile. </li></ul>
  24. 26. <ul><li>But when you run make with install as the parameter, the make utility searches for a label named install within the Makefile, and executes only that section of the Makefile. </li></ul><ul><li>The install section happens to be only a part where the executables and other required files created during the last step (i.e. Make) are copied into the required final directories on your machine. </li></ul><ul><li>E.g. the executable that the user runs may be copied to the /usr/local/bin so that all users are able to run the software. Similarly all the other files are also copied to the standard directories in Linux. </li></ul><ul><li>Remember that when you ran make, all the executables were created in the temporary directory where you had unzipped your original tarball. So when you run make install, these executables are copied to the final directories. </li></ul>
  26. 28. <ul><li>Uninstalling an operating system usually means leaving your machine unbootable </li></ul><ul><li>Operating systems will not work without their boot files or if they are never called by the bootloader. </li></ul><ul><li>Therefore, to remove the presence of an operating system, it is enough to dereference is from the bootloader menu. </li></ul><ul><li>Alternatively, you can also delete its files or replace them with another operating system </li></ul>
  28. 30. <ul><li>cd command </li></ul><ul><li>To change directories </li></ul><ul><li>Type cd followed by the name of a directory to access that directory. </li></ul><ul><li>Keep in mind that you are always in a directory and allowed access to any directories hierarchically above or below. </li></ul><ul><li>You may also benefit from reviewing my directory commands page. </li></ul><ul><li>Ex: cd games </li></ul><ul><li>If the directory games is not located hierarchically below the current directory, then the complete path must be written out. </li></ul><ul><li>Ex: cd /usr/games </li></ul><ul><li>To move up one directory, use the shortcut command. </li></ul><ul><li>Ex: cd .. </li></ul>
  29. 31. Clear command <ul><li>clear the command prompt </li></ul><ul><li>Type clear to clean up your command prompt window. </li></ul><ul><li>This is especially helpful when you are typing lots of commands and need a clean window to help you focus. Ex:clear </li></ul><ul><li>This is also useful when you are getting ready to type a rather long command and do not wish to become confused by other details on the screen. </li></ul>
  30. 32. df command <ul><li>check disk space </li></ul><ul><li>Typing df provides a very quick check of your file system disk space. </li></ul><ul><li>Type df -h to get a more easily readable version of the output. Notice that this command will include all applicable storage such as your hard disk/s (hda, hdb etc.) and your server SWAP file (shm). </li></ul><ul><li>To list disk space including filesystem </li></ul><ul><li>type: df -h -T </li></ul>
  31. 33. finger command <ul><li>to see who's on the system </li></ul><ul><li>Typing finger allows you to see who else is on the system or get detailed information about a person who has access to the system. </li></ul><ul><li>Type finger followed by the name of a user's account to get information about that user. Or, type finger and press enter to see who's on the system and what they are doing. </li></ul><ul><li>Ex: finger johndoe </li></ul>
  32. 34. ls command <ul><li>list files and directories </li></ul><ul><li>If you’re in the directory named games and you type ls, a list will appear that contains files in the games directory and sub-directories in the games directory. </li></ul><ul><li>Examples: ls Mail </li></ul><ul><li>ls /usr/bin </li></ul>
  33. 35. ..continued <ul><li>ls -alt list all files (including .rc files) and all directories located in the current directory. The listing will include detailed, often useful information. </li></ul><ul><li>Examples: ls -alt /usr/bin </li></ul><ul><li>If the screen flies by and you miss seeing a number of files, try using the |more at the end like: </li></ul><ul><li>ls -alt |more </li></ul>
  34. 36. ...continued <ul><li>* In Bash (Linux shell) often the abbreviated command L is available. </li></ul><ul><li>To get a verbose listing of files and directories you could therefore simply type: l </li></ul>
  35. 37. man command <ul><li>pull up information about a Linux command . </li></ul><ul><li>Ex: man ls </li></ul><ul><li>Type man -k followed by a word to list all of the commands and descriptions that contain the word you specified. </li></ul><ul><li>Ex: man -k finger </li></ul>
  36. 38. more command <ul><li>read the contents of a file </li></ul><ul><li>Why do we exmphasize using this on a &quot;text&quot; file? Because most other types of files will look like garbage! </li></ul><ul><li>Ex: more testfile.txt </li></ul>
  37. 39. nano <ul><li>start a text editor </li></ul><ul><li>Type nano followed by the filename you wish to edit. </li></ul><ul><li>However, it is very important that you also learn about other text editors available on Linux and UNIX systems. </li></ul>
  38. 40. passwd <ul><li>change your current password </li></ul><ul><li>Type passwd and press enter. You'll see the message Changing password for yourname. </li></ul><ul><li>At the Old password: prompt, type in your old password . </li></ul><ul><li>Then, at the Enter new password: prompt, type in your new password . </li></ul><ul><li>The system double checks your new password. Beside the Verify: prompt, type the new password and press again. </li></ul>
  39. 41. pwd <ul><li>list the name of your current directory </li></ul><ul><li>Type pwd and hit enter. You'll see the full name of the directory you are currently in. </li></ul><ul><li>This is your directory path and is very handy. This is especially handy when you forget which directory you’ve changed to and are trying to run other commands. </li></ul><ul><li> </li></ul>
  40. 42. Logout command <ul><li>quit using the system . </li></ul><ul><li>Type logout at the prompt to disconnect from your Linux machine or to logout a particular user session from the system. </li></ul><ul><li>Although rudimentary, leaving your critical account logged on may be a security concern. use logout when you are finished using your root account! </li></ul><ul><li>Ex: logout </li></ul>
  41. 43. mv command <ul><li>mv - move (rename) files </li></ul><ul><li>SYNOPSIS </li></ul><ul><li>mv [OPTION]... [-T] SOURCE DEST </li></ul><ul><li>mv [OPTION]... SOURCE... DIRECTORY </li></ul><ul><li>mv [OPTION]... -t DIRECTORY SOURCE... </li></ul><ul><li>EXAMPLE </li></ul><ul><li>mv examples.tar move.tar </li></ul><ul><li>DESCRIPTION </li></ul><ul><li>Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY. </li></ul>
  42. 44. ....continued <ul><li>Here are options available with Linux mv command: </li></ul><ul><li>-b - like --backup but does not accept an argument </li></ul><ul><li>-f, --force - do not prompt before overwriting </li></ul><ul><li>-i, --interactive - prompt before overwrite </li></ul><ul><li>--strip-trailing-slashes - remove any trailing slashes from each SOURCE </li></ul><ul><li>argument </li></ul><ul><li>-S, --suffix=SUFFIX - override the usual backup suffix </li></ul><ul><li>-t, --target-directory=DIRECTORY- move all SOURCE arguments into DIRECTORY </li></ul>
  43. 45. ....continued <ul><li>-T, --no-target-directory - treat DEST as a normal file </li></ul><ul><li>-u, --update - move only when the SOURCE file is newer than the destination file or when the destination file is missing </li></ul><ul><li>-v, --verbose explain what is being done </li></ul>