SlideShare a Scribd company logo
Linux Commands
File Commands
1.
2.
3.
4.
5.
6.
7.
8.
9.
ls
ls -al
ls -lt
cd dir
cd
pwd
mkdir dir
cat >file
more file
Directory listing
Formatted listing with hidden files
Sorting the Formatted listing by time modification
Change directory to dir
Change to home directory
Show current working directory
Creating a directory dir
Places the standard input into the file
Output the contents of the file
Output the first 10 lines of the file
Output the last 10 lines of the file
Output the contents of file as it grows,starting with
the last 10 lines
Create or update file
Deleting the file
Deleting the directory
Force to remove the file
Force to remove the directory dir
Copy the contents of file1 to file2
Copy dir1 to dir2;create dir2 if not present
Rename or move file1 to file2,if file2 is an existing
directory
Create symbolic link link to file
10. head file
11. tail file
12. tail -f file
13. touch file
14. rm file
15. rm -r dir
16. rm -f file
17. rm -rf dir
18. cp file1 file2
19. cp -r dir1 dir2
20. mv file1 file2
21. ln -s file link
Process management
1.
2.
ps
top
To display the currently working processes
Display all running process
SHIVA BHARDWAJ
SHIVA BHARDWAJ
3.
4.
5.
6.
7.
8.
kill pid
killall proc
pkill pattern
bg
fg
fg n
Kill the process with given pid
Kill all the process named proc
Will kill all processes matching the pattern
List stopped or background jobs,resume a stopped
job in the background
Brings the most recent job to foreground
Brings job n to the foreground
File permission
1. chmod octal file Change the permission of file to octal,which can
be found separately for user,group,world by
adding,
•4-read(r)
•2-write(w)
•1-execute(x)
Searching
1.
2.
3.
4.
5.
grep pattern file
grep -r pattern dir
command | grep
pattern
locate file
find . -name filename
Search for pattern in file
Search recursively for pattern in dir
Search pattern in the output of a command
Find all instances of file
Searches in the current directory (represented by
a period) and below it, for files and directories with
names starting with filename
Searches for all the named processes , that
matches with the pattern and, by default, returns
their ID
6. pgrep pattern
System Info
1.
2.
3.
4.
5.
date
cal
uptime
w
whoami
Show the current date and time
Show this month's calender
Show current uptime
Display who is on line
Who you are logged in as
SHIVA BHARDWAJ
6.
7.
8.
9.
finger user
uname -a
cat /proc/cpuinfo
cat proc/meminfo
Display information about user
Show kernel information
Cpu information
Memory information
Show the manual for command
Show the disk usage
Show directory space usage
Show memory and swap usage
Show possible locations of app
Show which applications will be run by default
10. man command
11. df
12. du
13. free
14. whereis app
15. which app
Compression
1.
2.
3.
4.
5.
6.
7.
8.
tar cf file.tar file
tar xf file.tar
tar czf file.tar.gz files
tar xzf file.tar.gz
tar cjf file.tar.bz2
tar xjf file.tar.bz2
gzip file
gzip -d file.gz
Create tar named file.tar containing file
Extract the files from file.tar
Create a tar with Gzip compression
Extract a tar using Gzip
Create tar with Bzip2 compression
Extract a tar using Bzip2
Compresses file and renames it to file.gz
Decompresses file.gz back to file
Network
1.
2.
3.
4.
5.
6.
ping host
whois domain
dig domain
dig -x host
wget file
wget -c file
Ping host and output results
Get whois information for domains
Get DNS information for domain
Reverse lookup host
Download file
Continue a stopped download
SHIVA BHARDWAJ
Shortcuts
1.
2.
3.
4.
5.
6.
7.
8.
ctrl+c
ctrl+z
ctrl+d
ctrl+w
ctrl+u
ctrl+r
!!
exit
Halts the current command
Stops the current command, resume with fg in the
foreground or bg in the background
Logout the current session, similar to exit
Erases one word in the current line
Erases the whole line
Type to bring up a recent command
Repeats the last command
Logout the current session

