This note about software, config in my Ubuntu.
sudo swapoff -a
sudo fallocate -l 1G /swap.img
sudo chmod 600 /swap.img
sudo mkswap /swap.img
sudo swapon /swap.img
Check: free -m
Install:
sudo apt install <package-name>
sudo apt insstall ./google-chrome-stable_current_amd64.deb
Purge:
sudo apt purge <package-name>
Autoremove:
sudo apt autoremove
Update:
sudo apt update -y
sudo apt upgrade -y
sudo apt dist-upgrade -y
sudo dpkg -i google-chrome-stable_current_amd64.deb
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt install -f
sudo apt install xserver-xorg-input-synaptics
sudo apt install gnome-shell-extensions
sudo apt install git
apt install lsd
sudo apt install neovim
sudo add-apt-repository ppa:linrunner/tlp
sudo apt install tlp tlp-rdw
Check: sudo tlp-stat
sudo apt install openjdk-17-jdk
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt install golang-go
sudo apt install qemu-kvm libvirt-daemon-system virtinst libvirt-clients bridge-utils
sudo systemctl enable libvirtd
sudo systemctl start libvirtd
sudo usermod -aG kvm $USER
sudo usermod -aG libvirt $USER
Logout
Create netplan configuration file: /etc/netplan/01-netcfg.yaml
network:
version: 2
ethernets:
eth0:
dhcp4: false
dhcp6: false
bridges:
br0:
interfaces: [eth0]
dhcp4: false
addresses: [10.254.152.27/24]
macaddress: 01:26:3b:4b:1d:43
routes:
- to: default
via: 10.254.152.1
metric: 100
nameservers:
addresses: [8.8.8.8]
parameters:
stp: false
dhcp6: false
sudo apt install virt-manager
/sbin/rmmod kvm_intel
/sbin/rmmod kvm
/etc/init.d/vboxdrv start
/etc/init.d/vboxdrv stop
/sbin/insmod /lib/modules/`uname -r`/kernel/arch/x86/kvm/kvm.ko
/sbin/insmod /lib/modules/`uname -r`/kernel/arch/x86/kvm/kvm-intel.ko
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done
# Add Docker's official GPG key:
sudo apt update
sudo apt install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
# Add the repository to Apt sources:
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo usermod -a -G docker $USER
Restart computer.
# Setup firewall
sudo ufw allow from 172.0.0.0/8 to 172.17.0.1
Add cron: sudo crontab -e
@daily docker system prune --all --force
@reboot docker system prune --all --force
Edit /etc/docker/daemon.json
{
"log-driver": "json-file",
"log-opts": {
"max-size": "10m",
"max-file": "3"
}
}
curl https://pkg.cloudflareclient.com/pubkey.gpg | sudo gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflare-client.list
sudo apt update
sudo apt install cloudflare-warp
warp-cli register
warp-cli connect
For Debian-based
curl https://pkg.cloudflareclient.com/pubkey.gpg | sudo gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflare-client.list
sudo apt update
sudo apt install cloudflare-warp
warp-cli register
warp-cli connect
Check
curl -s https://www.cloudflare.com/cdn-cgi/trace/ | grep warp
sudo apt-add-repository ppa:remmina-ppa-team/remmina-next
sudo apt install remmina remmina-plugin-rdp libfreerdp-plugins-standard
sudo apt install p7zip-full p7zip-rar
sudo apt install chromium-browser
sudo add-apt-repository ppa:libreoffice/ppa
sudo apt install libreoffice
sudo apt install simplescreenrecorder
sudo apt install goldendict goldendict-wordnet
Open file /etc/NetworkManager/NetworkManager.conf
And add a line: managed=true
sudo dpkg --add-architecture i386
wget -O- https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/
sudo apt install winehq-stable
Lastly run winecfg
in the terminal to make sure it configures Wine correctly.
sudo apt install winetricks
sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt install kodi
sudo add-apt-repository ppa:qbittorrent-team/qbittorrent-stable
sudo apt install qbittorrent
sudo add-apt-repository ppa:caffeine-developers/ppa
sudo apt install caffeine
sudo apt install wireguard
sudo swapoff -a
sudo dd if=/dev/zero of=/swapfile bs=1G count=8
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
Edit /etc/fstab and add the new swapfile if it isn’t already there
/swapfile none swap sw 0 0
Check the amount of swap available
grep SwapTotal /proc/meminfo
Open the /etc/sysctl.conf
file and add the following to the bottom of the file:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Then type sudo sysctl -p
to activate your changes
sudo vmware-modconfig --console --install-all
openssl req -new -x509 -newkey rsa:2048 -keyout VMWARE.priv -outform DER -out VMWARE.der -nodes -days 36500 -subj "/CN=VMWARE/"
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./VMWARE.priv ./VMWARE15.der $(modinfo -n vmmon)
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./VMWARE.priv ./VMWARE15.der $(modinfo -n vmnet)
tail $(modinfo -n vmmon) | grep "Module signature appended"
sudo mokutil --import VMWARE.der
Reboot
mokutil --test-key VMWARE15.der
Step 1: Shut down the VMware guest machine
Step 2: At you host, enable the promiscuous mode
sudo chmod a+rw /dev/vmnet0
or
sudo chmod 666 /dev/vmnet*
Reference: https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=287
ls -la /dev/disk/by-uuid/
lấy uuid của ổ đĩa, copy vào file /etc/fstab
vi du:
lrwxrwxrwx 1 root root 10 Th05 20 15:01 01CE66839C56B480 -> ../../sdb7
lrwxrwxrwx 1 root root 10 Th05 20 15:01 01D156D38069CA80 -> ../../sda6
lrwxrwxrwx 1 root root 10 Th05 20 15:01 01D1A8D1FE953E80 -> ../../sdb6
lrwxrwxrwx 1 root root 10 Th05 20 15:01 741A807E1A803EDC -> ../../sdb8
lrwxrwxrwx 1 root root 10 Th05 20 15:01 a71f0696-9d2b-41e6-b391-cb340b8f724d -> ../../sdb5
lrwxrwxrwx 1 root root 10 Th05 20 15:01 E04448E44448BED2 -> ../../sda1
lrwxrwxrwx 1 root root 10 Th05 20 15:01 f4bec8ae-68bf-404c-a6a2-846f08791117 -> ../../sda7
sửa file /etc/fstab
UUID=a71f0696-9d2b-41e6-b391-cb340b8f724d /data ext4 defaults 0 0