Skip to content

Linux Setup Tools#

Install OPENVPN#

  • Openvpn is a tool that allow your computer to connect a private virtual network. So that you can access foreign countries websites, blocked websites by network operator in your countries or the private network of your company.
  • Use command below to install OpenVpn
1
sudo apt-get install openvpn
  • To run start openvpn with .ovpn file, run command
1
sudo openvpn --config sample.ovpn

Install NeoFetch#

  • NeoFetch is a tool that show you some general information about your linux operation system and hardwares that you are using.
  • Use command below to install NeoFetch
1
sudo apt install neofetch
  • To use neofetch to view your system, run command
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
$ neofetch
            .-/+oossssoo+/-.               duc@LNV-PF38LP1Q 
        `:+ssssssssssssssssss+:`           ---------------- 
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu 20.04.4 LTS x86_64 
    .ossssssssssssssssssdMMMNysssso.       Host: 20SUS0TF10 ThinkPad P15 Gen 1 
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 5.13.0-37-generic 
  +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 1 hour, 45 mins 
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 1820 (dpkg), 12 (snap) 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: bash 5.0.17 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Resolution: 1920x1080 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   DE: GNOME 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM: Mutter 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   WM Theme: Adwaita 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Theme: Yaru-dark [GTK2/3] 
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/    Icons: Yaru [GTK2/3] 
  +sssssssssdmydMMMMMMMMddddyssssssss+     Terminal: gnome-terminal 
   /ssssssssssshdmNNNNmyNMMMMhssssss/      CPU: Intel i7-10850H (12) @ 5.100GHz 
    .ossssssssssssssssssdMMMNysssso.       GPU: Intel UHD Graphics 
      -+sssssssssssssssssyyyssss+-         GPU: NVIDIA Quadro T1000 Mobile 
        `:+ssssssssssssssssss+:`           Memory: 3713MiB / 63940MiB 
            .-/+oossssoo+/-.

Install Htop#

  • Htop is a tool that helps you to monitor your linux system.
  • To install Htop use the command below.
1
sudo apt install htop
  • To use htop, run the command

1
sudo htop
- You can view the instructions at the bottom of htop.

Install WARP VPN#

  • Go to this link to download .deb file for using on ubuntu.
  • Use the command below to install the .deb file.
1
sudo dpkg -i <name of file>
  • Then use the command below to start WARP service
1
sudo systemctl start warp-svc
  • Then use the command below to register WARP client to server. You just need to do this step one time.
1
warp-cli register
  • Then use the command below to connect WARP VPN
1
warp-cli connect
  • Use the command below to disconnect WARP VPN
1
warp-cli disconnect

MkDocs Setup#

  • Install python3-pip
1
sudo apt install python3-pip
  • Install mkdocs
1
pip3 install mkdocs
  • Install mkdocs-material
1
pip3 install mkdocs-material
  • Install mkdocs-mermaid2-plugin
1
pip3 install mkdocs-mermaid2-plugin
  • Install mkdocs-roamlinks-plugin
1
pip3 install mkdocs-roamlinks-plugin
  • Install mkdocs-awesome-pages-plugin
1
pip3 install mkdocs-awesome-pages-plugin
  • Install mkdocs-material-extensions
1
pip3 install mkdocs-material-extensions
  • Install mkdocs-glightbox plugin
1
pip3 install mkdocs-glightbox
  • Install mkdocs-rss-plugin
1
pip install mkdocs-rss-plugin
  • Upgrade mkdoc-material
1
pip3 install --upgrade --force-reinstall mkdocs-material
  • Install packages following requirements.txt file. For example we have a requirements.txt file as below.
1
2
3
4
5
6
7
8
mkdocs==1.6.0
mkdocs-awesome-pages-plugin==2.9.2
mkdocs-material-extensions==1.3.1
mkdocs-mermaid2-plugin==1.1.0
mkdocs-roamlinks-plugin==0.3.2
mkdocs-material==9.5.26
mkdocs-glightbox==0.4.0
mkdocs-rss-plugin==1.12.2
  • Then to install those packages following versions in the requirements.txt we use the command below.
1
pip3 install -r requirements.txt

Install WoE Usb#

  • This application is used for creating USB Boot Windows.
  • Update repository
1
sudo add-apt-repository ppa:tomtomtom/woeusb -y
  • Before you continue, run an APT update to reflect the newly imported PPA.
1
sudo apt update
  • Install Woe USB with GUI
1
sudo apt install woeusb woeusb-frontend-wxgtk -y

Install fish shell#

  • What is fish?: Fish shell is a terminal shell. It has many features to help developers improve coding and skills.
  • First Step: add repository
1
sudo apt-add-repository ppa:fish-shell/release-3
  • Second: update and install
1
2
sudo apt update
sudo apt install fish
  • Third: replace the original terminal
1
sudo chsh -s /usr/bin/fish
  • If you want to back to the bash terminal, type this in terminal
1
sudo chsh -s 'which bash'
  • In case, get errors with PAM: Authentication failure.
1
sudo gedit /etc/pam.d/chsh
  • Replace:
1
auth       required   pam_shells.so
  • To:
1
auth       sufficient   pam_shells.so

Install Oh My fish#

  • Oh My Fish is a Fishshell framework that allows you to install packages which extend or modify the look and feel of your shell. It is easy to use, fast and extensible. Using omf, you can easily install themes that enriches the look of your shell and install plugins to tweak your fish shell as per your wish.

  • Install oh-my-fish

1
2
3
sudo apt-get update
curl -L https://github.com/oh-my-fish/oh-my-fish/raw/master/bin/install > install
fish install
  • Install theme
