Docsity

Introduction to Linux-Linux-Lecture Slides, Slides of Linux skills

Partial preview of the text

Download Introduction to Linux-Linux-Lecture Slides and more Slides Linux skills in PDF only on Docsity!

Dr. Hanif Durad

Lecture Outline (1/2)

Login Through Putty

Reading Date from system

Changing Password

Taking Calendar

UNIX Name You are Using

Who Logged on the System

User id

The Basics: Moving Around Directories

Logging out

Dr. Hanif Durad

Lecture Outline (2/2)^ 

Linux File System Layout

File Permissions

tar command

Linux Built-in Compilers

Job Control & Monitoring Processes

Basic Shell Script

Environment variables

Reading Date from system[hanif@lgpc-01 ~]$ dateThu Mar 1 10:39:38 PKT 2012

Dr. Hanif Durad

Changing Password[hanif@lgpc-01 ~]$ passwdpasswd:

Changing password for hanif

Old Password:New Password:Re-enter Password:In this way your old password is changed.

Dr. Hanif Durad

UNIX Name You are Using

[hanif@lgpc-01 ~]$ unameLinux[hanif@lgpc-01 ~]$ uname -aLinux lgpc-01.pieas.labgrid 2.6.32-131.0.15.el6.x86_

#1 SMP Sat May 21 10:27:57 CDT 2011 x86_64x86_64 x86_64 GNU/Linux

Dr. Hanif Durad

Who Logged on the System

[hanif@lgpc-01 ~]$ whoasif

pts/

hanif

pts/

[hanif@lgpc-01 ~]$ w

10:58:48 up 6 days, 20:48, 2 users, load average: 0.13, 0.16, 0. USER

TTY

FROM

LOGIN@

IDLE

JCPU

PCPU

WHAT

asif

pts/

0.00s 0.00s -bash

hanif

pts/

0.00s 0.08s 0.00s w

Dr. Hanif Durad

The Basics: Moving Around

pwd: print working directorycd : change working directory~ : home directory. : current directory/ : root directory, or directory separator.. : parent directory

Hisham, P-

Dr. Hanif Durad

Logging out[hanif@lgpc-01 ~]$ exit

Dr. Hanif Durad

File & Directory Basics

Dr. Hanif Durad

Files Types

Ordinary files.

Text files

Data files

Command files

Executable files

Directories.

Special device files.

Links

Dr. Hanif Durad

Dr. Hanif Durad

Linux File System Layout (2/3)

Ummi-Hani, P-23/

Linux File System Layout (3/3)

[hanif@lgpc-01 ~]$ ls /bin

dev

lib

media net

root

srv

tmp

boot

etc

lib

misc

opt

sbin

storage usr

cgroup home lost+found mnt

proc selinux sys

var

Dr. Hanif Durad

Looking at file(s)

[hanif@lgpc-01 ~]$ cat han1.txtThis is my first file.[hanif@lgpc-01 ~]$ more han1.txtThis is my first file.[hanif@lgpc-01 ~]$ head han1.txt[hanif@lgpc-01 ~]$ tail han1.txt

Dr. Hanif Durad

Listing files (1/6)

Use ‘ls’ command for listing the directory contents[hanif@lgpc-01 ~]$ ls

Without any arguments ls lists the files ofcurrent directory in alphabetical order.

Dr. Hanif Durad