Systemd comes with its own implementation: systemd-resolved. Ubuntu included systemd-resolved in version 16.10 and it’s now present in latest 18.04. These cause resolv.conf use 127.0.0.53 and in many case make system cannot resolve name. Continue reading “Fix systemd resolved not working (127.0.0.53)”
Change Ubuntu grub background colour
sudo -H gedit /usr/share/plymouth/themes/default.grub
And change the grub background colour as you want with RGBA code, in my case I change grub background to gray (128,128,128,0)
if background_color 128,128,128,0; then clear fi
Then, update grub
sudo update-grub
Fix cannot start Emulator in android studio
Install Required libraries
sudo apt install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386 qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils lib64stdc++6:i386
Link library to emulator path
ln -sf /usr/lib64/libstdc++.so.6 ~/Android/Sdk/emulator/lib64/libstdc++/libstdc++.so.6
Install and use angular CLI with yarn
Install yarn package manager
curl -L https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list sudo apt update sudo apt remove cmdtest sudo apt install yarn
Check yarn global bin path
sudo yarn global bin
Install angular CLI
sudo yarn global add @angular/cli
Check ng command
ng --version
Set angular use yarn as default package manager
# angular 5 ng set --global packageManager=yarn # angular 6 ng config -g cli.packageManager yarn
Install Kea DHCP server from source on ubuntu
Kea is an open source implementation of the Dynamic Host Configuration Protocol (DHCP) servers, developed and maintained by Internet Systems Consortium (ISC).
So, we can build and install Kea DHCP server from source on ubuntu. Continue reading “Install Kea DHCP server from source on ubuntu”
Fix ubuntu 17.10 java “trustAnchors parameter must be non-empty”
sudo dpkg --purge --force-depends ca-certificates-java sudo apt install ca-certificates-java
Fix lenovo laptop/tablet WiFi on ubuntu
Check WiFi adapter
rfkill list all
Add following blacklist to modprobe and then reboot
echo 'blacklist ideapad_laptop' | sudo tee /etc/modprobe.d/ideapad-laptop.conf reboot
Fix different time dual boot Ubuntu and Windows
By default Ubuntu use universal time (UTC) for real time clock (RTC) while Windows use local time for real time clock (RTC) that cause different time between OS.
To fix this we can change Ubuntu use local time.
Continue reading “Fix different time dual boot Ubuntu and Windows”
Ubuntu 16.04+ network 802.3ad LACP bonding
In juniper switch set aggregated Ethernet link mode as active
set aeX aggregated-ether-options lacp active
Edit file /etc/network/interfaces
# The loopback network interface auto lo iface lo inet loopback dns-nameservers 64.6.64.6 8.8.8.8 # eth0 slave interface iface eth0 inet manual # eth1 slave interface iface eth1 inet manual # bond0 trunk interface auto bond0 iface bond0 inet manual slaves eth0 eth1 bond-mode 4 bond-miimon 100 bond-downdelay 200 bond-updelay 200 bond-lacp-rate 1 bond-xmit-hash-policy layer3+4 #post-up ifup eth0 eth1 # bond0.2 vlan 2 interface auto bond0.2 iface bond0.2 inet static vlan-raw-device bond0 address 192.168.1.10 gateway 192.168.1.1 netmask 255.255.255.0 pre-down ip -4 addr flush dev $IFACE # bond0.3 vlan 3 interface auto bond0.3 iface bond0.3 inet static vlan-raw-device bond0 address 172.16.0.10 gateway 172.16.0.1 netmask 255.255.255.0 pre-down ip -4 addr flush dev $IFACE
Then restart networking service
service networking restart && ifdown bond0 && ifup bond0
Upgrade MariaDB 10.1 to MariaDB 10.2
Shutdown current MariaDB server
mysql -u root -p {-h remote.db.server} SHUTDOWN; exit
For safety, backup current database files
rsync -aP /var/lib/mysql /path/to/backup/ rsync -aP /etc/mysql /path/to/backup/mysql-config
Uninstall MariaDB 10.1
apt-get remove mariadb-server
Add or replace MariaDB 10.1 with MariaDB 10.2 repositories
You can find suitable server in https://downloads.mariadb.org/mariadb/repositories
My case use server in Thailand.
#/etc/apt/sources.list.d/mariadb.list # MariaDB 10.2 repository list - created 2017-08-28 07:37 UTC # http://downloads.mariadb.org/mariadb/repositories/ deb [arch=amd64,i386] http://mirrors.bestthaihost.com/mariadb/repo/10.2/ubuntu xenial main deb-src http://mirrors.bestthaihost.com/mariadb/repo/10.2/ubuntu xenial main
Install MariaDB 10.2
apt-get update apt-get install mariadb-server
Run upgrade database command
mysql_upgrade
Stop service and edit your MariaDB server with your config
# systemd systemctl stop mariadb # upstart service mysql stop # edit config file in /etc/mysql with your config
Restart MariaDB Server
# systemd systemctl restartmariadb # upstart service mysql restart