1
omf install agnoster
  • List of themes

  • To setup theme

1
omf theme agnoster

Install Gnome Shell Extensions#

  • Install Gnome Shell Extensions.
1
2
sudo apt install gnome-shell-extensions
sudo apt-get install chrome-gnome-shell

Install Ibus-Bamboo#

  • Ibus Bamboo is used for typing Vietnamese on ubuntu. To install it, you need to run commands below.
1
2
3
4
sudo add-apt-repository ppa:bamboo-engine/ibus-bamboo
sudo apt-get update
sudo apt-get install ibus ibus-bamboo --install-recommends
ibus restart

Install Croc#

  • croc is a tool that allows any two computers to simply and securely transfer files and folders. AFAIK, croc is the only CLI file-transfer tool that does all of the following:

    • allows any two computers to transfer data (using a relay)
    • provides end-to-end encryption (using PAKE)
    • enables easy cross-platform transfers (Windows, Linux, Mac)
    • allows multiple file transfers
    • allows resuming transfers that are interrupted
    • local server or port-forwarding not needed
    • ipv6-first with ipv4 fallback
    • can use proxy, like tor
  • To install croc, you can go to this github page and go to Releases and download file .deb. Then run command as below.

1
2
3
sudo dpkg -i <filename.deb>

sudo dpkg -i croc_9.6.5_Linux-64bit.deb

Install Zsh#

  • Install zsh
1
sudo apt install zsh -y
  • Check zsh installed version
1
zsh --version
  • Configure zsh on Ubuntu
1
zsh
  • Then you will see the instruction for the first configuration.

    • Press 1 to go to the main menu and configure each setting individually.
    • Press 2 to populate the .zshrc configuration file with the default parameters, which you can later change manually in the .zshrc file.
    • Press 0 to create an empty .zshrc configuration file and configure everything from scratch.
    • Press q to exit the configuration and start it again the next time you enter Zsh.
  • Then let's set the zsh as default shell.

  • Firstly, let's check the default shell
1
echo $SHELL
  • If the default shell is /bin/bash then we can change it to zsh by running the command below.
1
chsh -s $(which zsh)
  • After that, let's reload the zsh by command.
1
source ~/.zshrc

Install Oh-My-Zsh#

  • Install oh-my-zsh on ubuntu.
1
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
  • Then let's change the theme of oh-my-zsh.
  • Run command below to edit .zshrc
1
gedit $HOME/.zshrc
  • If you check, robbyrussel is the default theme for zsh.
.zshrc
1
2
3
4
5
6
7
...
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="robbyrussell"
...
  • Therefore, to replace or change your zsh theme, get the name of the theme from $HOME/.oh-my-zsh/themes/ folder and substitute the robbyrussell with the new name of your preferred theme.
  • For example, to change the themes to fino-time theme, $HOME/.oh-my-zsh/themes/fino-time.zsh-theme
.zshrc
1
2
3
4
5
6
7
...
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="fino-time"
...
  • Then save and run command below to reload the zsh
1
source ~/.zshrc
  • Then we can see the result as below.

 #zoom

Post Install Zsh#

  • If you are using bash for a long time and you had put some configurations, alias and PATH in ~/.bashrc then when you switch to using zsh these configurations and settings will not working anymore. So we just simply copy configurations, PATH and alias from ~/.bashrc to ~/.zshrc then everything will work fine with zsh again.
.bashrc
1
2
3
4
5
6
7
8
9
...

. "$HOME/.asdf/asdf.sh"
. "$HOME/.asdf/completions/asdf.bash"

alias camunda-modeler='cd /home/duc/solfwares/camunda-modeler-5.14.0-linux-x64 && ./camunda-modeler'

# Load Angular CLI autocompletion.
source <(ng completion script)
.zshrc
1
2
3
4
5
6
7
8
9
...

. "$HOME/.asdf/asdf.sh"
. "$HOME/.asdf/completions/asdf.bash"

alias camunda-modeler='cd /home/duc/solfwares/camunda-modeler-5.14.0-linux-x64 && ./camunda-modeler'

# Load Angular CLI autocompletion.
source <(ng completion script)

Install Zsh plugins#

  • By default the oh-my-zsh had provided a lot of plugins in the directory $HOME/.oh-my-zsh/plugins/. Then to apply them into our zsh. We just need to open ~/.zshrc and edit the line plugins=() as below.
.zshrc
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
...

# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
    git
    npm
    dotenv
    asdf
    cp
    docker
    docker-compose
    grunt
    helm
    history
    kubectl
    minikube
    mvn
    ng
    node
    python
    spring
    sudo
    tig
    yarn
)
  • However, if we have some specific plugins that we want to configure for our zsh then we can download it under the directory $HOME/.oh-my-zsh/custom/plugins/.

  • For example, we can clone zsh-autocomplete and zsh-syntax-highlighting plugins to our directory $HOME/.oh-my-zsh/custom/plugins/ as below.

1
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
1
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
  • Then to apply them into our zsh. We just need to open ~/.zshrc and edit the line plugins=() as below.
.zshrc
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...

# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
    git
    npm
    dotenv
    asdf
    cp
    docker
    docker-compose
    grunt
    helm
    history
    kubectl
    minikube
    mvn
    ng
    node
    python
    spring
    sudo
    tig
    yarn
    zsh-autosuggestions
    zsh-syntax-highlighting
)

...

Install cmatrix#

  • To install cmatrix, let's run the command below.
1
sudo apt install cmatrix
  • To run cmatrix just use.
1
cmatrix

 #zoom

Add Ubuntu Device Into Tailscale#

1
curl -fsSL https://tailscale.com/install.sh | sh