SlideShare a Scribd company logo
1 of 2
Download to read offline
File Commands System Commands
File Searching Commands
File Encryption and Compression
Linux Command Line
Cheatsheet
Make Tech Easier
Uncomplicating the complicated
ls - List the content of the current directory uname -a - Show system and kernel
ls -R - List the subdirectories recursively head -n1 /etc/issue - Show distribution
ls -a - List all the content, including hidden files mount - Show mounted filesystems
ls -l - List the content and its information date - Show system date
pwd - Output the current directory that you are in uptime - Show system uptime
cd folder1 – Change the working directory to folder1 whoami - Show your username
cd - Return to the $Home directory w - Display who is online
cd .. - Go up a directory man command - Show manual for command
cd - - Return to the previous directory
mount -o loop cdrom.iso /mnt/dir - Mount cdrom.iso at
/mnt/dircp source destination – Copy source to destination
cp -r source destination – Copy a folder recursively from
source to destination
cat /proc/partitions - Show all partitions registered on the
system
mv source destination - Move (or rename) a file from source to
destination
grep MemTotal /proc/meminfo - Show RAM total seen by the
system
rm file1 - Remove file1 grep "model name" /proc/cpuinfo - Show CPU(s) info
rm -f file1 - Remove file1 without prompt lspci -tv - Show PCI info
rm -r folder - Remove a folder and its content recursively lsusb -tv - Show USB info
mkdir foldername – Create a new folder foldername !! - Repeat the last command
rmdir foldername – Remove an empty folder exit – Log out of current session
file file1 – Show the file type of file1
cat file1 file2 – Concatenate file1 to file 2
cat > file1 – Concatenate standard input to file1 grep pattern files - Search for pattern in files
less file1 - View and paginate file1 grep -i - Case insensitive search
head file1 - Show first 10 lines of file1 grep -r - Recursive search
tail file1 - Show last 10 lines of file1 grep -v - Inverted search
chmod 777 file - Change file permission of file to 777 grep -o - Show matched part of file only
chown user:group file - Change ownership of file to user and
group group
locate file1 - Find file1
whereis command - Find binary/source /manual for command
ln -s source destination – Create a symbolic link from source to
destination
which app – Locate a command for the app
look string file1 - Display any lines in file1 which contain string
as a prefix.
find /dir/ -user name - Find files owned by name in dir
gpg -c file - Encrypt file
find /dir/ -mmin num - Find files modifed less than num
minutes ago in dirgpg file.gpg - Decrypt file.gpg
tar -cf archive.tar foo bar - Create archive.tar from files foo
and bar
find /dir/ -name name* - Find files starting with name in dir
tar -xf archive.tar - Extract all files from archive.tar.
Process Management
Keyboard Shortcuts
SSH
Disk Space
Package Installation
Do you like this cheat sheet?
tar -czf archive.tar.gz foo bar - Create archive.tar.gz from files
foo and bar, with Gzip compression
ps - Show snapshot of processes
tar -xzf archive.tar.gz - Extract a tar using Gzip top - Show real time processes
tar -cjf archive.tar.bz2 foo bar - Create archive.tar.bz2 from
files foo and bar, using Bzip2 compression.
kill pid - Kill process with id pid
pkill name - Kill process with name name
tar -xjf archive.tar.bz2 – Extract a tar using Bzip2 killall name - Kill all processes with names beginning name
gzip file1 – Compress file1 and rename it to file1.gz
gzip -d file1.gz – Decompress file1.gz
Ctrl + Shift + c - Copy a highlighted text
Ctrl + Shift + v – Paste a copied text
ssh $USER@$HOST – Connect to $Host as $USER Ctrl + z - Sleep program
ssh $USER@$HOST command - Run command on $HOST as
$USER
Ctrl + c – Stop current command
Ctrl + r – Start a search
ssh $USER@$HOST -p 1234 – Connect to $HOST as $USER
on port 1234
Ctrl + u – Cut from start of line
Ctrl + k – Cut to end of line
scp file1 $USER@$HOST:file1 – Secure copy file1 from local
machine to file1 at remote $HOST
Ctrl + a – Go to start of line
Ctrl + e – Go to end of line
scp $USER@$HOST:file1 file1– Secure copy file1 from remote
$HOST to file1 at local machine
scp -r foo $USER@$HOST:/bar – Secure copy the folder foo
from local machine to the folder bar at remote $HOST
df -h - Show free space on mounted filesystems
df -i - Show free inodes on mounted filesystems
du -h folder – Show file usage of each folder in folder
du -sh folder – Show the total file size of folder
dpkg -i package.deb - Install a deb package fdisk -l - Show disks partitions sizes and types (run as root)
rpm -Uvh package.rpm – Install a rpm package free – Show memory and swap usage
Visit MakeTechEasier.com for more useful tech tutorials, tips and tricks

