Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ubuntu 18.04 LTS getting started, things to install guide - Updated April 2020
  1. Installing NVIDIA Drivers
ubuntu-drivers devices
sudo ubuntu-drivers autoinstall
  1. From last command see nvidia-driver-number and use it in the command below and then reboot 📺 ✔️
sudo apt install nvidia-driver-#
  1. Install rclone for uploading and downloading to cloud storage and verify

    sudo apt install rclone
    rclone -V
    rclone config
    rclone listremotes
  2. Use alsamixer for audio and check gcc as well grub emulator to see your boot grub window as emulation and neofetch to see system specs 🎹 🎺

    sudo apt-get install grub-emu
    gcc --version
    alsamixer
    sudo apt install neofetch
  3. For themes and other extensions install gnome extensions and ffmpeg for merging of best audio and video of a YT video downloaded using youtube-dl 🎥 🎙️

    sudo apt install gnome-chrome-shell
    sudo apt install gnome-shell-extensions
    sudo apt install ffmpeg
  4. Installing grub customiser for easy modifications of boot options and boot time. 🛠️

    sudo add-apt-repository ppa:danielrichter2007/grub-customizer
    sudo apt-get update
    sudo apt install grub-customizer
  5. POP OS THEME INSTALLATION 🎉 🎊 🔮

    sudo add-apt-repository ppa:system76/pop
    sudo apt-get update
    sudo apt install pop-theme
  6. INSTALL ANACONDA for Python and Data Science 🐍

    wget https://repo.anaconda.com/archive/Anaconda3-2019.03-Linux-x86_64.sh
    bash Anaconda3-2019.03-Linux-x86_64.sh
    conda install -y jupyter
    conda install -y scipy
    conda install -y sklearn
    conda install -y pandas
    conda install -y pandas-datareader
    conda install -y matplotlib pillow
    conda install -y upgrade requests
    conda install -y upgrade h5py
    conda install -y nb_conda
  7. Create a new tensorflow_1 environment and install whatever is required into this folder.

    conda create --name tensorflow_1 python=3.6
    python --version
    conda list
    conda install -y jupyter
    conda install -y scipy
    pip install --upgrade sklearn
    conda install -y pandas
    conda install -y pandas-datareader
    conda install -y matplotlib
    conda install -y pillow
    conda install -y upgrade requests
    conda install -y upgrade h5py
    conda install -y nb_conda
    pip install --upgrade tqdm
    pip install --upgrade requests
    pip install --upgrade h5py
    pip install --upgrade pyyaml
    pip install --upgrade tensorflow_hub
    pip install --upgrade bayesian-optimization
    pip install --upgrade tensorflow==1.12.0
    pip install --upgrade keras==2.2.4
    pip install --upgrade keras
    conda install scipy
    pip install --upgrade sklearn
    pip install --upgrade pandas
    pip install --upgrade pandas-datareader
    pip install --upgrade matplotlib
    pip install --upgrade pillow
    pip install tensorflow-gpu
  8. Go to this link for guide on installing TensorFlow with GPU support on Ubuntu 18.04 LTS + CUDA 10.1. 🥇

  9. Go to this link to see your GPU, CPU and Hard Drive Temperatures. ♨️💻

  10. Checking whether Python3 of anaconda is being used, and installing jre followed by scala 🐍

    which python
    sudo apt-get update
    sudo apt-get install default-jre
    java -version
    pip install py4j
    wget https://www.apache.org/dyn/closer.lua/spark/spark-2.4.3/spark-2.4.3-bin-hadoop2.7.tgz
    sudo tar -xvzf spark-2.4.3-bin-hadoop2.7.tgz
    export SPARK_HOME='/home/cosmic/spark-2.0.0-bin-hadoop2.7'
    export PATH=$SPARK_HOME:$PATH
    export PYTHONPATH=$SPARK_HOME/python:$PYTHONPATH
  11. Install flatpak for additional softwares 📦

    sudo apt install gnome-software-plugin-flatpak
    flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
    gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize'
  12. Stacer to keep track of CPU, Memory, Dashboard, a much more aesthetic and performance wise better alternative of its Windows counterpart CCleaner. 💯 ♻️ 📌 🍴 1561236415424

1561236472552

1561236540472


