Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Linux System Overview and Basic Commands, Exercises of Computer Fundamentals

An overview of the linux operating system, including its kernel and shell, multi-user and multi-process capabilities, and directory structure. It also covers basic linux commands such as ls, cd, cp, mv, rm, pwd, mkdir, rmdir, cat, less, man, su, passwd, useradd, userdel, mount, umount, df, and shutdown.

Typology: Exercises

2011/2012

Uploaded on 07/31/2012

karthik
karthik 🇮🇳

4.6

(16)

95 documents

1 / 32

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Outline
1. Overview of Linux System
2. Basic Commands
3. Relative & Absolute Path
4. Redirect, Append and Pipe
5. Permission
6. Process Management
7. Install Software
8. Text Editor
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20

Partial preview of the text

Download Linux System Overview and Basic Commands and more Exercises Computer Fundamentals in PDF only on Docsity!

Outline

1. Overview of Linux System

2. Basic Commands

3. Relative & Absolute Path

4. Redirect, Append and Pipe

5. Permission

6. Process Management

7. Install Software

8. Text Editor

Overview of Linux System

Kernel & Shell  (^) Linux is operating system (OS).  (^) Linux system is described as kernel & shell.  (^) Kernel is a main program of Linux system.It controls hard wares, CPU, memory, hard disk, network card etc.  (^) Shell is an interface between user and kernel. Shell interprets your input as commands and pass them to kernel. Kernel Shell User input

Linux Overview (cont.)

Directory Structure

 Files are put in a directory.  All directories are in a hierarchical structure (tree structure).  User can put and remove any directories on the tree.  Top directory is “/”, which is called slash or root.  Users have the own directory. (home directory)

Linux Overview (cont.)

Directory Structure

Linux Overview (cont.)

Important Directories

 (^) /dev This contains various devices as files, e.g. hard disk, CD ROM drive, etc.  (^) /root This is the root (administrator) user's home directory  (^) /sbin Binaries which are only expected to be used by the super user.  /tmp Temporary files.  (^) /boot Has the bootable Linux kernel and boot loaderconfiguration files(GRUB)  (^) /usr Contains user documentation,games,graphical files,libraries(lib),etc..

Linux Overview (cont.)

Normal user and Super user  (^) In Linux system, there is one special user for administrator, which can do anything.  (^) This special user is called root or superuser. Case Sensitivity  (^) Linux like UNIX is case sensitive.  (^) MYFILE.doc, Myfile.doc, mYfiLe.Doc are different. Online Manual  (^) Linux has well written online manuals.

Basic Commands

How to run commands  (^) Between command name, options and arguments, space is necessary.  (^) Opitions always start with “ ”  (^) Example) cd .. ls –l .bashrc mv fileA fileB

Basic Commands

Commands

 ls show files in current position  cd change directory  cp copy file or directory  mv move file or directory  rm remove file or directory  pwd show current position  mkdir create directory  rmdir remove directory  cat display file contents  less display file contents pagewise  man display online manual

Practice Basic Commands

  1. Type following command in your directory. ls ls –a ls –la ls Fa
  2. Make a directory mkdir linux pwd cd linux pwd cd pwd rmdir linux 3. In your home directory, ls .bash_profile cp .bash_profile sample.txt less sample.txt (note: to quit less, press “q”) rm sample.txt 4. Try to change your password, passwd username (Type current password once, then type new password twice. You don’t have to change password here. Just a practice) 5. check disk space usage df df h

Relative & Absolute Path

 Path means a position in the directory tree.  To express a path, you can use relative path or absolute path.  In relative path expression, the path is not defined uniquely, depends on your current path.  In absolute path expression, the path is defined uniquely, does not depend on your current path.

Relative & Absolute Path

 (^) Use relative path. In home directory, type pwd cd. pwd cd .. pwd cd .. pwd cd  (^) Use absolute path. In home directory, type pwd cd /home/cswug pwd cd /home pwd cd / pwd cd /home/cswug

Redirect, Append and Pipe

Redirect and append

 (^) Output of command is displayed on screen.  (^) Using “>”, you can redirect the output from screen to a file.  (^) Using “>>” you can append the output to the bottom of the file.

Pipe

 (^) Some commands require input from a file or other commands.  (^) Using “|”, you can use output from other command as input to the command.

Redirect, Append and Pipe

 (^) In home directory, type ls .bash_profile cp .bash_profile sample.txt less sample.txt  (^) Use redirect. head 3 sample.txt head 3 sample.txt > redirect.txt  (^) Use append. tail 3 sample.txt tail 3 sample.txt >> redirect.txt less redirect.txt  (^) Use pipe. less redirect.txt grep PATH redirect.txt tail redirect.txt | grep PATH rm sample.txt rm redirect.txt

Permission

 All of files and directories have owner and permission.  There are three types of permission, readable, writeable and executable.  Permissions are given to three kinds of group. owner, group member and others. Example) [cswug@hyperion001 cswug]$ ls l .bash_profile rw r r 1 cswug cswug 191 Jan 4 13:11 .bash_profile  (^) r: readable, w:writable, x: executable