More Related Content

What's hot

Using the command line on macOS
Using the command line on macOSUsing the command line on macOS
Using the command line on macOSAdamFallon4
 
Linux commands
Linux commandsLinux commands
Linux commandsU.P Police
 
Linux basic commands with examples
Linux basic commands with examplesLinux basic commands with examples
Linux basic commands with examplesabclearnn
 
Linux Commands - Cheat Sheet
Linux Commands - Cheat Sheet Linux Commands - Cheat Sheet
Linux Commands - Cheat Sheet Isham Rashik
 
Linux Bash Shell Cheat Sheet for Beginners
Linux Bash Shell Cheat Sheet for BeginnersLinux Bash Shell Cheat Sheet for Beginners
Linux Bash Shell Cheat Sheet for BeginnersDavide Ciambelli
 
Unix Command-Line Cheat Sheet BTI2014
Unix Command-Line Cheat Sheet BTI2014Unix Command-Line Cheat Sheet BTI2014
Unix Command-Line Cheat Sheet BTI2014Noé Fernández-Pozo
 
Important Linux Commands
Important Linux CommandsImportant Linux Commands
Important Linux CommandsArun Sharma
 
[PDF] 2021 Termux basic commands list
[PDF] 2021 Termux basic commands list [PDF] 2021 Termux basic commands list
[PDF] 2021 Termux basic commands list nisivaasdfghj
 
One Page Linux Manual
One Page Linux ManualOne Page Linux Manual
One Page Linux Manualdummy
 
Compression Commands in Linux
Compression Commands in LinuxCompression Commands in Linux
Compression Commands in LinuxPegah Taheri
 
Compression
CompressionCompression
Compressionaswathyu
 

What's hot (20)

Linux Commands
Linux CommandsLinux Commands
Linux Commands
 
Using the command line on macOS
Using the command line on macOSUsing the command line on macOS
Using the command line on macOS
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Unix slideshare
Unix slideshareUnix slideshare
Unix slideshare
 
Linux basic commands with examples
Linux basic commands with examplesLinux basic commands with examples
Linux basic commands with examples
 
Basic Linux commands
Basic Linux commandsBasic Linux commands
Basic Linux commands
 
Linux cheat-sheet
Linux cheat-sheetLinux cheat-sheet
Linux cheat-sheet
 
Linux Commands - Cheat Sheet
Linux Commands - Cheat Sheet Linux Commands - Cheat Sheet
Linux Commands - Cheat Sheet
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Basics of unix
Basics of unixBasics of unix
Basics of unix
 
Linux Bash Shell Cheat Sheet for Beginners
Linux Bash Shell Cheat Sheet for BeginnersLinux Bash Shell Cheat Sheet for Beginners
Linux Bash Shell Cheat Sheet for Beginners
 
Unix Command-Line Cheat Sheet BTI2014
Unix Command-Line Cheat Sheet BTI2014Unix Command-Line Cheat Sheet BTI2014
Unix Command-Line Cheat Sheet BTI2014
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
 
