Setting up an Ubuntu environment

Tried on Ubuntu 16.04.3 LTS (Xenial Xerus)

Chrome

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb

If you encounter any errors simply use

sudo apt-get -f install

To run it from terminal use google-chrome or google-chrome --incognito.

I usually run it with

and in the settings I disable

See also:

Back to top

Sublime Text

Install the GPG key:

wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -

Ensure APT is set up to work with https sources:

sudo apt-get install apt-transport-https

Use the stable channel:

echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt-get update
sudo apt-get install sublime-text

Type subl to run it from terminal.

To find where Sublime Text (or any other package) is installed:

dpkg -L sublime-text

See also:

Back to top

Vim 8

There’s an unofficial PPA that you can use to easily install Vim 8.0:

sudo add-apt-repository ppa:jonathonf/vim
sudo apt update
sudo apt install vim

That’s all. If you want to uninstall it, use the commands below:

sudo apt remove vim
sudo add-apt-repository --remove ppa:jonathonf/vim

You might also want to set Vim as the default editor for Git:

git config --global core.editor "vim"

See also:

Back to top

Git

sudo apt-get install git

If you’re used to git gui on Windows, that’s available too:

sudo apt-get install git-gui

You might also want to set Vim as the default editor for Git (make sure Vim is already installed):

git config --global core.editor "vim"

See also:

Back to top

Jekyll

sudo apt-get install ruby ruby-dev
sudo apt-get install build-essential
sudo gem install jekyll jekyll-feed jekyll-gist jekyll-sitemap

Tested with my Jekyll blog, which is extremely minimal. Perhaps you need to install more Jekyll extensions.

See also:

Back to top

Rouge

sudo gem install kramdown rouge

Edit your _config.yml settings

markdown: kramdown

kramdown:
  input: GFM
  syntax_highlighter: rouge

or, for Jekyll 3:

markdown: kramdown
highlighter: rouge

Create a css file for the highlighting style you want

rougify help style
rougify style igorpro > syntax.css

See also:

Back to top

Mafia

Mafia expects both GHC and Cabal to be installed and on the PATH.

Follow the guides below to configure your system correctly:

See also:

Back to top

The Haskell Tool Stack

curl -sSL https://get.haskellstack.org/ | sh
# or
wget -qO- https://get.haskellstack.org/ | sh

See also:

Back to top

Visual Studio Code

The repository and GPG key can be installed manually with the following script:

curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'

Then update the package cache and install the package using:

sudo apt-get update
sudo apt-get install code # or code-insiders

See also:

Back to top

Mount Shared Folders (VMware Fusion)

cd ~
mkdir folder_name
vmhgfs-fuse .host:/$(vmware-hgfsclient) ~/folder_name

See also:

Back to top

.NET Core

curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg

sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo apt-get update

sudo apt-get install dotnet-sdk-2.1.3

See also:

Back to top

Mono

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/mono-official.list
sudo apt-get update
sudo apt-get install mono-devel

See also:

Back to top

F#

sudo apt-get update
sudo apt-get install fsharp

See also:

Back to top

Dieharder

sudo apt-get install dieharder

See also:

Ration

Quickly resize and position your windows. Similar to Divvy, but for Linux.

sudo apt-get install python-gtk2 python-pip python-keybinder wmctrl
pip install ration

See also:

Back to top

APT maintenance

sudo apt-get check
sudo apt-get -f install
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove

See also:

sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update

See also:

If you get this error while trying to install a package or tool:

E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?

You can delete the lock file with the following command:

sudo rm /var/lib/apt/lists/lock

You may also need to delete the lock file in the cache directory:

sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock

See also:

Back to top


---

Author

Nikos Baxevanis
プログラマー

Tags

Feedback

Have feedback on this post? Let @nikosbaxevanis know on twitter. Need help or found a bug? Contact me.