New Ubuntu/Linux Mint System Install and Setup

Posted on with tags: linux / linux mint

I have been using Linux Mint since June 2019. Most times I am happy with it. It seems that version 19.x is more stable than 20.x at this time. My computer still has 19.3 installed, and eventually I will upgrade to 20.x or a newer version. Here is a short note to setup linux mint on a new computer.


Here is a list of things to do:

  1. Remove vim-tiny and install vim-gtk3. Add a ~/.vimrc, copy code from previous blog post.

  2. Map the Synology Network Drive.

  3. Install git, this step is needed for pyenv install. Do not forget to set user email and user name.

  4. Install pyenv and latest python 3.9.1.

  5. Setup SSH keys and upload to github.

  6. Download github repos with git clone.

  7. Install Chrome, VS Code (download deb packages). Chrome will ask for a keyring password, leave it blank. Check out this post for more info.

  8. Install other apps like Node, Inkscape, GIMP, etc.

  9. Copy Roboto font and Fira Code font. Font Selection tool to set default font (Ubuntu).

Add New Fonts

This tutorial has information on how to add new fonts to Linux Mint.

The easy way is to copy truetype font files into this directory.


Here is an excellent online article about how to set default fonts and font aliases on Linux.

VS Code

The VS code settings file is in this directory:


The file has these lines:

    "editor.fontFamily": "'Fira Code', 'monospace', monospace, 
      'Droid Sans Fallback'",
    "editor.fontSize": 16,
    "liveServer.settings.AdvanceCustomBrowserCmdLine": "google-chrome",
    "printcode.browserPath": "/usr/bin/google-chrome",

The print functionality of Chrome is much better than Mozilla Firefox that comes with Linux Mint installation.

Printer Driver

Canon website provides printer drivers for Debian Linux. Download the driver file, upzip it, and run sudo ./ command to install it.


Here are the output of history bash command (with edit).

# update the system
sudo apt-get update
sudo apt-get upgrade

# update vim
sudo apt-get remove vim-tiny
sudo apt-get update
sudo apt-get install vim-gtk3
vim ~/.vimrc

# mount synology network drive
sudo vim /etc/fstab 
sudo vim /etc/samba/credentials
sudo mkdir /media/synology
sudo mount -a

# git install and config
sudo apt install git
git --version
git config --global "<email address>"
git config --global "<name>"

# Install pyenv
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev 
 libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev
 libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl 

# python-openssl cann't find, remove it from list OKAY

curl | bash
vim .bashrc 

# Add those 4 lines to .bashrc for new version of
# export PYENV_ROOT="$HOME/.pyenv"
# export PATH="$PYENV_ROOT/bin:$PATH"
# eval "$(pyenv init --path)"
# eval "$(pyenv init -)"

exec "$SHELL"
pyenv install --list | grep " 3\.[6789]"

# install python under pyenv
pyenv install --help
pyenv install 3.9.1
pyenv global 3.9.1

# ssh key generation
ssh-keygen -t rsa -b 4096 -C "<email address>"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa

cat ~/.ssh/ 
cd Desktop/
mkdir git-repo
cd git-repo/
git clone<repo address>

python -V
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt 
invoke livereload

Browser Font Settings

Below are screenshots of font setting windows in Chrome and Firefox under Linux Mint.

Chrome Font
Firefox Font

Pyenv Update (4/26/22)

The new version of Pyenv needs some manual setting to make it work. After installing the pyenv, add those lines to the .bashrc file (or the four lines shown as comments above).

export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"

This works fine in Ubuntu 22.04 LTS, otherwise python command does not work. The bash cann’t find the python command. I am not sure the reason. Need to read the pyenv documentation to find out someday.

Install Nodejs

Node source does not work on Ubuntu 22.04 yet. I found a post by EntenKoeniq in github which works fine. Here are the commands,

sudo curl -LO
sudo tar -xvf node-v18.0.0-linux-x64.tar.xz
sudo cp -r node-v18.0.0-linux-x64/{bin,include,lib,share} /usr/
node --version => v18.0.0

Ubuntu/Windows Dual Bool Time Issue

When a computer has both Ubuntu and Windows system installed, the system time in Windows is wrong. The issue is described in this article.

The easy way to fix the issue is to run the commands in Ubuntu,

timedatectl set-local-rtc 1