Ubuntu Commands
Update and Upgrade
-y automatically confirms the prompts.
sudo apt update && sudo apt upgrade -y
Install Software
sudo apt install <package-name>
Remove Software
sudo apt remove <package-name>
Search for Software
apt search <package-name>
Clean Up
sudo apt autoremove -y
sudo apt clean
Check Disk Space
df -h
Check Memory Usage
free -h
Reboot System
sudo reboot
Shutdown System
sudo shutdown now
View System Information
uname -a
View Running Processes
top
or
htop
Change File Permissions
chmod <permissions> <file-or-directory>
e.g., chmod 755 script.sh
Number codes:
7= read, write, execute6= read, write5= read, execute4= read only3= write, execute2= write only1= execute only0= no permissions
Change File Ownership
sudo chown <user>:<group> <file-or-directory>
e.g., sudo chown benjamin-f:benjamin-f myfile.txt
View Network Configuration
ifconfig
or
ip a
Ping a Host
ping <hostname-or-ip>
e.g., ping google.com
Train (sl)
sudo apt install sl
sl
Install fish shell
sudo apt install fish
chsh -s /usr/bin/fish
Install oh-my-fish
curl -L https://get.oh-my.fish | fish
omf install <theme-name>