Last active
May 1, 2019 05:33
-
-
Save prosenjit-manna/03024b0e4b07522de28243124bbe652e to your computer and use it in GitHub Desktop.
ubuntu usefull commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Make USB bootable or restore statndard USB | |
sudo add-apt-repository universe | |
sudo add-apt-repository ppa:mkusb/ppa | |
sudo apt-get update | |
sudo apt-get install mkusb | |
# Install chrome | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add | |
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' | |
sudo apt-get update | |
sudo apt-get install google-chrome-stable | |
google-chrome | |
## Lamp stack install | |
sudo apt install apache2 | |
sudo systemctl status apache2.service | |
sudo netstat -tlpn | |
sudo a2enmod ssl | |
sudo a2ensite default-ssl.conf | |
sudo systemctl restart apache2.service | |
sudo netstat -tlpn | |
sudo systemctl enable apache2 | |
sudo apt search php7.0 | |
sudo apt install php7.0 libapache2-mod-php7.0 php7.0-mysql php7.0-xml php7.0-gd | |
php -v | |
#sudo nano /var/www/html/info.php | |
#<?php | |
#phpinfo(); | |
#?> | |
sudo systemctl restart apache2 | |
sudo apt install php7.0-mysql mariadb-server mariadb-client | |
sudo mysql_secure_installation | |
#$ sudo mysql | |
#MariaDB> use mysql; | |
#MariaDB> update user set plugin='' where User='root'; | |
#MariaDB> flush privileges; | |
#MariaDB> exit | |
#mysql -u root -p | |
sudo apt install php-gettext phpmyadmin | |
# apache2 | |
# Dbconfig common : No | |
## Install wp cli | |
sudo apt install curl | |
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
chmod +x wp-cli.phar | |
sudo mv wp-cli.phar /usr/local/bin/wp | |
wp --info | |
## Install node | |
## NVM doc | |
## https://github.com/creationix/nvm#install-script | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash | |
# Verify instalation of nvm | |
command -v nvm | |
exit | |
# Open terminal again | |
nvm install 8 | |
## Install git | |
sudo apt-get install git | |
## Sublime (optional) | |
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - | |
sudo apt-get install apt-transport-https | |
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list | |
sudo apt-get update | |
sudo apt-get install sublime-text | |
## Install visual code (optional) | |
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg | |
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg | |
sudo sh -c 'echo "deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list' | |
sudo apt-get update | |
sudo apt-get install code | |
## SSH key generate | |
ssh-keygen -t rsa -b 4096 | |
# Press multiple time enter. | |
cat ~/.ssh/id_rsa.pub | |
ssh-add ~/.ssh/id_rsa | |
ssh -T [email protected] ## Connection test with github | |
ssh -T [email protected] ## Connection test with github | |
# Make sure public key added in github and bitbucket | |
# | |
## Install gitkraken | |
wget https://release.gitkraken.com/linux/gitkraken-amd64.deb | |
sudo dpkg -i gitkraken-amd64.deb | |
## Install windows make USB boot | |
sudo add-apt-repository ppa:nilarimogard/webupd8 | |
sudo apt update | |
sudo apt install woeusb | |
## Example | |
#sudo woeusb --device path.iso /dev/sdb | |
## Install video recorder and editor | |
## Add different sources | |
sudo add-apt-repository -y ppa:kdenlive/kdenlive-stable | |
sudo apt-add-repository -y ppa:diesch/testing | |
sudo add-apt-repository -y ppa:maarten-baert/simplescreenrecorder | |
### Install kdenlive video editor | |
sudo apt-get update | |
sudo apt-get -y install kdenlive | |
### Install clasic menu | |
sudo sudo apt-get install classicmenu-indicator | |
### Install simple screen recorder | |
sudo apt-get install simplescreenrecorder | |
## Remote connection throgh shel | |
sudo apt install openssh-server | |
## Access db from remote for mariadb | |
## https://websiteforstudents.com/configure-remote-access-mysql-mariadb-databases/ | |
## On mariardb server | |
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf | |
# bind-address = 127.0.0.1 to bind-address = 0.0.0.0 | |
sudo systemctl restart mysql.service | |
sudo systemctl restart mariadb.service | |
sudo netstat -anp | grep 3306 | |
sudo ufw allow from {clientip} to any port 3306 | |
# If netstat not found | |
# sudo apt-get instalal net-tools | |
## Change root username to anyhost or create a new user with any host |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment