Package

  • tree is used to check the file structure in directory
  • apt(Advanced Packaging Tool) update
  • gnome-shell-extensions is used for used the extensions of gnome.
  • systemctl is used for check the status of process.
  • gufw is the Firewall installation in the pc.
sudo apt install tree 
sudo apt update && sudo apt upgrade
sudo apt install gnome-shell-extensions
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize'
sudo systemctl status ufw
sudo apt install gufw
sudo ufw status

Installing MySQL & Server

sudo apt install mysql-server

Installing phpmyadmin

  • Follow the above link for installations.
  • Installing Dependency for phpmyadmin
ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'password'
sudo apt install php libapache2-mod-php php-mysql
sudo apt install phpmyadmin

Alias in Ubuntu

alias in ubuntu is used for the making short command on the terminal;

  • e.g you can type alias in the terminal then list will be show to you.
gedit ~/.bashrc
  • For Adding Alias in ubuntu you can run the commond and add the alias in the files.

For Example we Add the Alias for the mysqllogin then we add line

alias mysqllogin='sudo mysql -u root -p'

Adding Alias in Ubuntu

you can add the alias after that line alias l='ls -CF

alias editalias='gedit ~/.bashrc'
alias onbluetooth='sudo systemctl enable bluetooth'
alias offbluetooth='sudo systemctl disable bluetooth'
alias mysqllogin='sudo mysql -u root -p'

alias apachestatus='sudo systemctl restart apache2'
alias apacherestart='sudo systemctl restart apache2'

alias editalias='gedit ~/.bashrc'
alias onbluetooth='sudo systemctl enable bluetooth'
alias offbluetooth='sudo systemctl disable bluetooth'

alias mysqllogin='sudo mysql -u root -p'
alias mysqlstatus='sudo systemctl status mysql.service'
alias apachestatus='sudo systemctl restart apache2'

Adding the mysql + apache2 start and stop using one alias;

# manage_services function and aliases
manage_services() {
  case $1 in
    startmysql)
      sudo systemctl enable mysql.service
      sudo systemctl start mysql.service
      ;;
    stopmysql)
      sudo systemctl disable mysql.service
      sudo systemctl stop mysql.service
      ;;
    startapache2)
      sudo systemctl enable apache2.service
      sudo systemctl start apache2.service
      ;;
    stopapache2)
      sudo systemctl disable apache2.service
      sudo systemctl stop apache2.service
      ;;
    *)
      echo "Invalid command. Usage: manage_services [startmysql|stopmysql|startapache2|stopapache2]"
      ;;
  esac
}

# Aliases for convenience
alias manage_services='manage_services'