More Related Content

What's hot

Linux commands
Linux commandsLinux commands
Linux commands
3lik
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
Sagar Kumar
 
Linux commands
Linux commandsLinux commands
Linux commands
penetration Tester
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structure
Sreenatha Reddy K R
 
Linux commands
Linux commandsLinux commands
Linux commands
Radheshyam Kori
 
Basic commands of linux
Basic commands of linuxBasic commands of linux
Basic commands of linux
shravan saini
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
MohanKumar Palanichamy
 
Red Hat Linux cheat sheet
Red Hat Linux cheat sheetRed Hat Linux cheat sheet
Red Hat Linux cheat sheet
Rafael Montesinos Muñoz
 
Basic
BasicBasic
Basic
ARYA TM
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
Dheeraj Nambiar
 
Basic unix commands
Basic unix commandsBasic unix commands
Basic unix commands
swtjerin4u
 
Linux commands
Linux commandsLinux commands
Linux commands
Meenu Chopra
 
Know the UNIX Commands
Know the UNIX CommandsKnow the UNIX Commands
Know the UNIX Commands
Brahma Killampalli
 
Anandha ganesh linux1.ppt
Anandha ganesh linux1.pptAnandha ganesh linux1.ppt
Anandha ganesh linux1.ppt
anandha ganesh
 
Unix made easy
Unix made easyUnix made easy
Unix made easy
Sunil Kumar Gunasekaran
 
Basic Linux day 2
Basic Linux day 2Basic Linux day 2
Basic Linux day 2
Saikumar Daram
 
Bind How To
Bind How ToBind How To
Bind How To
cntlinux
 
BIND DNS Configuration Red Hat 5
BIND DNS Configuration Red Hat 5BIND DNS Configuration Red Hat 5
BIND DNS Configuration Red Hat 5
Cheri Amour Calicdan
 

What's hot (18)

Linux commands
Linux commandsLinux commands
Linux commands
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structure
 
Linux commands
Linux commandsLinux commands
Linux 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
 
Red Hat Linux cheat sheet
Red Hat Linux cheat sheetRed Hat Linux cheat sheet
Red Hat Linux cheat sheet
 
Basic
BasicBasic
Basic
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
 
Basic unix commands
Basic unix commandsBasic unix commands
Basic unix commands
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Know the UNIX Commands
Know the UNIX CommandsKnow the UNIX Commands
Know the UNIX Commands
 
Anandha ganesh linux1.ppt
Anandha ganesh linux1.pptAnandha ganesh linux1.ppt
Anandha ganesh linux1.ppt
 
Unix made easy
Unix made easyUnix made easy
Unix made easy
 
Basic Linux day 2
Basic Linux day 2Basic Linux day 2
Basic Linux day 2
 
Bind How To
Bind How ToBind How To
Bind How To
 
BIND DNS Configuration Red Hat 5
BIND DNS Configuration Red Hat 5BIND DNS Configuration Red Hat 5
BIND DNS Configuration Red Hat 5
 

Viewers also liked

LINUX
LINUX LINUX
industrial psychology 2
industrial psychology 2industrial psychology 2
industrial psychology 2
Shiva Bhardwaj
 
Industrial psychology
Industrial   psychologyIndustrial   psychology
Industrial psychology
Manpreet Saini
 
Industrial psychology by_pawan_tripathi_e_book___2014_09_07_15_23_42_168
Industrial psychology by_pawan_tripathi_e_book___2014_09_07_15_23_42_168Industrial psychology by_pawan_tripathi_e_book___2014_09_07_15_23_42_168
Industrial psychology by_pawan_tripathi_e_book___2014_09_07_15_23_42_168
Pawan Tripathi
 
