SlideShare a Scribd company logo
www.atozknowledge.com
 File Handling
 Text Processing
 System Administration
 Process Management
 Archival
 Network
 File Systems
 Advanced Commands
www.atozknowledge.com
 mkdir – make directories
Usage: mkdir [OPTION] DIRECTORY...
eg. mkdir hadoop
 ls – list directory contents
Usage: ls [OPTION]... [FILE]...
eg. ls, ls l, ls hadoop
 cd – changes directories
Usage: cd [DIRECTORY]
eg. cd prabhat
www.atozknowledge.com
 pwd – print name of current working directory
Usage: pwd
 vim –Vi Improved, a programmers text editor
Usage: vim [OPTION] [file]...
eg. vim file1.txt
www.atozknowledge.com
 cp – copy files and directories
Usage: cp [OPTION]... SOURCE
DEST eg. cp sample.txt sample_copy.txt
cp sample_copy.txt target_dir
 mv – move (rename) files
Usage: mv [OPTION]... SOURCE
DEST
eg. mv source.txt target_dir mv old.txt new.txt
www.atozknowledge.com
 rm – remove files or directories
Usage: rm [OPTION]... FILE...
eg. rm file1.txt , rm rf some_dir
 history – prints recently used commands
www.atozknowledge.com
 cat – concatenate files and print on the standard output
Usage: cat [OPTION] [FILE]...
eg. cat file1.txt file2.txt
 echo – display a line of text
Usage: echo [OPTION] [string] ...
eg. echo I love India
echo $HOME
www.atozknowledge.com
 grep – print lines matching a pattern
Usage: grep [OPTION] PATTERN [FILE]...
eg. grep -i apple sample.txt
 wc - print the number of newlines, words, and bytes in files
Usage: wc [OPTION]... [FILE]...
eg. wc file1.txt
 sort – sort lines of text files
Usage: sort [OPTION]... [FILE]...
eg. sort file1.txt
sort – r file1.txt
www.atozknowledge.com
 chmod – change file accesspermissions
Usage: chmod [OPTION] [MODE] [FILE]
eg. chmod 744 calculate.sh
 chown – change file owner and group
Usage: chown [OPTION]... OWNER[:[GROUP]]
FILE...
eg. chown remo myfile.txt
www.atozknowledge.com
 Numeric Permissions:
CHMOD can also to attributed by using Numeric Permissions:
 400 read by owner
040 read by group
004 read by anybody (other)
200 write by owner
020 write by group
002 write by anybody
100 execute by owner
010 execute by group
001 execute by anybody
www.atozknowledge.com
 su – change user ID or become superuser
Usage: su [OPTION] [LOGIN]
eg. su remo, su
 passwd – update a user’s authentication tokens(s)
Usage: passwd [OPTION]
eg. Passwd
 who – show who is logged on
Usage: who [OPTION]
eg. who , who -b, who -q
www.atozknowledge.com
 ps – report a snapshot of the currentprocesses
Usage: ps [OPTION]
eg. ps
 kill – to kill a process(using signal mechanism)
Usage: kill [OPTION] pid
eg. Kill -9 2275
www.atozknowledge.com
 du – estimate file space usage
Usage: du [OPTION]... [FILE]...
eg. du
 df – report filesystem disk space usage
Usage: df [OPTION]... [FILE]...
eg. df
www.atozknowledge.com
 tar – to archive a file
Usage: tar [OPTION] DEST SOURCE
eg. tar cvf/home/archive.tar
/home/original
tar xvf/home/archive.tar
 zip – package and compress (archive) files
Usage: zip [OPTION] DEST SOURSE
eg. zip original.zip original
 unzip – list, test and extract compressed
files in a ZIP archive
Usage: unzip filename
eg. unzip original.zip
www.atozknowledge.com
 ssh – SSH client (remote login program)
“ssh is a program for logging into aremote machine and for
executing commands on a remote machine”
Usage: ssh [options] [user]@hostname
eg. ssh -X guest@10.105.11.20
www.atozknowledge.com
 reboot – reboot the system