Important Linux Commands
Important Linux CommandsImportant Linux Commands
Important Linux Commands
 
[PDF] 2021 Termux basic commands list
[PDF] 2021 Termux basic commands list [PDF] 2021 Termux basic commands list
[PDF] 2021 Termux basic commands list
 
One Page Linux Manual
One Page Linux ManualOne Page Linux Manual
One Page Linux Manual
 
Compression Commands in Linux
Compression Commands in LinuxCompression Commands in Linux
Compression Commands in Linux
 
Know the UNIX Commands
Know the UNIX CommandsKnow the UNIX Commands
Know the UNIX Commands
 
Compression
CompressionCompression
Compression
 
Unix Cheat Sheet
Unix Cheat SheetUnix Cheat Sheet
Unix Cheat Sheet
 

Similar to Linux command line

Similar to Linux command line (20)

14.Linux Command
14.Linux Command14.Linux Command
14.Linux Command
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Directories description
Directories descriptionDirectories description
Directories description
 
Basic shell commands by Jeremy Sanders
Basic shell commands by Jeremy SandersBasic shell commands by Jeremy Sanders
Basic shell commands by Jeremy Sanders
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
 
Linux ppt
Linux pptLinux ppt
Linux ppt
 
linuxcommands.pdf
linuxcommands.pdflinuxcommands.pdf
linuxcommands.pdf
 
Linuxcommands
LinuxcommandsLinuxcommands
Linuxcommands
 
some title
some titlesome title
some title
 
Raspberry Pi - Lecture 2 Linux OS
Raspberry Pi - Lecture 2 Linux OSRaspberry Pi - Lecture 2 Linux OS
Raspberry Pi - Lecture 2 Linux OS
 
Basic unix commands_1
Basic unix commands_1Basic unix commands_1
Basic unix commands_1
 
Linux command line cheatsheet
Linux command line cheatsheetLinux command line cheatsheet
Linux command line cheatsheet
 
Examples -partII
Examples -partIIExamples -partII
Examples -partII
 
bash_1_2021-command line introduction.pdf
bash_1_2021-command line introduction.pdfbash_1_2021-command line introduction.pdf
bash_1_2021-command line introduction.pdf
 
Lecture1 2 intro-unix
Lecture1 2 intro-unixLecture1 2 intro-unix
Lecture1 2 intro-unix
 
Unix reference sheet
Unix reference sheetUnix reference sheet
Unix reference sheet
 
8.1.intro unix
8.1.intro unix8.1.intro unix
8.1.intro unix
 
workshop_1.ppt
workshop_1.pptworkshop_1.ppt
workshop_1.ppt
 
Linux file system nevigation
Linux file system nevigationLinux file system nevigation
Linux file system nevigation
 
Unix commands
Unix commandsUnix commands
Unix commands
 

Recently uploaded

On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024APNIC
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Roomishabajaj13
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceDelhi Call girls
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Delhi Call girls
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024APNIC
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Sheetaleventcompany
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsThierry TROUIN ☁
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$kojalkojal131
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebJames Anderson
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Servicegwenoracqe6
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.soniya singh
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 

Recently uploaded (20)

On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
 
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with Flows
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
 