Industrial/ Organisational Psychology
Industrial/ Organisational PsychologyIndustrial/ Organisational Psychology
Industrial/ Organisational Psychology
Muhammad Abdullah
 
Industrial Psychology
Industrial PsychologyIndustrial Psychology
Industrial Psychology
Rafael Labunog
 
Leach
Leach Leach

Viewers also liked (7)

LINUX
LINUX LINUX
LINUX
 
industrial psychology 2
industrial psychology 2industrial psychology 2
industrial psychology 2
 
Industrial psychology
Industrial   psychologyIndustrial   psychology
Industrial psychology
 
Industrial psychology by_pawan_tripathi_e_book___2014_09_07_15_23_42_168
Industrial psychology by_pawan_tripathi_e_book___2014_09_07_15_23_42_168Industrial psychology by_pawan_tripathi_e_book___2014_09_07_15_23_42_168
Industrial psychology by_pawan_tripathi_e_book___2014_09_07_15_23_42_168
 
Industrial/ Organisational Psychology
Industrial/ Organisational PsychologyIndustrial/ Organisational Psychology
Industrial/ Organisational Psychology
 
Industrial Psychology
Industrial PsychologyIndustrial Psychology
Industrial Psychology
 
Leach
Leach Leach
Leach
 

Similar to Linux commands

some title
some titlesome title
some title
PlanetExpressATX
 
Linuxcommands
LinuxcommandsLinuxcommands
Linuxcommands
Lokendra Tiwari
 
linuxcommands.pdf
linuxcommands.pdflinuxcommands.pdf
linuxcommands.pdf
SatishReddy212
 
Basic Linux Commands.pptx
Basic Linux Commands.pptxBasic Linux Commands.pptx
Basic Linux Commands.pptx
ssuser243be2
 
Introduction to linux day1
Introduction to linux day1Introduction to linux day1
Introduction to linux day1
UtpalenduChakrobortt1
 
Linux ppt
Linux pptLinux ppt
Linux ppt
Sanmuga Nathan
 
3.1.a linux commands reference
3.1.a linux commands reference3.1.a linux commands reference
3.1.a linux commands reference
Acácio Oliveira
 
Unix Basics For Testers
Unix Basics For TestersUnix Basics For Testers
Unix Basics For Testers
nitin lakhanpal
 
Management file and directory in linux
Management file and directory in linuxManagement file and directory in linux
Management file and directory in linux
Zkre Saleh
 
14.Linux Command
14.Linux Command14.Linux Command
14.Linux Command
Export Promotion Bureau
 
Introduction to linux2
Introduction to linux2Introduction to linux2
Introduction to linux2
Gourav Varma
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
Muhammad Qazi
 
Linux file system nevigation
Linux file system nevigationLinux file system nevigation
Linux file system nevigation
hetaldobariya
 
Directories description
Directories descriptionDirectories description
Directories description
Dr.M.Karthika parthasarathy
 
Unit 7
Unit 7Unit 7
Unit 7
siddr
 
Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013
Wave Digitech
 
The one page linux manual
The one page linux manualThe one page linux manual
The one page linux manual
Saikat Rakshit
 
The one page linux manual
The one page linux manualThe one page linux manual
The one page linux manual
Craig Cannon
 
linux commands.pdf
linux commands.pdflinux commands.pdf
linux commands.pdf
amitkamble79
 
linux-file-system01.ppt
linux-file-system01.pptlinux-file-system01.ppt
linux-file-system01.ppt
MeesanRaza
 

Similar to Linux commands (20)

some title
some titlesome title
some title
 
Linuxcommands
LinuxcommandsLinuxcommands
Linuxcommands
 
linuxcommands.pdf
linuxcommands.pdflinuxcommands.pdf
linuxcommands.pdf
 
Basic Linux Commands.pptx
Basic Linux Commands.pptxBasic Linux Commands.pptx
Basic Linux Commands.pptx
 
Introduction to linux day1
Introduction to linux day1Introduction to linux day1
Introduction to linux day1
 