Usage: reboot [OPTION]
eg. reboot
 poweroff – power off the system
Usage: poweroff [OPTION]
eg. poweroff
www.atozknowledge.com

More Related Content

PDF
Crontab
PPT
Linux basic commands
PPTX
PPTX
Basic commands of linux
PPT
Basic 50 linus command
PDF
Useful Linux and Unix commands handbook
ODP
Linux commands
PPT
Ipc in linux
Crontab
Linux basic commands
Basic commands of linux
Basic 50 linus command
Useful Linux and Unix commands handbook
Linux commands
Ipc in linux

What's hot (20)

PDF
Linux basic commands with examples
PPTX
Introduction to Linux
PDF
Linux systems - Linux Commands and Shell Scripting
PDF
Linux File System
PPTX
Linux User Management
PDF
Basic linux commands
PPT
Linux presentation
PDF
Linux LVM Logical Volume Management
PPSX
User Administration in Linux
PDF
Shell scripting
PDF
Linux Servers
PDF
Linux directory structure by jitu mistry
PPT
Unix/Linux Basic Commands and Shell Script
PPTX
Linux and DNS Server
PPTX
Linux basic commands
PDF
Course 102: Lecture 2: Unwrapping Linux
PDF
Lesson 2 Understanding Linux File System
PDF
An Introduction To Linux
PPTX
Unix Linux Commands Presentation 2013
PPTX
Presentation on samba server
Linux basic commands with examples
Introduction to Linux
Linux systems - Linux Commands and Shell Scripting
Linux File System
Linux User Management
Basic linux commands
Linux presentation
Linux LVM Logical Volume Management
User Administration in Linux
Shell scripting
Linux Servers
Linux directory structure by jitu mistry
Unix/Linux Basic Commands and Shell Script
Linux and DNS Server
Linux basic commands
Course 102: Lecture 2: Unwrapping Linux
Lesson 2 Understanding Linux File System
An Introduction To Linux
Unix Linux Commands Presentation 2013
Presentation on samba server
Ad

Similar to Basic Linux commands (20)

PPTX
Marwan al suwaidi
PDF
Linux basics and commands - from lynxbee.com
PDF
PDF
Linux commands
PDF
Linux commands
PDF
Lesson 3 Working with Files in Linux
PDF
PPT
Raj linux
PPTX
An Introduction to Linux
PDF
Unix command
PPT
Common linux ubuntu commands overview
PDF
Linux command line cheatsheet
PPT
8.1.intro unix
PDF
Linux Commands CheatSheet - PDF.pdf for engineer
PDF
Basics of Linux
PPT
Linux ppt
PPTX
PPT
Unix fundamentals
PPTX
Marwan al suwaidi
Linux basics and commands - from lynxbee.com
Linux commands
Linux commands
Lesson 3 Working with Files in Linux
Raj linux
An Introduction to Linux
Unix command
Common linux ubuntu commands overview
Linux command line cheatsheet
8.1.intro unix
Linux Commands CheatSheet - PDF.pdf for engineer
Basics of Linux
Linux ppt
Unix fundamentals
Ad

Recently uploaded (20)

PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Institutional Correction lecture only . . .
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PDF
RMMM.pdf make it easy to upload and study
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
Pre independence Education in Inndia.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
Supply Chain Operations Speaking Notes -ICLT Program
Institutional Correction lecture only . . .
Week 4 Term 3 Study Techniques revisited.pptx
RMMM.pdf make it easy to upload and study
O7-L3 Supply Chain Operations - ICLT Program
TR - Agricultural Crops Production NC III.pdf
Anesthesia in Laparoscopic Surgery in India
Renaissance Architecture: A Journey from Faith to Humanism
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Microbial diseases, their pathogenesis and prophylaxis
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Final Presentation General Medicine 03-08-2024.pptx
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
Pre independence Education in Inndia.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf

Basic Linux commands

  • 2.  File Handling  Text Processing  System Administration  Process Management  Archival  Network  File Systems  Advanced Commands www.atozknowledge.com
  • 3.  mkdir – make directories Usage: mkdir [OPTION] DIRECTORY... eg. mkdir hadoop  ls – list directory contents Usage: ls [OPTION]... [FILE]... eg. ls, ls l, ls hadoop  cd – changes directories Usage: cd [DIRECTORY] eg. cd prabhat www.atozknowledge.com
  • 4.  pwd – print name of current working directory Usage: pwd  vim –Vi Improved, a programmers text editor Usage: vim [OPTION] [file]... eg. vim file1.txt www.atozknowledge.com
  • 5.  cp – copy files and directories Usage: cp [OPTION]... SOURCE DEST eg. cp sample.txt sample_copy.txt cp sample_copy.txt target_dir  mv – move (rename) files Usage: mv [OPTION]... SOURCE DEST eg. mv source.txt target_dir mv old.txt new.txt www.atozknowledge.com
  • 6.  rm – remove files or directories Usage: rm [OPTION]... FILE... eg. rm file1.txt , rm rf some_dir  history – prints recently used commands www.atozknowledge.com
  • 7.  cat – concatenate files and print on the standard output Usage: cat [OPTION] [FILE]... eg. cat file1.txt file2.txt  echo – display a line of text Usage: echo [OPTION] [string] ... eg. echo I love India echo $HOME www.atozknowledge.com
  • 8.  grep – print lines matching a pattern Usage: grep [OPTION] PATTERN [FILE]... eg. grep -i apple sample.txt  wc - print the number of newlines, words, and bytes in files Usage: wc [OPTION]... [FILE]... eg. wc file1.txt  sort – sort lines of text files Usage: sort [OPTION]... [FILE]... eg. sort file1.txt sort – r file1.txt www.atozknowledge.com
  • 9.  chmod – change file accesspermissions Usage: chmod [OPTION] [MODE] [FILE] eg. chmod 744 calculate.sh  chown – change file owner and group Usage: chown [OPTION]... OWNER[:[GROUP]] FILE... eg. chown remo myfile.txt www.atozknowledge.com
  • 10.  Numeric Permissions: CHMOD can also to attributed by using Numeric Permissions:  400 read by owner 040 read by group 004 read by anybody (other) 200 write by owner 020 write by group 002 write by anybody 100 execute by owner 010 execute by group 001 execute by anybody www.atozknowledge.com
  • 11.  su – change user ID or become superuser Usage: su [OPTION] [LOGIN] eg. su remo, su  passwd – update a user’s authentication tokens(s) Usage: passwd [OPTION] eg. Passwd  who – show who is logged on Usage: who [OPTION] eg. who , who -b, who -q www.atozknowledge.com
  • 12.  ps – report a snapshot of the currentprocesses Usage: ps [OPTION] eg. ps  kill – to kill a process(using signal mechanism) Usage: kill [OPTION] pid eg. Kill -9 2275 www.atozknowledge.com
  • 13.  du – estimate file space usage Usage: du [OPTION]... [FILE]... eg. du  df – report filesystem disk space usage Usage: df [OPTION]... [FILE]... eg. df www.atozknowledge.com
  • 14.  tar – to archive a file Usage: tar [OPTION] DEST SOURCE eg. tar cvf/home/archive.tar /home/original tar xvf/home/archive.tar  zip – package and compress (archive) files Usage: zip [OPTION] DEST SOURSE eg. zip original.zip original  unzip – list, test and extract compressed files in a ZIP archive Usage: unzip filename eg. unzip original.zip www.atozknowledge.com
  • 15.  ssh – SSH client (remote login program) “ssh is a program for logging into aremote machine and for executing commands on a remote machine” Usage: ssh [options] [user]@hostname eg. ssh -X guest@10.105.11.20 www.atozknowledge.com
  • 16.  reboot – reboot the system Usage: reboot [OPTION] eg. reboot  poweroff – power off the system Usage: poweroff [OPTION] eg. poweroff www.atozknowledge.com