0% found this document useful (0 votes)
10 views

roliu_linux-commands-cheat-sheet

Linux server issue va irukum da iPhone and Android movies the compilation part 〽️ is a miracle of touching characters and bro easy to the people who have to wait ?? in the office and bro avanga role 24X7 you da

Uploaded by

lizassmamm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

roliu_linux-commands-cheat-sheet

Linux server issue va irukum da iPhone and Android movies the compilation part 〽️ is a miracle of touching characters and bro easy to the people who have to wait ?? in the office and bro avanga role 24X7 you da

Uploaded by

lizassmamm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Linux Commands Cheat Sheet Cheat Sheet

by roliu via cheatography.com/133059/cs/27042/

File Commands System Info

ls - list files in the directory whoami - display the login username


ls -al - list long formatted files with hidden files uname -a - display all the system inform​ation
cd - return to home directory whereis app - show possible locations of app

pwd - display current working directory which app - shows the full path of the app
touch file - create or update file df -h - show file system disk space usage with human-​‐
mkdir dir - create a new directory dir rea​dable storage size

rm file - remove file du -d0 -h dir - display the directory space usage without
displaying subdir​ect​ories
nano file - edit the file using Nano's editor
mv file1 file2/dir - rename file1 to file2 or move file1 to dir
Process Management
rmdir dir - remove empty directory dir
ps - display current active processes
rm -r dir - remove directory dir
top - display all running processes
cp file1 file2 - copy file1 to file2
kill pid - kill a process by ID
cp -r dir1 dir2 - copy directory dir1 to dir2 and create dir2 if it
killall procname - kill a process by a name
does not exist

Compre​ssion
File Permis​sions
tar -cvf file.tar files/​dir - create a tar file to archive the files/dir
chmod file - change file permission
and display the progress in the terminal.
chmod u-w file - remove the writable permission from file
tar -xzvf file.tar.gz -C dir - extract a tar using Gzip to directory dir
to user
tar -czf file.gz file.tar - compress the file.tar to file.gz using
chmod 777 file - give read, write, execute permission to
Gzip
all
gzip file - compress file and rename it to file.gz
​ ​Ope​rator for chmod
gzip -d file.gz - decompress file.gz back to file
+ add the specified modes
- Remove the specified modes from file or Searching
dir
grep pattern files - search for pattern in files, * denotes all
= Set the specified modes
the files
chown user:group file - change the ownership of file
grep -r pattern dir - search for the pattern in dir

grep -i pattern file - ignore the case and search for the
Users and Groups
pattern
groupadd group - add a new group
command | grep pattern - search for the pattern in the output of
useradd -g group nUser - add a new user to group command
usermod -g group eUser - add an existing user to group locate file - find all instances of file by name
lid -g group - list all the users in the group
A regular expres​sion is used to describes a particular search pattern
All the above commands require superuser privil​eges. .

Network

ping host - ping host


wget file - download file

By roliu Published 11th March, 2021. Sponsored by ApolloPad.com


cheatography.com/roliu/ Last updated 11th March, 2021. Everyone has a novel in them. Finish
Page 1 of 2. Yours!
https://apollopad.com
Linux Commands Cheat Sheet Cheat Sheet
by roliu via cheatography.com/133059/cs/27042/

Redire​ction

> file - output operator to overwrite the file


>> file - append operator to append the text at the end of the file
| - pipe operator to take the output from the preceding
command to be the input of the following command

By roliu Published 11th March, 2021. Sponsored by ApolloPad.com


cheatography.com/roliu/ Last updated 11th March, 2021. Everyone has a novel in them. Finish
Page 2 of 2. Yours!
https://apollopad.com

You might also like