Must have
sudo apt update
sudo apt install -y default-jdk openssh-server git curl net-tools make gcc
sudo apt-get purge -y firefox
sudo apt-get purge -y thunderbird*
sudo rm -rf ~/mozilla/firefox/ ~/macromedia/ ~/adobe /etc/firefox/ /usr/lib/firefox/ /usr/lib/firefox-addons/
Mount drive in linux and set auto-mount at boot
Sony headphone
Realtek rtl8188eus
Install VS code
Option 1
Install with snap
sudo snap install --classic code
Uninstall
sudo snap remove code
Option 2
Install with apt
sudo apt update
sudo apt install software-properties-common apt-transport-https wget -y
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
sudo apt install code
Uinstall
sudo apt remove code
Update
sudo apt --only-upgrade install code
Install GPU driver
sudo ubuntu-drivers autoinstall
Uninstall
sudo apt remove --purge '^nvidia-.*'
sudo apt remove --purge '^libnvidia-.*'
sudo rm /etc/X11/xorg.conf | true
sudo rm /etc/X11/xorg.conf.d/90-nvidia-primary.conf | true
sudo rm /usr/share/X11/xorg.conf.d/10-nvidia.conf | true
sudo rm /usr/share/X11/xorg.conf.d/11-nvidia-prime.conf | true
sudo rm /etc/modprobe.d/nvidia-kms.conf | true
sudo rm /lib/modprobe.d/nvidia-kms.conf | true
sudo apt update -y && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo apt clean -y && sudo apt autoclean -y
Overwrite disk with zero
sudo dd if=/dev/zero of=/dev/sdc bs=16M status=progress
Ubuntu on Docker
Run Ubuntu Linux in Docker with Desktop Environment and VNC
docker run -d \
--name ubuntu \
-e VNC_PASSWORD=StrongPassword \
-v /dev/shm:/dev/shm \
-p 6080:80 \
-p 5900:5900 \
dorowu/ubuntu-desktop-lxde-vnc
Unix Startup Scripts
Create a /etc/systemd/system/xxx.service like the followings, run systemctl enable xxx.service
[Unit]
Description=Apache Jena Fuseki
After=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/home/mbt/apache-jena-fuseki-4.2.0/fuseki restart
[Install]
WantedBy=multi-user.target
[Unit]
Description=Docker Compose Application Service
Requires=docker.service
After=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/srv/docker
ExecStart=/usr/local/bin/docker-compose -f /home/mbt/mortar/docker-compose.yml up
ExecStop=/usr/locak/bin/docker-compose down
TimeoutStartSec=0
[Install]
WantedBy=multi-user.target
nmcli
sudo apt install -y network-manager
nmcli activation failed with no reason
https://forum.radxa.com/t/unable-to-connect-wifi-ap/493/15
change connection name
nmcli con modify Mobile con.id mobile
wpa_supplicant
wpa_cli scan
wpa_cli scan_result
wpa_cli status
route priorities
route -n
# one time only
ifmetric wlan0 100
# permanent
nano /etc/network/interface.d/eth0
# or
nano /etc/dhcpcd.conf
# add the following lines
interface eth0
metric 0
cat
show cpu cores
cat /proc/cpuinfo
show memory space
cat /proc/meminfo
os version
cat /etc/issue
cat /proc/version
change owner and group
chwon root:docker file
How to static IP address on Debian Linux
https://www.cyberciti.biz/faq/add-configure-set-up-static-ip-address-on-debianlinux/
Configuring Static IP on Debian
The /etc/network/interfaces[/file] contains network interface configuration information for Debian Linux. Hence, edit the file:
sudo vim /etc/network/interfaces
## OR ##
sudo nano /etc/network/interfaces
Look for the primary network interface enp0s5:
allow-hotplug enp0s5
iface enp0s5 inet dhcp
Remove dhcp and allow-hotplug lines. Append the following configuration to set up/add new static IP on Debian Linux 10/11. Here is my sample config file:
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto enp0s5
iface enp0s5 inet static
address 192.168.2.236
netmask 255.255.255.0
gateway 192.168.2.254
dns-domain sweet.home
dns-nameservers 192.168.2.254 1.1.1.1 8.8.8.8
Save and close the file when using vim/vi text editor.
Restart networking service on Debian Linux to switch from DHCP to static IP config Warning: Do not run the following over ssh based session as you will disconnect.
Use the systemctl command as follows:
sudo systemctl restart networking.service