SlideShare a Scribd company logo
Unix slideshare
ls List “normal” files
ls file List only file
ls -a List all files
ls –l Verbosely list normal files
ls –al Verbosely list all files
ls –al file Verbosely list only file
rm file Remove file
rm –r dir Remove dir and all subdirs
mv file1 file2 Move/Rename file1 to file2
mv dir1 dir2 Move/Rename dir1 to dir2
cp file1 file2 Copy file1 to file2
cd dir Change directoty to dir
mkdir dir Make a directory dir
rmdir dir Remove the directory dir
chown user file Change owner of file to user
chgrp group file Change group of file to group
chmod nnn file Change permissions of file to
755 rwxr-xr-x
700 rwx------
644 rw-r--r--
600 rw-------
locate file Find file (fast, not reliable)
find dir –name file Find file in subdir of dir (very
slow, reliable)
passwd Change your password
chsh Change your login shell
chfn Change your finger info
who Show who is logged in
w Show who is doing what
quota –v Show your disk quota info
du –k dir Show disk usage of dir
df –k Show file-system usage
vi file Edit file in vi editor
pico file Edit file in pico editor
wc file Count words/lines in a file
more file Show contents of file
head –n file Show first n lines of file
tail –n file Show last n lines of file
grep pattern file Search file for pattern
cat file1 file2 > file3 Append file2 to file1 and save results to file3
top Show the top cpu processes
ps –elf Show info about all processes
kill pid Kill process pid
kill -9 pid Kill stubborn process pid
^C Interrupt a foreground process
^Z Suspend a foreground process
jobs Show jobs from this session
bg Send process to background
fg Send process to foreground
nice command Run command to lower priority
renice –n n pid Lower priority of pid by n
time command Time the execution of command
tar cf file.tar files Archive files as file.tar
tar xf file.tar Show info about all processes
gzip file Kill process pid
gzip –d file.gz Kill stubborn process pid
compress file Interrupt a foreground process
uncompress file.z Suspend a foreground process
lpr file Print file to default printer
lpr –Pprinter file Print file to printer
lpq Show default print queue
lpq –Pprinter Show printer print queue
lprm - Purge default printer
lprm –Pprinter Purge printer
lprm job Remove job in default printer
lprm –Pprinter
job
Remove job in printer
cc options file1.c … fileN.c C
CC options file.C … fileN.C C++
-o file.x Create executable file called file.x
-g Include info for debugging
-0N Optimize executable
-lfoo Include library libfoo.a
dbx C
rerun C++
stop in sub Create executable file called file.x
stop at N Include info for debugging
trace var Optimize executable
status Include library libfoo.a
delete N Delete Nth breakpoint/trace
delete all Delete all breakpoints/traces
cont Continue running (after a stop)
step Execute the next line and stop
next Same as step, but steps over calls
list List 10 lines of source
list N List 10 lines of source from line N
print var Print the value of variable
dump Print the value of all variables
quit Quit the debugger
< file Redirect file to STDIN
> file Redirect STDOUT to file
>! file Redirect STDOUT to file (overwrite)
>> file Redirect STDOUT to file (append)
>& file Redirect STDOUT and STDERR to file
| tee file Show STDOUT and copy to file
| Redirect STDOUT of one command to
STDIN of another (ls | more)
alias Show all aliases
alias name Show alias name
alias name command Create an alias called name for command
echo $var Show value of var
printenv Show value of all variables
setenv var value Set value of var to val
unsetenv var Remove the variable var

More Related Content

PPTX
Know the UNIX Commands
PPTX
Linux basic commands
PDF
Basic linux commands
PPT
Unix(introduction)
PPT
Basic Linux day 2
ODP
Linux commands
PPT
Basic command ppt
PDF
Linux Basic Commands
Know the UNIX Commands
Linux basic commands
Basic linux commands
Unix(introduction)
Basic Linux day 2
Linux commands
Basic command ppt
Linux Basic Commands

What's hot (20)

