Lab # 1 Introduction To Linux

Transcription

Islamic University – GazaEngineering FacultyDepartment of Computer EngineeringECOM 4010: Operating Systems LabLab # 1Introduction to LinuxEng. Eman R. HabibSeptember, 2013

2Operating Systems LabWhat is an Operating System? A program that manages the computer hardware. It also provides a basis for applicationprograms and acts as an intermediary between the computer user and the computerhardware.OS is a resource allocator: Manages all resources and decides between conflictingrequests for efficient and fair resource use.OS is a control program: Controls execution of programs to prevent errors andimproper use of the computer.The One program running at all times on the computer (usually called the kernel).System Calls Programming interface to the services provided by the OSInterface between the process and the operating system.Typically written in a high-level language (C or C )

3Operating Systems LabLinuxLinux is a generic term referring to Unix-like computer operating systems based on the Linuxkernel.The development of Linux is one of the most prominent examples of free and open sourcesoftware collaboration; typically all the underlying source code can be used, freely modified,and redistributed by anyone.Because Linux takes the UNIX system as its inspiration, Linux and UNIX programs are verysimilar. In fact, almost all programs written for UNIX can be compiled and run under Linux. Also,many commercial applications sold for commercial versions of UNIX can run unchanged inbinary form on Linux systems.The problem with UNIX is that is has always been expensive and taken large computers to use.Some versions of UNIX have been available for personal computer-type hardware, but the costhas been very prohibitive and the support by multiple vendors has been lacking. Theseproblems are what led to the development of Linux.Linux was developed by "Linus Torvalds" at the University of Helsinki, with the help of UNIXprogrammers from across the Internet.Linux ArchitectureThe Linux architecture comprises two main sections: the kernel space and user space. Kernel spaceThe kernel space is where all of the system level processes happen. These processes are thingsthat affect the entire system and have to be very stable and well maintained. A problem inkernel space can cause the system to crash. The main resident in kernel space is, of course, thekernel. The kernel is the piece of software that manages memory allocation for processes anddivides up the CPU’s time appropriately. The kernel also contains the drivers for the hardwaredevices installed in the system. The kernel is the core of the Linux operating system. User spaceThe user space manages the user processes run by people working on the system. Userprocesses are things such as your e-mail client, Web browser, or word processor. Theseprocesses work with the kernel to handle low level functions such as printing to the screen ortalking to storage hardware. But, since these functions are not handled in kernel space, acorrupted user application will not bring the entire system down.Tip: Kernel space and user space provide an important separation. Drivers andother things that affect system stability run in kernel space.

4Operating Systems LabDirectory StructureFile system: The way the files of an operating system are organized on the disk. All the files are grouped together in the directory structure. The file-system is arrangedin a hierarchical structure, like an inverted tree. The top of the hierarchy is traditionallycalled root (written as a slash /).Linux sorts directories descending from the root directory according to their importanceto the boot process.File systems from other hard drive partitions mount to directories beneath the rootdirectory, providing access to a single directory structure.The File system hierarchy standard (FHS) governs the unified file system for Linux bydefining a standard set of directories, sub-directories and files.Linux is case sensitive operating system.Directory/DescriptionThe root directory, all directories are below the / (root directory)of the system./binContains binary commands available to all users./bootContains kernel and boot loader files./devContains device files./etcContains system configuration files./homeContains by default the user home directories./libContains shared programs libraries and kernel modules./rootHome directory for the root user./mediaMount point for removable media./mntMount point for mounting a file system temporarily./optAdd-on application software packages./sbinContains system binary commands./procContains information about system state and processes./srvContains the files for services like FTP and Web servers./tmpContains temporary files./usrContains system commands and utilities./varContains data files that are changed constantly.

5Operating Systems LabLinux DistributionsLinux is actually just a kernel, so to create a complete Linux system you have to install thesource code of kernel and many other freely distributed software programs.Usually distributions are put on CD that contains the kernel and programming tools andutilities.These distributions usually come with a setup program on CD to install a Linux system, theyhave the same kernel but with different interfaces. Some Linux distributions : Ubuntu Slackware SuSE Debain RedHat Fedora Turbo LinuxUbuntuCanonical started sending out free compact discs with Ubuntu Linux in 2004 and quicklybecame popular for home users (many switching from Microsoft Windows).Canonical wants Ubuntu to be an easy to use graphical Linux desktop without need to ever seea command line. Of course they also want to make a profit by selling support for Ubuntu.

