0% found this document useful (0 votes)
44 views15 pages

Linux Tutorial

The document provides an introduction and overview of the Linux operating system. It describes the benefits of Linux, explains the directory structure, and gives examples of basic commands for file management, networking, tasks, and utilities.

Uploaded by

Himanshu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views15 pages

Linux Tutorial

The document provides an introduction and overview of the Linux operating system. It describes the benefits of Linux, explains the directory structure, and gives examples of basic commands for file management, networking, tasks, and utilities.

Uploaded by

Himanshu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

LINUX TUTORIAL

Contents
Benefits

of using Linux

Linux

Directory Structure

Basic

Commands and Utilities

File Management
Network
Task Management
Misc Utilities

07/08/15 12:23:02

IIT Delhi

Benefits of using Linux


Very stable, no need to restart after installing a software.

Its free and open-source.


Freedom from viruses! No need to install anti-viruses!
Best operating system for programming and
development.
Excellent networking capability inbuilt.
Provides multi-user, multi-tasking environment.
Thousands of free applets, tools and programs.
Got stuck? Get help from big online communities.
No need to install drivers.

07/08/15 12:23:02

IIT Delhi

Introduction to Unix/Linux as
OS
Linux

directory structure

/ - Root directory
/home - Home directory.
Contains all user files.
/bin - Most commonly used
07/08/15 12:23:02

IIT Delhi

Basic Commands and


Utilities
File Commands
Home settings
Network logins
Backups
Internet
Miscellaneous

07/08/15 12:23:02

IIT Delhi

Help Commands
man

<command> : manual pages

command
apropos
whatis

help

: finding the right command

: a brief description of

07/08/15 12:23:02

IIT Delhi

File Commands
Unix

directory structure revisited

'cd ~' change directory to your home


'cd ..' change directory to upper directory
'cd / ' change directory to root

Excercise:

cd
cd
cd
cd

/home/suvadip/Desktop

.
/home/../etc

07/08/15 12:23:02

IIT Delhi

File Commands
ls: list the files,

-a option means 'list all', will show hidden files.


all filenames starting with . are hidden file

mkdir <directryname> making new folders


touch, gedit <filename> creates new text file
rm, removing a file

'rm -i' will ask are you sure that you want to delete
'rm -r' will do everything recursivily

rmdir, remove directory


cp: copy
mv: rename or move
> : dump output to a text file

07/08/15 12:23:02

IIT Delhi

File Commands: Exercise


1.In

you Desktop create two file named


my.txt in folder ./Desktop/1/2/
2.Write your name and phone number in
my.txt using gedit.
3.View your name with cat command
4.Find our what does pwd command do.
5.Copy my.txt to ./Desktop/3/4/
6.Dump the contents of / in ./4/list.txt
7.From your Desktop delete folder 1
07/08/15 12:23:02

IIT Delhi

File Commands
Permissions

important for sharing your files


and restricting access on your work

'chmod 755' => rwx rwx rwx (user group all)


use ls l to view file permissions
Important filters
'grep word path/filename', grep find a word in a file
pipes ' | ' : redirect output of one command to other
command
find utility help to find a file by filename
find path name filename will find the location of file
in given path. Useful command as we can use wild
card pattern

07/08/15 12:23:02

IIT Delhi

10

File Commands: Exercise


1.Search

from your desktop and find all the


files ending with .txt
2.In your desktop make contents of folder 3
read-only.
3.Try deleting folder 3
4.Use grep to find your phone number in
my.txt

07/08/15 12:23:02

IIT Delhi

11

Using Network
ping

check which port is open or not.

ifconfig

know your ip settings, modify them.

SSH
ssh is a secure shall, X-settings are default
ssh X [email protected]
su username switch user command used for switching user on same
machine
Use

sftp to transfer files through ssh

07/08/15 12:23:02

IIT Delhi

12

Miscellaneous
Unix

process ps, fg, bg, kill, &


ps gives the list of processes
kill can kill a process, you have to write pid
given by ps
Writing & in and of a command will force
process to run in background
ctrl z for suspending a process, ctrl c to kill
a process
bg running a process in background
fg bringing a process in foreground
Finger, who
finger gives list of user on a machine
finger username will give some details
about user name shell etc
finger user@desh will tell when user has
last checked his mails
who gives all users on 07/08/15
a machine
12:23:02 IIT Delhi

13

Miscellaneous
Change password- passwd, yppasswd.
Disk space limitation quota, du

quota v username will tell your status of


quota
du sh filename tells disk usage of a file

07/08/15 12:23:02

IIT Delhi

14

Conclusion
Self help is the best help!

07/08/15 12:23:02

IIT Delhi

15

You might also like