Linux command line

  • 1. File Commands System Commands File Searching Commands File Encryption and Compression Linux Command Line Cheatsheet Make Tech Easier Uncomplicating the complicated ls - List the content of the current directory uname -a - Show system and kernel ls -R - List the subdirectories recursively head -n1 /etc/issue - Show distribution ls -a - List all the content, including hidden files mount - Show mounted filesystems ls -l - List the content and its information date - Show system date pwd - Output the current directory that you are in uptime - Show system uptime cd folder1 – Change the working directory to folder1 whoami - Show your username cd - Return to the $Home directory w - Display who is online cd .. - Go up a directory man command - Show manual for command cd - - Return to the previous directory mount -o loop cdrom.iso /mnt/dir - Mount cdrom.iso at /mnt/dircp source destination – Copy source to destination cp -r source destination – Copy a folder recursively from source to destination cat /proc/partitions - Show all partitions registered on the system mv source destination - Move (or rename) a file from source to destination grep MemTotal /proc/meminfo - Show RAM total seen by the system rm file1 - Remove file1 grep "model name" /proc/cpuinfo - Show CPU(s) info rm -f file1 - Remove file1 without prompt lspci -tv - Show PCI info rm -r folder - Remove a folder and its content recursively lsusb -tv - Show USB info mkdir foldername – Create a new folder foldername !! - Repeat the last command rmdir foldername – Remove an empty folder exit – Log out of current session file file1 – Show the file type of file1 cat file1 file2 – Concatenate file1 to file 2 cat > file1 – Concatenate standard input to file1 grep pattern files - Search for pattern in files less file1 - View and paginate file1 grep -i - Case insensitive search head file1 - Show first 10 lines of file1 grep -r - Recursive search tail file1 - Show last 10 lines of file1 grep -v - Inverted search chmod 777 file - Change file permission of file to 777 grep -o - Show matched part of file only chown user:group file - Change ownership of file to user and group group locate file1 - Find file1 whereis command - Find binary/source /manual for command ln -s source destination – Create a symbolic link from source to destination which app – Locate a command for the app look string file1 - Display any lines in file1 which contain string as a prefix. find /dir/ -user name - Find files owned by name in dir gpg -c file - Encrypt file find /dir/ -mmin num - Find files modifed less than num minutes ago in dirgpg file.gpg - Decrypt file.gpg tar -cf archive.tar foo bar - Create archive.tar from files foo and bar find /dir/ -name name* - Find files starting with name in dir tar -xf archive.tar - Extract all files from archive.tar.
  • 2. Process Management Keyboard Shortcuts SSH Disk Space Package Installation Do you like this cheat sheet? tar -czf archive.tar.gz foo bar - Create archive.tar.gz from files foo and bar, with Gzip compression ps - Show snapshot of processes tar -xzf archive.tar.gz - Extract a tar using Gzip top - Show real time processes tar -cjf archive.tar.bz2 foo bar - Create archive.tar.bz2 from files foo and bar, using Bzip2 compression. kill pid - Kill process with id pid pkill name - Kill process with name name tar -xjf archive.tar.bz2 – Extract a tar using Bzip2 killall name - Kill all processes with names beginning name gzip file1 – Compress file1 and rename it to file1.gz gzip -d file1.gz – Decompress file1.gz Ctrl + Shift + c - Copy a highlighted text Ctrl + Shift + v – Paste a copied text ssh $USER@$HOST – Connect to $Host as $USER Ctrl + z - Sleep program ssh $USER@$HOST command - Run command on $HOST as $USER Ctrl + c – Stop current command Ctrl + r – Start a search ssh $USER@$HOST -p 1234 – Connect to $HOST as $USER on port 1234 Ctrl + u – Cut from start of line Ctrl + k – Cut to end of line scp file1 $USER@$HOST:file1 – Secure copy file1 from local machine to file1 at remote $HOST Ctrl + a – Go to start of line Ctrl + e – Go to end of line scp $USER@$HOST:file1 file1– Secure copy file1 from remote $HOST to file1 at local machine scp -r foo $USER@$HOST:/bar – Secure copy the folder foo from local machine to the folder bar at remote $HOST df -h - Show free space on mounted filesystems df -i - Show free inodes on mounted filesystems du -h folder – Show file usage of each folder in folder du -sh folder – Show the total file size of folder dpkg -i package.deb - Install a deb package fdisk -l - Show disks partitions sizes and types (run as root) rpm -Uvh package.rpm – Install a rpm package free – Show memory and swap usage Visit MakeTechEasier.com for more useful tech tutorials, tips and tricks