sudo add-apt-repository ppa:bamboo-engine/ibus-bamboo
sudo apt update
sudo apt install vim git zsh build-essential heif-gdk-pixbuf ibus ibus-bamboo gdebi
im-config -n ibusInstall media codecs
$ sudo apt install ubuntu-restricted-extrasInstall GNOME Tweak
$ sudo apt install gnome-tweaks$ sudo usermod -s /usr/bin/zsh $(whoami)
$ sudo rebootTo install Oh-My-ZSH
$ sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"OR Install Prezto
Install font & Syntax Highlighting extension
$ sudo apt-get install powerline fonts-powerline
$ git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlightingAppend zsh-autosuggestions & zsh-syntax-highlighting to plugins() like this
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)Install Theme Powerlevel10k
$ git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10kThen edit your ~/.zshrc and set ZSH_THEME="powerlevel10k/powerlevel10k".
Also add the following: POWERLEVEL9K_MODE="awesome-patched"
Display only the last directory segment
-
Open
~/.p10k.zsh, search forPOWERLEVEL9K_SHORTEN_STRATEGYand change the value of this parameter totruncate_to_last -
Alternatively, you can try changing the value of
POWERLEVEL9K_DIR_MAX_LENGTHto1. -
If you frequently work outside of your home directory, you might want to utilize named directories. For example, WSL users often add this to their
~/.zshrc:
Install a patched font
- Source Code Pro
- Source Code Pro + Font Awesome, this one is needed if you want the icons from Font Awesome as shown in the screenshot for Powerlevel10k.
- Others @ powerline fonts
Enabling Oh-My-ZSH Plugins:
Oh-My-ZSH has many plugins. You can find a list of pre-installed plugins at https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins
Let’s install the colored-man-pages plugin. It adds color to the Linux man pages.
Installing a patched font will mess up the integrated terminal in VS Code unless you use the proper settings. You'll need to go to settings (Ctrl + ,) and add or edit the following values:
- For Source Code Pro + Font Awesome:
"terminal.integrated.fontFamily": "'SourceCodePro+Powerline+Awesome Regular'". The single quotes are important! Restart VS Code after the config change. - For Source Code Pro:
"terminal.integrated.fontFamily": "Source Code Pro for Powerline" - For Meslo:
"terminal.integrated.fontFamily": "Meslo LG M for Powerline"
You can also set the fontsize e.g.: "terminal.integrated.fontSize": 14
Download file jdk-8u241-linux-x64.tar.gz at this storage
$ sudo mkdir /opt/java-jdk
$ sudo tar -C /opt/java-jdk -zxf ~/jdk-8u241-linux-x64.tar.gzSet Default
$ sudo update-alternatives --install /usr/bin/java java /opt/java-jdk/jdk1.8.0_241/bin/java 1
$ sudo update-alternatives --install /usr/bin/javac javac /opt/java-jdk/jdk1.8.0_241/bin/javac 1
$ sudo update-alternatives --install /usr/bin/javaws javaws /opt/java-jdk/jdk1.8.0_241/bin/javaws 1Check
$ sudo update-alternatives --config javaInstall Maven
$ sudo apt install mavenssh-keygen -t ed25519 -C "email"Config for many sshkey
vi ~/.ssh/configwith content
Host *.domain.*
IdentityFile ~/.ssh/domain_rsa
Host *.domain2.*, 10.x.x.*
IdentityFile ~/.ssh/domain2_rsaexample:
eval "$(ssh-agent -s)"
Host *
AddKeysToAgent yes
IdentityFile ~/.ssh/id_ed25519
Host *.teko.vn
AddKeysToAgent yes
IdentityFile ~/.ssh/nam_tekocd ~/.local/share/applications
wget https://gist.github.com/raw/2922285/eclipse.desktop
chmod u+x eclipse.desktop
vi eclipse.desktop$ sudo apt install mysql-server
$ sudo mysql_secure_installation$ sudo vi /etc/mysql/mysql.conf.d/mysqld.cnfAnd then change the bind-address line to 0.0.0.0 instead of 127.0.0.1.
$ sudo systemctl restart mysql
$ sudo systemctl enable mysqlBy default, MySQL listens for connections on port 3306. You can confirm that your MySQL service is listening for incoming connections on all interfaces 0.0.0.0 with this command:
$ ss -ltnFinally, the only thing left to do is make sure that your server's firewall isn't blocking incoming connections on port 3306 (default MySQL listening port). You can issue the following ufw command to add an exception in Ubuntu's default firewall:
$ sudo ufw allow from any to any port 3306 proto tcp$ sudo mysqlNext, check which authentication method each of your MySQL user accounts use with the following command:
mysql> SELECT user,authentication_string,plugin,host FROM mysql.user;Output
+------------------+-------------------------------------------+-----------------------+-----------+
| user | authentication_string | plugin | host |
+------------------+-------------------------------------------+-----------------------+-----------+
| root | | auth_socket | localhost |
| mysql.session | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password | localhost |
| mysql.sys | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password | localhost |
| debian-sys-maint | *CC744277A401A7D25BE1CA89AFF17BF607F876FF | mysql_native_password | localhost |
+------------------+-------------------------------------------+-----------------------+-----------+
4 rows in set (0.00 sec)mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';If failed:
msyql> SHOW VARIABLES LIKE 'validate_password%';+--------------------------------------+-------+
| Variable_name | Value |
+--------------------------------------+-------+
| validate_password.check_user_name | ON |
| validate_password.dictionary_file | |
| validate_password.length | 8 |
| validate_password.mixed_case_count | 1 |
| validate_password.number_count | 1 |
| validate_password.policy | MEDIUM|
| validate_password.special_char_count | 1 |
+--------------------------------------+-------+mysql> SET GLOBAL validate_password.length = 6;
mysql> SET GLOBAL validate_password.policy = LOW;
mysql> SET GLOBAL validate_password.number_count = 0;Finally
mysql> FLUSH PRIVILEGES;
sudo apt install postgresql postgresql-contribCheck port
ss -nltTo bind address 0.0.0.0
sudo systemctl disable postgresql
sudo vi /etc/postgresql/12/main/postgresql.confFind and edit:
listen_addresses = '*' // before is localand
sudo systemctl restart postgresql
sudo bash -c "echo host all all 0.0.0.0/0 md5 >> /etc/postgresql/12/main/pg_hba.conf"
sudo ufw allow from any to any port 5432 proto tcpsudo -u postgres psql
\passwordAuto start postgresql when boot
sudo update-rc.d postgresql enableCheck device vendor id and product id:
$ lsusb
Bus 001 Device 002: ID 8087:8000 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 078: ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader
Bus 002 Device 003: ID 8087:07dc Intel Corp.
Bus 002 Device 002: ID 5986:0652 Acer, Inc
Bus 002 Device 081: ID 22b8:2e81 Motorola PCS
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubHere my android device is Motorola PCS. So my vid=22b8 and pid=2e81.
Now create a udev rule:
sudo vi /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="2e81", MODE="0666", GROUP="plugdev"Now the device is good to be detected once udev rule is reloaded. So, let's do it:
$ sudo udevadm control --reload-rulesDownload from Go for Linux
sudo tar -C /usr/local -xzf go1.15.3.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/binIn ubuntu 20.04 using python 3.8 To set default:
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1install pip3
sudo apt install python3-pip
pip3 --versionsudo apt install ttf-mscorefonts-installer
sudo fc-cache -f -vIbus bamboo FEDORA https://software.opensuse.org//download.html?project=home%3Alamlng&package=ibus-bamboo
Change Firefox icon in Linux Mint
As root, open the text file
/usr/share/applications/firefox.desktopFind the line that says "Icon=firefox" and change it to
firefox.desktopfile