🚧 Quick-notes working with Ubuntu

Quick-notes working with Ubuntu

Some Quick-notes

These notes will be moved to another place soon

Test with ubuntu 22.04

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  # Install
  sudo apt install sshfs

  # Show help message
  sshfs --help

  # Mount from folder /data from remote-server to folder /mnt/data at local-server
  sshfs USER@SERVER:/data /mnt/data -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 ...

  # Unmount
  fusermount -u /mnt/data

1
2
3
4
5
6
  # After change your config file, run these commands
  supervisorctl reread
  supervisorctl update

  # Restart some process
  supervisorctl restart SUPERVISOR-PROGRAM-NAME
  • Problem: ???
  • Edit file vi /etc/netplan/50-cloud-init.yaml
  • Find your interface. Example ens3. Add these lines
    1
    2
    
      dhcp4-overrides:
        route-metric: 150 # This will change metric to 150.
    
  • Apply change: sudo netplan apply

  • Problem: ???
  • Edit file: /etc/docker/daemon.json
  • Add these lines:
    1
    2
    
      "mtu":1450,
      "log-driver": "none"
    

  • Download Ubuntu ISO from offical site.
  • Use tool Start Disk Creator to make bootable-usb
  • Start PC from USB, then follow the instructions.
  • Install keepass2 mate-terminal net-tools ibus-unikey gimp ttf-mscorefonts-installer ubuntu-restricted-extras imagemagick

    1
    
      sudo apt install keepass2 mate-terminal net-tools ibus-unikey gimp ttf-mscorefonts-installer ubuntu-restricted-extras imagemagick
    
  • Install driver for usbwifi

    1
    2
    3
    4
    
      cd /hdd/data/softs/rtl8812au/
      git pull origin v5.6.4.2
      sudo apt install build-essential dkms
      sudo make dkms_install
    
  • Install VPN

    • Get file ovpn from vpn server.
    • Import ovpn file.
    • Connect.
  • Change geany default font

  • Set Shortcut key for main menu is: Meta (super, window, Microsoft)

  • Vietnamese keyboard: gnome-control-center --> keyboard --> input sources --> add input sources

  • Install docker

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    
      ## Add Docker's official GPG key:
      sudo apt update
      sudo apt install ca-certificates curl
      sudo install -m 0755 -d /etc/apt/keyrings
      sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
      sudo chmod a+r /etc/apt/keyrings/docker.asc
    
      ## Add the repository to Apt sources:
      echo \
      "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] 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 apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
    
      sudo usermod -aG docker kiennd ## Change kiennd to your real username
    
  • Install vscode

    • Download file .deb from microsoft site
    • sudo dpkg -i ….
  • Set git parrams

    1
    2
    
      git config --global user.email "kienngd@gmail.com"
      git config --global user.name "Kien Nguyen"
    
  • Install drawio

  • Install Github-Desktop

    1
    2
    
      wget https://github.com/shiftkey/desktop/releases/download/release-3.3.12-linux2/GitHubDesktop-linux-amd64-3.3.12-linux2.deb  ## Remember to check the newest version
      sudo dpkg -i GitHubDesktop-linux-amd64-3.3.12-linux2.deb
    
  • Install Google chrome

    • Download file deb from google
    • sudo dpkg -i google-chrome-stable_current_amd64.deb
  • Set alias: ~/.bash_aliases

  • Config ssl:

  • Auto-mount 2nd ddd

    • Edit file /etc/fstab

      UUID=... /mount-point ext4 discard 0 0

    • systemctl daemon-reload


Related Content