Run a script on boot using systemd on Ubuntu 18.04

Previous versions of Ubuntu had /etc/rc.local. that get executed after system boot. On Ubuntu 18.04, you can use systemd to start a bash script on system boot. Create file vi /etc/systemd/system/sok-startup.service Add [Unit] Description=Start up script ConditionPathExists=/etc/rc.local [Service] Type=forking ExecStart=/etc/rc.local start TimeoutSec=0 StandardOutput=tty RemainAfterExit=yes SysVStartPriority=99 [Install] WantedBy=multi-user.target Create file /etc/rc.local with #!/bin/bash touch /root/OK exit … Read more

Configure Failover IP in Ubuntu 18.04 OVH VPS

Default /etc/network/interfaces in Ubuntu 18.04 in OVH VPS look like following. Click here for Ubuntu 20.04 instructions. root@vps624512:~# cat /etc/network/interfaces # ifupdown has been replaced by netplan(5) on this system. See # /etc/netplan for current configuration. # To re-enable ifupdown on this system, you can run: # sudo apt install ifupdown root@vps624512:~# First install sudo … Read more

Ubuntu Slow Boot

Ubuntu Grub Disable Splash

Last day my PC become very slow to boot. boby@ok-pc-01:~$ systemd-analyze Startup finished in 15.777s (kernel) + 3min 1.400s (userspace) = 3min 17.178s graphical.target reached after 1min 47.169s in userspace boby@ok-pc-01:~$ It take 3 minutes and 17 seconds to boot up. This happend after i did some changes to my 2nd hard disk and added … Read more

Enable Native Notification in Google Chrome

Google Chrome Native Notification

UPDATE: Google Chrome have this option removed now. But you still can manually enable it by editing config file. See Disable Native Notification on Google Chrome Ubuntu To enable/disable native notification in Google chrome, go to chrome://flags/#enable-native-notifications Once native notification is enabled/disabled, you will be asked to restart browser. On Ubuntu 18.04, i disable Native … Read more

Ubuntu

do-release-upgrade – upgrade Ubuntu to the next release. If you are using Ubuntu 20.04 LTS, it will upgrade to 22.04 LTS. Ubuntu Desktop Ubuntu 18.04

OVH VPS Configure failover IP in Ubuntu

On Ubuntu Default config look like root@zecurecode:~# cat /etc/network/interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # Source interfaces # Please check /etc/network/interfaces.d before changing this file # as … Read more

getting huawei e8231 work on ubuntu 14.04

After connecting, i get following in lsusb root@fwhlin:~ # lsusb | grep 12d1 Bus 009 Device 004: ID 12d1:1f01 Huawei Technologies Co., Ltd. E353/E3131 (Mass storage mode) root@fwhlin:~ # It says “Mass storage mode”. If you check demesg, you will see [ 2385.775523] usb 9-2: New USB device found, idVendor=12d1, idProduct=1f01 [ 2385.775527] usb 9-2: … Read more