6Operating Systems LabDownload Ubuntu Go to the Official Ubuntu Download Page .Choose Ubuntu 13.04, you can choose 32 bit or 64 bit then Click 'Ubuntu 13.04'.12 Click 'Not now, take me to the download ›'.

7Operating Systems LabYour download should start now.After finishing download, you have the ISO image of Ubuntu. To run Ubuntu from a USB stick, the first thing you need to do is insert a USB stick withat least 2GB of free space into your PC. The easiest way to put Ubuntu onto your stick isto use the USB installer provided at pendrivelinux.com. You’ll need to download andinstall it as follow:

8Operating Systems Lab Click 'I Agree'. Select Ubuntu Desktop Edition from the dropdown list.

9Operating Systems Lab Click 'Browse' and open the downloaded ISO file.

10Operating Systems Lab Choose the USB drive and click 'Create'.

11Operating Systems Lab Click ‘Yes’.Start installing Ubuntu on USB drive.

12Operating Systems LabInstallation complete, click ‘close’.Install Ubuntu 13.04:Most newer computers can start up from a USB stick. You should see a welcome screenprompting you to choose your language and giving you the option to either install Ubuntu or tryit from the USB as follow:Choose ‘Install Ubuntu’.

13Operating Systems LabIf your computer does not automatically do this, you might need to change the device fromwhich the computer starts up to the USB. You can usually do this by watching for a messageappearing before Windows starts. You should be invited to change the boot device. Onceyou’ve selected that option, follow the instructions on screen.Tip: You might be able to press ‘F12’ or ‘Escape’ while your computer is startingup to change your boot device order.Depending on your computer and how your USB key was formatted, you should see an entryfor ‘removable drive’ or ‘USB media’. Move this to the top of the list to force the computer tostart from USB rather than the hard disk. Save your changes and continue. Prepare to install UbuntuIt’s recommended to plug your computer into a power source.You should also make sure you have enough space on your computer to install Ubuntu.Select Download updates while installing and Install this third-party software now.You should also stay connected to the internet so you can get the latest updates while youinstall Ubuntu.

14Operating Systems Lab Set up wirelessIf you are not connected to the internet, you will be asked to select a wireless network, ifavailable. Allocate drive spaceChoose Install Ubuntu alongside another operating system.

15Operating Systems Lab Begin the installationUbuntu needs about 4.5 GB to install, so add a few extra GB to allow for your files. Theinstallation process will begin when you click the Install Now button. Select your locationIf you are connected to the internet, this should be done automatically. Check your location iscorrect and click ’continue’ to proceed.

16Operating Systems Lab Select your preferred keyboard layoutClick on the language option you need. Enter your login and password details

17Operating Systems Lab Learn more about Ubuntu while the system installs That’s it.All that’s left is to restart your computer and start enjoying Ubuntu!

18Operating Systems LabAnother way to install Ubuntu:If you have any problem in installing Ubuntu from USB drive, you can try Windows installer,which will install and uninstall Ubuntu in the same way as any other Windows application. It’ssimpler and completely safe.Once the Windows installer has been downloaded, you need to open it to install Ubuntu.To install Ubuntu, all you need to do is choose your user name and password. Do note that youneed to enter your password twice to make sure you typed it correctly.After choosing your password, click 'Install'. The files will be downloaded and installedautomatically.

19Operating Systems LabWait until Ubuntu is downloaded and installed. This can take quite a while - the downloadedfile size is around 500MB - but you can keep using your computer throughout.When the installation is complete, you’ll be prompted to restart your computer. Click 'Finish' torestart.

20Operating Systems LabAfter your computer restarts, choose 'Ubuntu' from the boot menu. Best Wishes

Introduction to Linux Eng. Eman R. Habib September, 2013 . Operating Systems Lab 2 What is an Operating System? A program that manages the computer hardware. It also provides a basis for application programs and acts as a