PPTX
Linux command for beginners
PPT
Linux basic commands
PDF
Basic Linux commands
PPT
Linux commands and file structure
PPT
Linux commands
PPT
Basic 50 linus command
PDF
Basic linux commands for bioinformatics
PDF
Introduction to UNIX Command-Lines with examples
PDF
Unix Command Line Productivity Tips
PDF
50 most frequently used unix linux commands (with examples)
PPTX
Basic commands of linux
PPT
Linux commands
PDF
Useful Linux and Unix commands handbook
PPTX
Basic unix commands
PDF
Basic commands
PDF
Important Linux Commands
PDF
Linux basic commands with examples
DOCX
PPTX
Linux commands
PDF
Linux command for beginners
Linux basic commands
Basic Linux commands
Linux commands and file structure
Linux commands
Basic 50 linus command
Basic linux commands for bioinformatics
Introduction to UNIX Command-Lines with examples
Unix Command Line Productivity Tips
50 most frequently used unix linux commands (with examples)
Basic commands of linux
Linux commands
Useful Linux and Unix commands handbook
Basic unix commands
Basic commands
Important Linux Commands
Linux basic commands with examples
Linux commands
Ad

Viewers also liked (20)

PPTX
Unix operating system
PPTX
Unix Operating System
PPTX
Unix ppt
DOCX
Unix operating system
PPTX
UNIX Operating System
PPT
Basic Unix
PPT
Unix memory management
DOCX
Introduction to unix
PPTX
Unix Linux Commands Presentation 2013
PDF
Processes in unix
PPTX
Unix Process management
PPTX
Sistema Operativo UNIX
PPTX
Sistema Operativo UNIX
PPT
Unix/Linux Basic Commands and Shell Script
PPT
Presentation on operating system
PPTX
Operating system overview concepts ppt
PPTX
PPTX
Oprating sys
DOC
Introduction to unix
Unix operating system
Unix Operating System
Unix ppt
Unix operating system
UNIX Operating System
Basic Unix
Unix memory management
Introduction to unix
Unix Linux Commands Presentation 2013
Processes in unix
Unix Process management
Sistema Operativo UNIX
Sistema Operativo UNIX
Unix/Linux Basic Commands and Shell Script
Presentation on operating system
Operating system overview concepts ppt
Oprating sys
Introduction to unix
Ad

Similar to Unix slideshare (20)

PDF
Unix / Linux Command Reference
PPTX
Basic unix
PDF
3.1.a linux commands reference
PPT
8.1.intro unix
PPT
workshop_1.ppt
PPTX
An Introduction to Linux
PDF
Linux command line
PDF
14.Linux Command
PPTX
Linux Basic commands and VI Editor
PPT
Examples -partII
DOCX
Directories description
PPTX
Linux System commands Essentialsand Basics.pptx
PDF
Information about linux operating system
PDF
Information about linux operating system
DOCX
Unix commands
PDF
Basic basic solaris quick referent card
PDF
Linux Command Line - By Ranjan Raja
PDF
Termux commands-list
PDF
Workshop on command line tools - day 1
PDF
The Linux Command Cheat Sheet
Unix / Linux Command Reference
Basic unix
3.1.a linux commands reference
8.1.intro unix
workshop_1.ppt
An Introduction to Linux
Linux command line
14.Linux Command
Linux Basic commands and VI Editor
Examples -partII
Directories description
Linux System commands Essentialsand Basics.pptx
Information about linux operating system
Information about linux operating system
Unix commands
Basic basic solaris quick referent card
Linux Command Line - By Ranjan Raja
Termux commands-list
Workshop on command line tools - day 1
The Linux Command Cheat Sheet

Recently uploaded (20)

PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Approach and Philosophy of On baking technology
PDF
Modernizing your data center with Dell and AMD
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Advanced IT Governance
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Advanced Soft Computing BINUS July 2025.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Empathic Computing: Creating Shared Understanding
PDF
Machine learning based COVID-19 study performance prediction
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
cuic standard and advanced reporting.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Network Security Unit 5.pdf for BCA BBA.
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Approach and Philosophy of On baking technology
Modernizing your data center with Dell and AMD
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Advanced IT Governance
The AUB Centre for AI in Media Proposal.docx
Mobile App Security Testing_ A Comprehensive Guide.pdf
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Advanced Soft Computing BINUS July 2025.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Empathic Computing: Creating Shared Understanding
Machine learning based COVID-19 study performance prediction
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
cuic standard and advanced reporting.pdf
MYSQL Presentation for SQL database connectivity
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Network Security Unit 5.pdf for BCA BBA.

Unix slideshare

  • 2. ls List “normal” files ls file List only file ls -a List all files ls –l Verbosely list normal files ls –al Verbosely list all files ls –al file Verbosely list only file rm file Remove file rm –r dir Remove dir and all subdirs mv file1 file2 Move/Rename file1 to file2 mv dir1 dir2 Move/Rename dir1 to dir2 cp file1 file2 Copy file1 to file2 cd dir Change directoty to dir mkdir dir Make a directory dir rmdir dir Remove the directory dir chown user file Change owner of file to user chgrp group file Change group of file to group chmod nnn file Change permissions of file to 755 rwxr-xr-x 700 rwx------ 644 rw-r--r-- 600 rw------- locate file Find file (fast, not reliable) find dir –name file Find file in subdir of dir (very slow, reliable)
  • 3. passwd Change your password chsh Change your login shell chfn Change your finger info who Show who is logged in w Show who is doing what quota –v Show your disk quota info du –k dir Show disk usage of dir df –k Show file-system usage
  • 4. vi file Edit file in vi editor pico file Edit file in pico editor wc file Count words/lines in a file more file Show contents of file head –n file Show first n lines of file tail –n file Show last n lines of file grep pattern file Search file for pattern cat file1 file2 > file3 Append file2 to file1 and save results to file3
  • 5. top Show the top cpu processes ps –elf Show info about all processes kill pid Kill process pid kill -9 pid Kill stubborn process pid ^C Interrupt a foreground process ^Z Suspend a foreground process jobs Show jobs from this session bg Send process to background fg Send process to foreground nice command Run command to lower priority renice –n n pid Lower priority of pid by n time command Time the execution of command
  • 6. tar cf file.tar files Archive files as file.tar tar xf file.tar Show info about all processes gzip file Kill process pid gzip –d file.gz Kill stubborn process pid compress file Interrupt a foreground process uncompress file.z Suspend a foreground process lpr file Print file to default printer lpr –Pprinter file Print file to printer lpq Show default print queue lpq –Pprinter Show printer print queue lprm - Purge default printer lprm –Pprinter Purge printer lprm job Remove job in default printer lprm –Pprinter job Remove job in printer
  • 7. cc options file1.c … fileN.c C CC options file.C … fileN.C C++ -o file.x Create executable file called file.x -g Include info for debugging -0N Optimize executable -lfoo Include library libfoo.a dbx C rerun C++ stop in sub Create executable file called file.x stop at N Include info for debugging trace var Optimize executable status Include library libfoo.a delete N Delete Nth breakpoint/trace delete all Delete all breakpoints/traces cont Continue running (after a stop) step Execute the next line and stop next Same as step, but steps over calls list List 10 lines of source list N List 10 lines of source from line N print var Print the value of variable dump Print the value of all variables quit Quit the debugger
  • 8. < file Redirect file to STDIN > file Redirect STDOUT to file >! file Redirect STDOUT to file (overwrite) >> file Redirect STDOUT to file (append) >& file Redirect STDOUT and STDERR to file | tee file Show STDOUT and copy to file | Redirect STDOUT of one command to STDIN of another (ls | more) alias Show all aliases alias name Show alias name alias name command Create an alias called name for command
  • 9. echo $var Show value of var printenv Show value of all variables setenv var value Set value of var to val unsetenv var Remove the variable var