Presentation is loading. Please wait.

Presentation is loading. Please wait.

California State University Fresno

Similar presentations


Presentation on theme: "California State University Fresno"— Presentation transcript:

1 California State University Fresno
Introduction to Linux & Its Installation Harinder Bawa California State University Fresno

2 What is Linux? Linux is a form of UNIX developed for PC (UNIX Clone)
The basic components (KERNEL) are open source. A KERNEL is a program that allocates and controls hardware resources in a system Linux comes in many flavors and some are proprietary. (Ubuntu) At CERN we use: scientific linux MAC OSX is also based on UNIX and shares many similarities Dr. Harinder Bawa 5/6/2018

3 Why use Linux? Unix and its variants (Linux and sun solaris) are the platforms of choice of High Energy Physics Most important is that it’s free. Anyone can download and compile the source More powerful and configurable than windows Windows has its own advantages for certain applications. Dr. Harinder Bawa 5/6/2018

4 Instructions to install Ubuntu Linux 12.04 (LTS)
This is highly recommended that you should take backup of your entire data before start with the installation process. Obtaining system installation media Download latest desktop version of Ubuntu from this link: Dr. Harinder Bawa 5/6/2018

5 Instructions to Install Ubuntu Linux12.04 (LTS)
There are several ways to boot the installation system. Some of the very popular ways are, booting from a CDROM, booting from a USB memory stick. Here we will learn how to boot installation system with CDROM. Dr. Harinder Bawa 5/6/2018

6 Boot installation system using a CDROM.
Before booting the installation system, one need to change the boot order and set CDROM as first boot device. As your computer starts, press the DEL, ESC, F1, F2, F8 OR F10 during the initial startup screen. Depending on the Bios manufacturer, a menu may appear. However, consult the hardware documentation for the exact key strokes. Dr. Harinder Bawa 5/6/2018

7 Like in this machine, its DEL key as shown in following
Dr. Harinder Bawa 5/6/2018

8 Select BOOT option Find the boot option in the setup utility. Its location depends on your BIOS. Select the boot option from the menu, you can now see the options hard drive, CDROM drive, removable devices disk etc. Change the boot sequence settings so that the CD- ROM is first. See the list of “item specific help” in right side of the window and find keys which is used to toggle to change the boot sequence. Dr. Harinder Bawa 5/6/2018

9 Dr. Harinder Bawa 5/6/2018

10 Inserting Ubuntu CD Insert the Ubuntu disk in CD/DVD drive.
Save your changes. Instructions on the screen tell you how to save the changes on your computer. The computer will restart with the changed settings. Machine should boot from CDROM, wait for the CD to load...In a few minutes installation wizard will be started. Select your language and click the "install Ubuntu“ button to continue... Dr. Harinder Bawa 5/6/2018

11 Dr. Harinder Bawa 5/6/2018

12 Preparing to install Ubuntu
Optionally, you can choose to download updates while installing and/or install third party software, such as mp3support. Be aware, though, that if you select those options, the entire installation process will be longer! Dr. Harinder Bawa 5/6/2018

13 Option: partitions of a disk
Since we are going to create partitions manually, select something else, then click continue. Keep in mind that even if you do not want to create partitions manually, it is better to select the same option as indicated here. This would insure that the installer will not overwrite your windows, which will destroy your data. The assumption here is that sdb will be used just for ubuntu12.04, and that there are no valuable data on it Dr. Harinder Bawa 5/6/2018

14 Dr. Harinder Bawa 5/6/2018

15 Where are you? Select your location and click the "continue“ button.
Dr. Harinder Bawa 5/6/2018

16 Keyboard layout Select your keyboard layout and US(English) and click on “continue” button Dr. Harinder Bawa 5/6/2018

17 Fill-in information Who are you? Fill in the fields with your real name, the name of the computer (automatically generated, but can be overwritten), username, and the password. Also at this step, there's an option called "log in automatically. “ If you check it, you will automatically be logged into the Ubuntu Desktop without giving the password. Option "encrypt my home folder,“ will encrypt your home folder. Click on the "continue“ button to continue... Dr. Harinder Bawa 5/6/2018

