Simple record of commonly used commands after installing Ubuntu, as a backup.
Common Commands#
- System Upgrade
sudo apt update
sudo apt upgrade
- Software Installation
sudo apt install vim cmake build-essential htop neofetch axel git chromium-browser
- Disable Automatic Updates
sudo vim /etc/apt/apt.conf.d/10periodic
sudo vim /etc/apt/apt.conf.d/20auto-upgrades
sudo systemctl disable apt-daily.timer
sudo systemctl disable apt-daily-upgrade.timer
sudo apt purge update-notifier*
- Uninstall
firefox
sudo snap remove firefox
- Install
nvidia
driver
Check the graphics card driver version
sudo ubuntu-drivers list
Install a specific version
sudo ubuntu-drivers install nvidia:545
- Install conda
Visit the browser: Tsinghua Source Miniconda, download the latest version, and run the bash script.
Change pip
source
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
Change conda
source
conda config --set show_channel_urls yes
vim ~/.condarc
Add the following content:
channels:
- defaults
show_channel_urls: true
default_channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch-lts: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
deepmodeling: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/
- Configure Auto-Start Service (refer to the template)
[Unit]
Description=jupyter
After=network.target
[Service]
Type=simple
Restart=on-failure
RestartSec=5s
ExecStart=/home/acai/miniconda3/bin/jupyter-lab
WorkingDirectory=/home/acai
User=acai
[Install]
WantedBy=multi-user.target