Show Menu
Cheatography

Linux-Ubuntu Cheat Sheet (DRAFT) by

This is a Linux-Ubuntu-CheetSheet (ENG). This will be a quick reference for Learners.

This is a draft cheat sheet. It is a work in progress and is not finished yet.

File Management Commands

ls
List files and direct­ories
cd
Change directory
mkdir
Make directory
touch
Create a new empty file
cp
Copy a file or directory
mv
Move or rename a file or directory
rm
Remove a file or directory
chmod
Change file permis­sions
chown
Change file ownership

System Inform­ation Commands

uname
Print system inform­ation
hostname
Print the name of the current host system
top
Show system processes and resource usage
free
Show system memory usage
df
Show disk usage
du
Show disk usage of specific files or direct­ories
whoami
who are you logged in as

User Management Commands

adduser
Add a new user account
deluser
Remove a user account
passwd
Change a user's password
usermod
Modify a user's account inform­ation
groupadd
Add a new user group
groupdel
Remove a user group
su
Switch user to become another user
 

vim

i
Used to enter insert mode, where text can be inserted
:wq
Used to save changes and quit Vim
:q
Used to quit Vim
:q!
Used to force quit Vim without saving changes
gg
Used to jump to the beginning of the file
G
Used to jump to the end of the file

SSH

ssh
Used to connect to a remote server using SSH
ssh-keygen
Used to generate public and private SSH keys for authen­tic­ation purposes
ssh-co­py-id
Used to copy SSH keys to a remote server for passwo­rdless authen­tic­ation
ssh-add
Used to add a private key to the SSH authen­tic­ation agent
ssh-agent
Used to manage the SSH authen­tic­ation agent
 

Network

ifconfig
Used to configure and display network interface inform­ation
ip
A more modern and flexible tool for managing network interf­aces, routes, and tunnels
ping
Used to test network connec­tivity and latency by sending packets to a remote host
netstat
Used to display active network connec­tions, routing tables, and network statistics
traceroute
Used to display the route packets take to reach a remote host
dig
Used to perform DNS queries and display DNS inform­ation
tcpdump
Used to capture and analyze network traffic

Package Management Commands

apt-get
Install, remove, and update packages
apt-cache
Search and display package inform­ation