15. Setting up Bluetooth Headphones on Ubuntu 18.04


16. Links for Configuring PyTorch and CUDA for Ubuntu
CUDA 9.0
CUDA 10.1 on Ubuntu 18.04
PyTorch Local Install Official Docs
Setting Up Ubuntu 18.04 LTS for Deep Learning and Scientific Computing


17. VSCode Setup for FrontEnd Development - Brad Traversy

18. Linux Setup for Competitive Programming - Errichto

GitHub Link


19. Auto mount Data drive


20. Install NodeJS and NPM

sudo apt update
sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates                                                               
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -                              
sudo apt-get install -y nodejs
sudo apt-get install gcc g++ make
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn 


20. Install FlatHub


21. Chrome Enable Download Notifications


22. Install peek GIF Recorder

sudo add-apt-repository ppa:peek-developers/stable\n
sudo apt-get update && sudo apt-get install peek


23. Install KDE Connect
Browse Device Bug Fix

  • Commands I use to quickly start stuff up from mobile
Name Command
Lock Screen gnome-screensaver-command -l
Ping ping google.com
Reboot systemctl poweroff
Shutdown systemctl poweroff
Unlock screen loginctl unlock-session
google firefox --new-tab google.com
vit_mail firefox --new-tab https://mail.google.com/mail/u/1/?ogbl#inbox
VSCode code
Explorer nautilius


24. Autoscroll Enable Firefox


25. Autoscroll Enable Chrome go to chrome://flags and enable smooth scrolling.


26. To have logs of commands you ran with a timestamp saved.

history >> ~/Documents/history/`date +%F`.txt


27. Get Tmux Inside a window you have sub-section called panes. Helpful in multi-tasking. Active window is highlighted with *.

Sessions: Reason TMUX is recommended so much is because it handles the processes in form of sessions. We start a tmux session, great thing about this is it preserves the state or process being run in that session, if we lose connection to server connected via ssh, if we ssh back into the server or attach back again, we would be exactly at the point where we left off, and process won't be terminated on getting disconnected, instead it would continue in the background.

Name Command
Start tmux tmux //You will see [0] that would be followed by 0: bash
Ctrl+b+%, Ctrl+b+" Split Window Vertically, Split Window Horizontally
Ctrl+B+ (Arrow Keys) Move Left,Right, Up, Down
Hold Ctrl+B+(Arrow Keys) Adjust the windows
Ctrl+B+x >> y or Ctrl+D To exit
Ctrl+B+c and Ctrl+B+ Make a new window and Switch windows
Ctrl+B+, Rename a window
Ctrl+B+d Detach from a session
tmux ls To view sessions that are running in the background
tmux attach -t 0 Attach back to the session by supplying target via -t
tmux rename-session -t 0 git Rename session 0 to git
tmux new -s docker Make a new session with some name
tmux kill-session -t git Kill a session and all windows in it


28. Fix broken CUDA Installation:

  • Link 1
  • Link 2
  • Make sure you have Python 3.7 and follow to install tf-gpu supported CUDA: Ubuntu 18.04
# Add NVIDIA package repositories
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.1.243-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo dpkg -i cuda-repo-ubuntu1804_10.1.243-1_amd64.deb
sudo apt-get update
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
sudo apt install ./nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
sudo apt-get update

# Install NVIDIA driver
sudo apt-get install --no-install-recommends nvidia-driver-430
# Reboot. Check that GPUs are visible using the command: nvidia-smi

# Install development and runtime libraries (~4GB)
sudo apt-get install --no-install-recommends \
    cuda-10-1 \
    libcudnn7=7.6.4.38-1+cuda10.1  \
    libcudnn7-dev=7.6.4.38-1+cuda10.1


# Install TensorRT. Requires that libcudnn7 is installed above.
sudo apt-get install -y --no-install-recommends libnvinfer6=6.0.1-1+cuda10.1 \
    libnvinfer-dev=6.0.1-1+cuda10.1 \
    libnvinfer-plugin6=6.0.1-1+cuda10.1


29. Go Installation
30. Conky Installation
31. Free Up Disk Space

flatpak uninstall --unused
apg-get autoremove
sudo journalctl --vacuum-size=1M
sudo df -h
sudo rm /var/log/*.gz
sudo -i >> baobab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment