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

What's hot

What's hot (20)

Linux commands
Linux commandsLinux commands
Linux commands
 
Basic commands
Basic commandsBasic commands
Basic commands
 
BASIC COMMANDS OF LINUX
BASIC COMMANDS OF LINUXBASIC COMMANDS OF LINUX
BASIC COMMANDS OF LINUX
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
 
Common linux ubuntu commands overview
Common linux  ubuntu commands overviewCommon linux  ubuntu commands overview
Common linux ubuntu commands overview
 
Basic Linux day 2
Basic Linux day 2Basic Linux day 2
Basic Linux day 2
 
Linux command for beginners
Linux command for beginnersLinux command for beginners
Linux command for beginners
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
 
Linux basic commands with examples
Linux basic commands with examplesLinux basic commands with examples
Linux basic commands with examples
 
Useful Linux and Unix commands handbook
Useful Linux and Unix commands handbookUseful Linux and Unix commands handbook
Useful Linux and Unix commands handbook
 
Quick Guide with Linux Command Line
Quick Guide with Linux Command LineQuick Guide with Linux Command Line
Quick Guide with Linux Command Line
 
Terminal Commands (Linux - ubuntu) (part-1)
Terminal Commands  (Linux - ubuntu) (part-1)Terminal Commands  (Linux - ubuntu) (part-1)
Terminal Commands (Linux - ubuntu) (part-1)
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Linux Basic commands and VI Editor
Linux Basic commands and VI EditorLinux Basic commands and VI Editor
Linux Basic commands and VI Editor
 
Top 10 Random Linux/Ubuntu Commands
Top 10 Random Linux/Ubuntu CommandsTop 10 Random Linux/Ubuntu Commands
Top 10 Random Linux/Ubuntu Commands
 
Important Linux Commands
Important Linux CommandsImportant Linux Commands
Important Linux Commands
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Basic
BasicBasic
Basic
 
Linux basics
Linux basicsLinux basics
Linux basics
 

Similar to Basic Linux commands

An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to Linux
Dimas Prasetyo
 
Unix command
Unix commandUnix command
Unix command
Atul Pant
 
8.1.intro unix
8.1.intro unix8.1.intro unix
8.1.intro unix
southees
 
Unix fundamentals
Unix fundamentalsUnix fundamentals
Unix fundamentals
Dima Gomaa
 

Similar to Basic Linux commands (20)

Marwan al suwaidi
Marwan al suwaidiMarwan al suwaidi
Marwan al suwaidi
 
Linux basics and commands - from lynxbee.com
Linux basics and commands - from lynxbee.comLinux basics and commands - from lynxbee.com
Linux basics and commands - from lynxbee.com
 
Linux
LinuxLinux
Linux
 
Unix cmd
Unix cmdUnix cmd
Unix cmd
 
Linux commands
Linux commands Linux commands
Linux commands
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Lesson 3 Working with Files in Linux
Lesson 3 Working with Files in LinuxLesson 3 Working with Files in Linux
Lesson 3 Working with Files in Linux
 
Linux 101
Linux 101Linux 101
Linux 101
 
Raj linux
Raj linux Raj linux
Raj linux
 
An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to Linux
 
Unix command
Unix commandUnix command
Unix command
 
Linux command line cheatsheet
Linux command line cheatsheetLinux command line cheatsheet
Linux command line cheatsheet
 
8.1.intro unix
8.1.intro unix8.1.intro unix
8.1.intro unix
 
Basics of Linux
Basics of LinuxBasics of Linux
Basics of Linux
 
Linux ppt
Linux pptLinux ppt
Linux ppt
 
Linux
LinuxLinux
Linux
 
Unix fundamentals
Unix fundamentalsUnix fundamentals
Unix fundamentals
 
Linux
LinuxLinux
Linux
 
basic-unix.pdf
basic-unix.pdfbasic-unix.pdf
basic-unix.pdf
 
workshop_1.ppt
workshop_1.pptworkshop_1.ppt
workshop_1.ppt
 

Recently uploaded

plant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated cropsplant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated crops
parmarsneha2
 

Recently uploaded (20)

Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
NCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdfNCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdf
 
Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resources
 
plant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated cropsplant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated crops
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptx
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 

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