18 It will take approximately minutes (depending on computer's speed), a pop-up window will appear, notifying you that the installation is complete, and you'll need to restart the computer in order to use the newly installed Ubuntu operating system. Click the "restart now“ button. Please remove the CD and press the "enter“ key to reboot. The computer will be restarted.. Dr. Harinder Bawa 5/6/2018

19 Dual boot In a few seconds, you should see windows7′s boot menu with two entries listed windows7 and Ubuntu12.04 (LTS). Then you may choose to boot into windows7 or Ubuntu using the up/down arrow key Dr. Harinder Bawa 5/6/2018

20 Another quick method to install ubuntu using “wubi”
Wubi is an officially supported installer for windows XP, vista and 7 users that allows ubuntu to be installed and uninstalled in a safe, easy way as with any other windows application. Note: This doesn’t work for Windows8/10 Also, You can get wubi.exe only upto version LTS Advantage: You don’t need to make Ubuntu CD, Very easy to install Dr. Harinder Bawa 5/6/2018

21 Caution But Disclaimer: You have to be careful in handing:
Wubi uses a virtual disk that is sensitive to forced shutdowns. If ubuntu appears to be frozen please refer to: how to reboot cleanly even when the keyboard/mouse are frozen Dr. Harinder Bawa 5/6/2018

22 How to reboot cleanly even when the keyboard/mouse are frozen
There are normally several ways to reboot cleanly using key combinations such as: CTRL + ALT+ F2 (get to a terminal, you can then run top/kill/pkill to discover and kill the offending process) ALT+ SYSRQ + R then CTRL + ALT+ F2 (as above, but first try to regain control of the keyboard) CTRL + ALT + backspace (kills the graphic session and goes to a console, all graphical applications are terminated too) ALT+ SYSRQ + R then ALT + backspace (as above, but first try to regain control of the keyboard) CTRL + ALT + DEL (reboot) ALT+ SYSRQ + R then CTRL + ALT + DEL (as above, but first try to regain control of the keyboard) ALT+ SYSRQ + R + E + I + S + U + B (forces a clean reboot even when the keyboard is not responding) The last one is the most effective, but you could try the other commands first. Dr. Harinder Bawa 5/6/2018

23 Ubuntu Releases http://releases.ubuntu.com/
All Ubuntu releases can found here: Dr. Harinder Bawa 5/6/2018

24 Click on the release you want to install through Wubi (Upto 14.04.5)
Lets assume you choose When you click the release, you entered Look into the end of page: “Wubi.exe” and download it to your computer Double click as you do for any other executable in Windows Dr. Harinder Bawa 5/6/2018

25 Insert a password for the new account, adjust other settings such as the disk space, and click "install". Dr. Harinder Bawa 5/6/2018

26 Automatic process The installation process from this point on is fully automatic. The installation files (approximately 700mb) will be downloaded and checked, after which you will be asked to reboot. Do so and select ubuntu at the boot screen. The installation will continue for another 10 to 15 minutes and the machine will reboot again. That's it. Now you can select ubuntu at the boot screen and start using it Dr. Harinder Bawa 5/6/2018

27 Dr. Harinder Bawa 5/6/2018

28 Some LINUX basics File system
Linux is much more hierarchal than windows Everything starts at the root / Boot -- contains the kernel and system map Bin -- contains the basic system binaries Dev -- all the device entries Etc -- can't think of any other place to put it Home -- where all the users live Lib -- system libraries Mnt -- place to mount file systems Proc -- system information Root -- the root user's home Sbin -- system binaries Usr -- where user accessible programs go Var -- logs and such Dr. Harinder Bawa 5/6/2018

29 Terminal The terminal is an interface in which you can type and execute text based commands. Open a terminal (applications -> accessories -> terminal) Or Dr. Harinder Bawa 5/6/2018

30 Help! Whenever you need help with a command type “man” and the command name Dr. Harinder Bawa 5/6/2018

31 Help! Dr. Harinder Bawa 5/6/2018

32 Basic commands pwd what directory I am in ? ls what files are there?
cd move to directory. cd one directory backwards cp copy a file mv move a file rm delete a file mkdir/rmdir make/remove a directory Dr. Harinder Bawa 5/6/2018

33 File permissions Each file in unix/linux has an associated permission level This allows the user to prevent others from reading/writing/executing their files or directories Use “ls -l filename” to find the permission level of that file Dr. Harinder Bawa 5/6/2018

34 File Permissions Dr. Harinder Bawa 5/6/2018

35 Permission Levels “r” means “read only” permission
“w” means “write” permission “x” means “execute” permission In case of directory, “x” grants permission to list directory contents Dr. Harinder Bawa 5/6/2018

36 Viewing Permissions Dr. Harinder Bawa 5/6/2018

37 File Permissions User (you) Dr. Harinder Bawa 5/6/2018

38 File Permissions Group Dr. Harinder Bawa 5/6/2018

39 File Permissions “The World” Dr. Harinder Bawa 5/6/2018

40 chmod If you own the file, you can change it’s permissions with “chmod” Syntax: chmod [user/group/others/all]+[permission] [file(s)] Below we grant execute permission to all: Dr. Harinder Bawa 5/6/2018

41 Processes A process is a binary file running on the system
These can be anything from KERNEL to web browsers, to editors to your analysis code. A process that goes bad can bring the system to a halt Often your analysis code But editors or web browsers etc can do this too Dr. Harinder Bawa 5/6/2018

42 Monitoring command: ps
To view all the processes for the current shell you are running: Dr. Harinder Bawa 5/6/2018

43 Monitoring command: top
To view the CPU usage of all processes Dr. Harinder Bawa 5/6/2018

44 Killing process To terminate a process use:: kill pid
Dr. Harinder Bawa 5/6/2018

45 Disk USAGE Disks and file systems are a finite size.
You need to know how much you are using du (detail in backup) How much is in the directory specified? df (detail in backup) How much space is in the file system specified? quota(detail in backup) How much space am I using relative to my quota Dr. Harinder Bawa 5/6/2018

46 Archiving and compression
gzip compress a single file gunzip --- uncompress a single file use tar to archive files tar –vf file.tar mydir/* makes file.tar tar –xf file.tar  mydir/* other switches -v verify list all files in archive process -z tar followed by gzip (or gunzip) -u update, adds files to an archive Dr. Harinder Bawa 5/6/2018

47 Exercise-1 Of course install ubuntu LINUX Open terminal
Download (By Default, it gets Downloaded in “Download” folder.) Make a directory name “examples” Uncompress the archive downloaded file (using tar command) Check how many files are there in directory(Using command: google it) Uncompress all the files Rename the files to file1.txt, file2.txt, file3.txt etc Archive all files and give name as “NewFiles.tgz” Dr. Harinder Bawa 5/6/2018

48 Exercise-2 Permission Check and note down the permission of the files
Change permission to files as being readable and executable by everyone. Processes Type one command in terminal: yes > /dev/null & Now: Show me what processes you have running on your computer Check How much CPU “yes” process is taking. Kill the job “yes” Dr. Harinder Bawa 5/6/2018

49 Exercise-3 Storage Determine the disk usage in your example dir.
Determine the disk partitions in your computer Display information of file system in GB Bonus Brain Teaser! Command to: Write the amount of free space available in your Home Dir. Dr. Harinder Bawa 5/6/2018

50 EXTRA SLIDES Dr. Harinder Bawa 5/6/2018

51 The du command Dr. Harinder Bawa 5/6/2018

52 The df command Dr. Harinder Bawa 5/6/2018


Download ppt "California State University Fresno"

Similar presentations


Ads by Google