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
sudo apt install mysql-server
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 is used for the making short command on the terminal;
gedit ~/.bashrc
For Example we Add the Alias for the mysqllogin then we add line
alias mysqllogin='sudo mysql -u root -p'
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'