Linux ppt
Linux pptLinux ppt
Linux ppt
 
3.1.a linux commands reference
3.1.a linux commands reference3.1.a linux commands reference
3.1.a linux commands reference
 
Unix Basics For Testers
Unix Basics For TestersUnix Basics For Testers
Unix Basics For Testers
 
Management file and directory in linux
Management file and directory in linuxManagement file and directory in linux
Management file and directory in linux
 
14.Linux Command
14.Linux Command14.Linux Command
14.Linux Command
 
Introduction to linux2
Introduction to linux2Introduction to linux2
Introduction to linux2
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
Linux file system nevigation
Linux file system nevigationLinux file system nevigation
Linux file system nevigation
 
Directories description
Directories descriptionDirectories description
Directories description
 
Unit 7
Unit 7Unit 7
Unit 7
 
Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013
 
The one page linux manual
The one page linux manualThe one page linux manual
The one page linux manual
 
The one page linux manual
The one page linux manualThe one page linux manual
The one page linux manual
 
linux commands.pdf
linux commands.pdflinux commands.pdf
linux commands.pdf
 
linux-file-system01.ppt
linux-file-system01.pptlinux-file-system01.ppt
linux-file-system01.ppt
 

Recently uploaded

220711130100 udita Chakraborty Aims and objectives of national policy on inf...
220711130100 udita Chakraborty  Aims and objectives of national policy on inf...220711130100 udita Chakraborty  Aims and objectives of national policy on inf...
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
Kalna College
 
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGHKHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
shreyassri1208
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
 
Observational Learning
Observational Learning Observational Learning
Observational Learning
sanamushtaq922
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
 
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
Payaamvohra1
 
Ch-4 Forest Society and colonialism 2.pdf
Ch-4 Forest Society and colonialism 2.pdfCh-4 Forest Society and colonialism 2.pdf
Ch-4 Forest Society and colonialism 2.pdf
lakshayrojroj
 
How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17
Celine George
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
nitinpv4ai
 
BPSC-105 important questions for june term end exam
BPSC-105 important questions for june term end examBPSC-105 important questions for june term end exam
BPSC-105 important questions for june term end exam
sonukumargpnirsadhan
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
Iris Thiele Isip-Tan
 
How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17
Celine George
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
EduSkills OECD
 
欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】
欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】
欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】
andagarcia212
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
سمير بسيوني
 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
Mohammad Al-Dhahabi
 
Simple-Present-Tense xxxxxxxxxxxxxxxxxxx
Simple-Present-Tense xxxxxxxxxxxxxxxxxxxSimple-Present-Tense xxxxxxxxxxxxxxxxxxx
Simple-Present-Tense xxxxxxxxxxxxxxxxxxx
RandolphRadicy
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
nitinpv4ai
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
nitinpv4ai
 
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptxCapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapitolTechU
 

Recently uploaded (20)

220711130100 udita Chakraborty Aims and objectives of national policy on inf...
220711130100 udita Chakraborty  Aims and objectives of national policy on inf...220711130100 udita Chakraborty  Aims and objectives of national policy on inf...
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
 
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGHKHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
 
Observational Learning
Observational Learning Observational Learning
Observational Learning
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
 
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
 
Ch-4 Forest Society and colonialism 2.pdf
Ch-4 Forest Society and colonialism 2.pdfCh-4 Forest Society and colonialism 2.pdf
Ch-4 Forest Society and colonialism 2.pdf
 
How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
 
BPSC-105 important questions for june term end exam
BPSC-105 important questions for june term end examBPSC-105 important questions for june term end exam
BPSC-105 important questions for june term end exam
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
 
How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
 
欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】
欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】
欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
 
Simple-Present-Tense xxxxxxxxxxxxxxxxxxx
Simple-Present-Tense xxxxxxxxxxxxxxxxxxxSimple-Present-Tense xxxxxxxxxxxxxxxxxxx
Simple-Present-Tense xxxxxxxxxxxxxxxxxxx
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
 
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptxCapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
 

