Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ksferguson/c10945f3b7d60bf6e00789d08cea39ef to your computer and use it in GitHub Desktop.
Save ksferguson/c10945f3b7d60bf6e00789d08cea39ef to your computer and use it in GitHub Desktop.
[Ubuntu Post Install Setup] Instructions for installing applications post Ubuntu installation #Ubuntu #setup
#TODO - convert this into an installation script to help quickly setup the machine post installation
0. Time in Windows gets corrupted when dual boot with Ubuntu. (Note needed on 18.04 LTS)
First adjust hardware time in BIOS to UTC time
Windows will automatically recognise it and will display appropriate local time
For Ubuntu, update /etc/default/rcS and change line with UTC=no to UTC=yes, indicating that BOIS time is UTC.
Reboot - and check both systems.
0. Open Disks, and edit mount options for C and D drives. Remove check box for Mount at Startup and Show in user interface. Also disable Automatic mount.
0. To speed up ubuntu Updates select the best Server.
System Settings -> Software & Updates -> Download from -> Select best server
1. VIM and add alias
sudo apt install vim
edit .bashrc and add line alias vi=vim
1. Install Codecs and Flash Plugin
sudo apt-get install ubuntu-restricted-extras
2. Ubuntu tweak - For 18.04 the command is sudo apt install gnome-tweak-tool . No additional repo needs to be added. Install ubuntu-tweak for Ubuntu before 18.04
sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak
- Using gnome-tweaks tool is disable Animations from the Appreance tab. This make workspace switching a snap
- Also in the worksoace tab i disable dynamic workspaces. Keep them to three vertical.
3. Sensors
sudo apt-get install lm-sensors
sudo apt-get install psensor
psensor configuration. start psensor manually for the first time using the command `psensor`.
- Go to Pferences
- In Interface Tab, ensure Enable Menu checkbox is selected. This displays the sensor icon in the top menu bar for easy access.
- In start up all three checkboxes are selected, ensure launch session at startup is selected.
- In Providers tab ensure GPU information is being obtained using NVCtrl (Nvidia)
- Note - psensor is messing with audio resulting in clackling sound. It happens as the refresh interval of psensors is 2 seconds. I increased it to 60 seconda.
- Go to Sensor Preferences from the meu of the icon in the main menu
- For each of GPU, CPU and the 2 processor fans, i select them from the left side and then for each go to the Application Indicator tab and enable display of the sensor in the label. This will show the sensor value in the menu - which can be quickly used to see oif GPU is ON (will have a temperature value) or OFF (in which case the temperature value will be 1)
4. Git
apt-cache policy git -- compare the candidate version `Candidate: 1:2.17.1-1ubuntu0.1 for example` and check the version after the 1:. Compare that with the lates on git website and it not much difference, go ahead and install. If the version is far behind then check the apt repository ppa:git-core/ppa
sudo apt-get install git
5. GitKraken (though it does not need Git mentioned above) ## not installing going ahead as need to get confortable with git on command line
Deb from https://www.gitkraken.com/download and then use Ubuntu Software Center to install
6. Virtual Box
add to /etc/apt/sources.list
sudo -i
echo 'deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian bionic contrib' >> /etc/apt/sources/list
exit
The add the keys
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
Then
sudo apt-get update
udo apt-get install virtualbox-5.2
7. Vagrant - download the deb file and proceed installing with software manager
7.1 Dcoker
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce
Add user to docker group our you will get permission denied error when executing docker commands
sudo usermod -a -G docker $USER
Need to logout and login for this to take effect
Once done, using Ubuntu Software install Docker Integration Gnome Shell Extension .. https://extensions.gnome.org/extension/1065/docker-status/. This can also be installed from Ubuntu Software Center.
7.2 nvidia-docker.
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update
sudo apt-get install nvidia-docker2
sudo pkill -SIGHUP dockerd
8. NodeJS
Install as from here https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y build-essential gcc g++ make
sudo apt-get install -y nodejs
Optional ##not installed
## To install the Yarn package manager, run:
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
8.1 Disable touchpad when external mouse is connected to the system
sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install touchpad-indicator
Then configure as described at http://www.linuxandubuntu.com/home/how-to-disable-touchpad-while-writing-article-or-documentation-in-ubuntulinux-mint-or-derivatives-linux
8.2 In case the keyboard backlight turns off very quickly then try the procedure at http://www.dell.com/support/article/us/en/04/sln308123/how-to-configure-the-keyboard-backlight-time-out-interval-in-ubuntu-linux?lang=en
9. Gitbook cli ## Note installed. No longer using. Moved to Lepton
sudo npm install -g gitbook-cli
9.1 Lepton
Moved to Lepton as the note taking application.
Download the x86_64.AppImage file from Github releases https://github.com/hackjutsu/Lepton/releases
Copy the AppImage file to /opt/Lepton
chmod u+x that AppImage file
./run that AppImage file
Create a desktop file as below .local/share/applications/lepton.desktop. Ensure the lepton.ico file is copied to /opt
[Desktop Entry]
Comment=lepton
Terminal=false
Name=Lepton
Exec=/opt/lepton/Lepton-1.6.2-x86_64.AppImage
Type=Application
Icon=/opt/lepton/lepton.png
Refer - https://github.com/AppImage/AppImageKit/wiki/Extracting-AppImages to understand how to extract icons
10. Ruby + gems
sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev
sudo apt-get install ruby-full # as entioned at https://www.ruby-lang.org/en/documentation/installation/#apt
## old sudo apt-add-repository ppa:brightbox/ruby-ng
## old sudo apt-get update
## old sudo apt-get install ruby2.3 ruby2.3-dev
11. Jekyll
Ruby GEMS should not be installed asd root
echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME=$HOME/gems' >> ~/.bashrc
echo 'export PATH=$PATH:$HOME/gems/bin' >> ~/.bashrc
source ~/.bashrc
gem install jekyll
gem install jekyll-sitemap jekyll-gist jekyll-paginate
12. R
# We will install Microsoft R open instead of the CRAN R
# sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
# Add the below lines in /etc/apt/sources.list
# R studio
# deb http://cran.stat.ucla.edu/bin/linux/ubuntu trusty/
#sudo apt-get update
#sudo apt-get install r-base
#sudo apt-get install r-base-dev
Follow instructions at https://mran.microsoft.com/documents/rro/installation#revorinst-lin
* Download latest version of MRAN from https://mran.microsoft.com/download
* Untar the file downloaded, cd to microsoft-r-open
* sudo ./install.sh
Gettig segfault when starting R - issue https://github.com/Microsoft/microsoft-r-open/issues/34
Verified `apt list --installed` that libpng is installed `libpng16-16/bionic,now 1.6.34-1 amd64 [installed]`
```
hemen@hemen-Inspiron-7559:/usr/lib/x86_64-linux-gnu$ ls -l *png*
lrwxrwxrwx 1 root root 19 May 24 01:13 libpng16.so.16 -> libpng16.so.16.34.0
-rw-r--r-- 1 root root 202672 Sep 29 2017 libpng16.so.16.34.0
hemen@hemen-Inspiron-7559:/usr/lib/x86_64-linux-gnu$ sudo ln -s libpng16.so.16.34.0 libpng12.so.0
[sudo] password for hemen:
hemen@hemen-Inspiron-7559:/usr/lib/x86_64-linux-gnu$ ls -l *png*
lrwxrwxrwx 1 root root 19 Jul 1 09:22 libpng12.so.0 -> libpng16.so.16.34.0
lrwxrwxrwx 1 root root 19 May 24 01:13 libpng16.so.16 -> libpng16.so.16.34.0
-rw-r--r-- 1 root root 202672 Sep 29 2017 libpng16.so.16.34.0
hemen@hemen-Inspiron-7559:/usr/lib/x86_64-linux-gnu$
```
12. rstudio
Download the Ubuntu deb file from https://www.rstudio.com/products/rstudio/download/#download and install
13. Touchpad-indicator
sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install touchpad-indicator
14. Restricted Extras - various media formats - https://en.wikipedia.org/wiki/Ubuntu-restricted-extras
sudo apt-get install ubuntu-restricted-extras
15. Oracle JDK 8 (Ref - https://help.ubuntu.com/community/Java, http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html)
# sudo add-apt-repository ppa:webupd8team/java
# sudo apt-get update
# sudo apt-get install oracle-java8-installer
# sudo apt-get install oracle-java8-set-default
Transitioning to OpenJDK - https://medium.com/codefx-weekly/no-free-java-lts-version-b850192745fb
Need to understand till when is OpenJDK 8 will be supported. For now going to install it from Ubuntu apt (easier to remove)
openjdk-11-jdk currently points to openjdk-10
Keep an eye on https://adoptopenjdk.net/installation.html#x64_linux
```
hemen@hemen-Inspiron-7559:~$ apt-cache policy openjdk-11-jdk
openjdk-11-jdk:
Installed: (none)
Candidate: 10.0.1+10-3ubuntu1
Version table:
10.0.1+10-3ubuntu1 500
500 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
hemen@hemen-Inspiron-7559:~$ apt-cache policy openjdk-8-jdk
openjdk-8-jdk:
Installed: (none)
Candidate: 8u171-b11-0ubuntu0.18.04.1
Version table:
8u171-b11-0ubuntu0.18.04.1 500
500 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
500 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages
8u162-b12-1 500
500 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
hemen@hemen-Inspiron-7559:~$
sudo apt install openjdk-8-jdk
```
16. Gnu Octave ## Not installed as not needed for now.
sudo add-apt-repository ppa:octave/stable
sudo apt-get update
sudo apt-get install octave
17.0 vim keybindings
add following to ~/.vimrc
noremap ; l
noremap l k
noremap k j
noremap j h
17.1 VSCode
Reference - https://code.visualstudio.com/docs/setup/linux#_installation
But search for VSCODE in Ubuntu Software Center in install from there. It has the latest version and supports upgrade using apt
17.2 - Installed Kodi - Not installed
sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt-get update
sudp apt-get installl kodi
18. P4Merge and git configuration # DID not install for now. Can be installed later.
Copy p4v.tgz to /opt and cd to /opt
sudo mv p4v* p4v
Ensure /opt/p4v/bin is in $PATH. if not then update ~/.bashrc for the same.
Add the below to ~/.gitconfig
-----------------------------------------
[merge]
keepBackup = false;
tool = p4merge
[mergetool]
prompt = false
[mergetool "p4merge"]
cmd = p4merge "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
keepTemporaries = false
trustExitCode = false
keepBackup = false
[diff]
tool = p4merge
[difftool]
prompt = false
[difftool "p4merge"]
cmd = p4merge "$LOCAL" "$REMOTE"
keepTemporaries = false
trustExitCode = false
keepBackup = false
--------------------------------------------
19. DO NOT install i8kutils - I have noticed it interfering with the normal fan control and the machine starts heating up. Things went back to normal when it removed i8kutils.
# Instead of this I went on to install anaconda3, I removed the changes to bashrc, but kept the
# pip and virtualenv installed
# For Python never have alias for python or pip in the .bashrc. On a system it is critical to have python map to python2 and python3 map to python 3
```hemen@hemen-Inspiron-7559:~$ ls -l /usr/bin/pyth*
lrwxrwxrwx 1 root root 9 Apr 16 07:31 /usr/bin/python -> python2.7
lrwxrwxrwx 1 root root 9 Apr 16 07:31 /usr/bin/python2 -> python2.7
-rwxr-xr-x 1 root root 3633560 Apr 15 14:51 /usr/bin/python2.7
lrwxrwxrwx 1 root root 9 May 24 01:13 /usr/bin/python3 -> python3.6
-rwxr-xr-x 1 root root 4576440 Mar 31 22:46 /usr/bin/python3.6
-rwxr-xr-x 1 root root 4576440 Mar 31 22:46 /usr/bin/python3.6m
lrwxrwxrwx 1 root root 10 May 24 01:13 /usr/bin/python3m -> python3.6m
hemen@hemen-Inspiron-7559:~$
```
However we will always use anaconda
20. Install Python pip # not installed
sudo apt-get install python3-pip
sudo easy_install3 pip
sudo pip install virtualenv
sudo pip install virtualenvwrapper
vi ~/.bashrc and add the following lines
# Setup python virtualenv variables. Source the command file
export WORKON_HOME="$HOME/.virtualenvs"
export PROJECT_HOME="$HOME/Workspace"
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv
source /usr/local/bin/virtualenvwrapper.sh
30. Install Anaconda
sudo su -
addgroup --system datascience
adduser --system --ingroup datascience --disabled-login --no-create-home anaconda
usermod -a -G datascience hemen
Verify users 'hemen' and 'anaconda' using the id command. Both should have 'datascience' as a group.
mkdir /opt/anaconda3 && chown anaconda:datascience /opt/anaconda3
chmod g+w /opt/anaconda3
exit (to get back to hemen)
# One needs to logout and log in again for adding hemen to datascience to persist
./Anaconda3-4.2.0-Linux-x86_64.sh -u -p /opt/anaconda3
# Edit .bashrc, once it is update by Anaconda installer.
# ensure that $PATH, preceeds Anaconda bin
export PATH="$PATH:/opt/anaconda3/bin"
## So system python installations on /usr/bin are kept as is. Moreover Anaconda bin comes later than /usr/bin in $PATH, so system is intact.
```hemen@hemen-Inspiron-7559:~$ ls -l /usr/bin/pyth*
lrwxrwxrwx 1 root root 9 Apr 16 07:31 /usr/bin/python -> python2.7
lrwxrwxrwx 1 root root 9 Apr 16 07:31 /usr/bin/python2 -> python2.7
-rwxr-xr-x 1 root root 3633560 Apr 15 14:51 /usr/bin/python2.7
lrwxrwxrwx 1 root root 9 May 24 01:13 /usr/bin/python3 -> python3.6
-rwxr-xr-x 1 root root 4576440 Mar 31 22:46 /usr/bin/python3.6
-rwxr-xr-x 1 root root 4576440 Mar 31 22:46 /usr/bin/python3.6m
lrwxrwxrwx 1 root root 10 May 24 01:13 /usr/bin/python3m -> python3.6m
hemen@hemen-Inspiron-7559:~$ ls -l /opt/anaconda3/bin/pyth*
lrwxrwxrwx 1 hemen hemen 9 Jul 1 11:43 /opt/anaconda3/bin/python -> python3.6
lrwxrwxrwx 1 hemen hemen 9 Jul 1 11:43 /opt/anaconda3/bin/python3 -> python3.6
-rwxr-xr-x 1 hemen hemen 3752088 Jul 1 11:43 /opt/anaconda3/bin/python3.6
lrwxrwxrwx 1 hemen hemen 17 Jul 1 11:43 /opt/anaconda3/bin/python3.6-config -> python3.6m-config
lrwxrwxrwx 1 hemen hemen 9 Jul 1 11:43 /opt/anaconda3/bin/python3.6m -> python3.6
-rwxr-xr-x 1 hemen hemen 3419 Jul 1 11:43 /opt/anaconda3/bin/python3.6m-config
lrwxrwxrwx 1 hemen hemen 17 Jul 1 11:43 /opt/anaconda3/bin/python3-config -> python3.6m-config
hemen@hemen-Inspiron-7559:~$ echo $PATH
/home/hemen/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/p4v/bin:/usr/local/cuda/bin:/opt/miniconda3/bin:/home/hemen/bin:/home/hemen/gems/bin:/opt/anaconda3/bin
hemen@hemen-Inspiron-7559:~$
```
## i use anaconda python using a conda environment only - for any python development...
# Python dependency will be handled by the conda environment we create
# Creating an environemnt for data science
conda create --name datascience python=3.5
source activate datascience
which python # should use the one in /opt/anaconda
python --version # should be one from continuoum analytics
conda list
# installing sloth dependencies and sloth # did not install check other options https://en.wikipedia.org/wiki/List_of_manual_image_annotation_tools
conda install pyqt=4.11.4
conda install scikit-image=0.11.3
pip install git+https://github.com/cvhciKIT/sloth.git
which sloth
sloth
source deactivate datascience
# Now check python and we are back to the original system python
# Create an environment for kodi development
conda create --name kodidev python=2.7 beautifulsoup4
source activate kodidev
pip install kodiswift
conda list
source deactivate kodidev
31. Stellarium # did not install
sudo add-apt-repository ppa:stellarium/stellarium-releases
sudo apt-get update
sudo apt-get install
33. web-ext for Firefox and Chrome web extension development
# https://nodejs.org/en/blog/npm/npm-1-0-global-vs-local-installation/ ... since web-ext is a command used aon the shell we install it globally
sudo npm install --global web-ext
34. Xtreme Download Manager ## Not installed, why do i need this ?
sudo add-apt-repository ppa:noobslab/apps
sudo apt-get update
sudo apt-get install xdman-downloader
35 . IntelliJ IDEA and python plugin
* Downlaod Communit edition without the JDK sudo snap lfrom https://www.jetbrains.com/idea/download/index.html#section=linux
* We will use snap for IntelliJ. sudo snap list shows VSCODE is also installed on the system as a snap
```
Tried, but this was giving 503 error so going with standard approach
$ sudo snap install intellij-idea-community --classic
Once IntelliJ is working, download JB SDK Bintray Downloader plugin. Restart
Once restarted, press Ctrl+Shift+A to open the uinversal command paletter and searc for `Get JB SDK....` and using that download the latest 64 bit version on the JDK.
NOTE - Esnure you download the JDK that ends with linux_64.tar.gz, there is a 32 bit version too and download it will cause the IDE to crash
Once restart again press Ctrl + Shit + A and then search Switch Boot JRE --- and seslect the downloaded JDK. If not found it will be in ~/.Idea<version>/config/jdk directory.
Once IDEA will restart...not fonts will render properly
```
* Downloaded tar.gz without JDK from https://www.jetbrains.com/idea/download/index.html#section=linux
* cd ~/Downloads; sudo tar xzf ideaIC-2018.1.5-no-jdk.tar.gz -C /opt/
* cd /opt/idea-IC-181.5281.24/bin
* sudo chown -R /opt/idea-IC-181.5281.24
* ./idea.sh
For vim emulation in IDA Editor, create a file ~/.ideavimrc with contents source ~/.vimrc. It will source in vim keybindings and other settings and apply in the terminal.
36. Tig - ncurses based Git GIU client
Installing as per https://jonas.github.io/tig/INSTALL.html
* Get latest tar.gz from https://github.com/jonas/tig/releases/.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment