Basic CLI Commands for Ubuntu

Change the hostname

sudo hostnamectl set-hostname NEW_HOSTNAME

System update and cleanup

sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y

What it does:

  • sudo – Runs the command with administrator privileges.
  • apt update – Refreshes the package list from repositories.
  • apt upgrade -y – Upgrades all installed packages automatically (-y answers “yes” to prompts).

Set the Time zone in Ubuntu

#timedatectl 
#timedatectl list-timezones (View time zone list) 
#sudo timedatectl set-timezone Asia/Dhaka

LAMPP and XAMPP Installation

#/opt/lampp/etc/httpd.conf
#sudo /opt/lampp/lampp restart
#sudo ./xampp.run