Linux commands

  • 1.
  • 2. Linux Commands File Commands 1. 2. 3. 4. 5. 6. 7. 8. 9. ls ls -al ls -lt cd dir cd pwd mkdir dir cat >file more file Directory listing Formatted listing with hidden files Sorting the Formatted listing by time modification Change directory to dir Change to home directory Show current working directory Creating a directory dir Places the standard input into the file Output the contents of the file Output the first 10 lines of the file Output the last 10 lines of the file Output the contents of file as it grows,starting with the last 10 lines Create or update file Deleting the file Deleting the directory Force to remove the file Force to remove the directory dir Copy the contents of file1 to file2 Copy dir1 to dir2;create dir2 if not present Rename or move file1 to file2,if file2 is an existing directory Create symbolic link link to file 10. head file 11. tail file 12. tail -f file 13. touch file 14. rm file 15. rm -r dir 16. rm -f file 17. rm -rf dir 18. cp file1 file2 19. cp -r dir1 dir2 20. mv file1 file2 21. ln -s file link Process management 1. 2. ps top To display the currently working processes Display all running process
  • 3. SHIVA BHARDWAJ SHIVA BHARDWAJ 3. 4. 5. 6. 7. 8. kill pid killall proc pkill pattern bg fg fg n Kill the process with given pid Kill all the process named proc Will kill all processes matching the pattern List stopped or background jobs,resume a stopped job in the background Brings the most recent job to foreground Brings job n to the foreground File permission 1. chmod octal file Change the permission of file to octal,which can be found separately for user,group,world by adding, •4-read(r) •2-write(w) •1-execute(x) Searching 1. 2. 3. 4. 5. grep pattern file grep -r pattern dir command | grep pattern locate file find . -name filename Search for pattern in file Search recursively for pattern in dir Search pattern in the output of a command Find all instances of file Searches in the current directory (represented by a period) and below it, for files and directories with names starting with filename Searches for all the named processes , that matches with the pattern and, by default, returns their ID 6. pgrep pattern System Info 1. 2. 3. 4. 5. date cal uptime w whoami Show the current date and time Show this month's calender Show current uptime Display who is on line Who you are logged in as
  • 4.
  • 5. SHIVA BHARDWAJ 6. 7. 8. 9. finger user uname -a cat /proc/cpuinfo cat proc/meminfo Display information about user Show kernel information Cpu information Memory information Show the manual for command Show the disk usage Show directory space usage Show memory and swap usage Show possible locations of app Show which applications will be run by default 10. man command 11. df 12. du 13. free 14. whereis app 15. which app Compression 1. 2. 3. 4. 5. 6. 7. 8. tar cf file.tar file tar xf file.tar tar czf file.tar.gz files tar xzf file.tar.gz tar cjf file.tar.bz2 tar xjf file.tar.bz2 gzip file gzip -d file.gz Create tar named file.tar containing file Extract the files from file.tar Create a tar with Gzip compression Extract a tar using Gzip Create tar with Bzip2 compression Extract a tar using Bzip2 Compresses file and renames it to file.gz Decompresses file.gz back to file Network 1. 2. 3. 4. 5. 6. ping host whois domain dig domain dig -x host wget file wget -c file Ping host and output results Get whois information for domains Get DNS information for domain Reverse lookup host Download file Continue a stopped download
  • 6.
  • 7. SHIVA BHARDWAJ Shortcuts 1. 2. 3. 4. 5. 6. 7. 8. ctrl+c ctrl+z ctrl+d ctrl+w ctrl+u ctrl+r !! exit Halts the current command Stops the current command, resume with fg in the foreground or bg in the background Logout the current session, similar to exit Erases one word in the current line Erases the whole line Type to bring up a recent command Repeats the last command Logout the current session