March 28, 2014 · ubuntu linux commands screen arch howto set keyboard language how to sort folders after size clone clone partition clone harddrive dd iotop nethogs

Linux Cheatsheet

made this list of my most used linux commands

Arch Packages

Install = pacman -S
Search = pacman -Ss
Remove = pacman -R
Build tools = pacman -S base-devel

Ubuntu packages

Install apt-get
Search apt-cache search
Remove apt-get
Build tools = apt-get install build-essentials autoconf automake make


configure raspberry rasp-config
update firmware rpi-update


screen a program screen program
reattach screen -r
deatach run in background screen -d
uart console screen /dev/ttyUSB0 115200


Wireless Config (arch) wifi-menu
Network Info ifconfig
dhcp renew dhclient -r eth0
find the software that runs on port ipv4 lsof -Pnl +M -i4
find the software that runs on port ipv6 lsof -Pnl +M -i6


search for file find / -iname something
show space usage df -h
show partitions parted -l
mount drive mount /dev/sda /mnt/folder
unmount a folder umount /mnt/folder
unmount dead folder umount -l /mnt/deadmount
list files by date ls -lrth
list files by size du -hs | sort
list files in sub folders and folder size ls -lh *
list files & folders after size in current folder du -hc * | sort -h
list files & folder after size in / du -hc / | sort -h
list files & folders after size and exclude a folder du -hc / --exclude='/mnt/*' | sort -h
Clone harddrive or partition dd if=/dev/source of=/dev/destination bs=4M

compress & decompress

untar a file tar xf <file>
untar a tar.gz file tar zxvf <file>
untar a tar.bz2 file tar xvjf <file>
unbz2 a bz2 file bunzip2 <file>
unrar a file unrar <file>
unzip a file unzip <file>
un7z a file 7za e <file>


set keyboard language setxkbmap no

System info

show process usage top
show disk activity iotop
show network activity nethogs

got more?, comment please
FYI, you might need to install some of them

  • LinkedIn
  • Tumblr
  • Reddit
  • Pinterest
  • Pocket
DigitalOcean Referral Badge
Keep my site online & receive a $200 60-day credit at DigitalOcean for your VPS Hosting
Cheaper Games on Instant-Gaming
Creative Commons Licence