Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save datacustodian/d69d6bf0fbdd1634a9baa772306c1e0c to your computer and use it in GitHub Desktop.
Save datacustodian/d69d6bf0fbdd1634a9baa772306c1e0c to your computer and use it in GitHub Desktop.
Ubuntu Desktop For Software Development

Ubuntu Desktop For Software Development

Desktop Goodies

Please refer to Ubuntu Desktop Post-Installation Steps

Time Synchronization

https://www.digitalocean.com/community/tutorials/how-to-set-up-time-synchronization-on-ubuntu-16-04

It's important to keep accurate time for many software deployments. Ubuntu uses timedatectl by default, though it is useful to run with ntp.

sudo apt install ntp
sudo timedatectl set-timezone America/New_York
sudo timedatectl set-ntp on
sudo timedatectl status
sudo ufw allow from any to any port 123

Text Editor

Text Editor is a highly personal choice. vim is packaged with Ubuntu.

If you really need a GUI-based text editor, Sublime Text has become a popular choice for software development:

https://www.sublimetext.com/docs/3/linux_repositories.html

IDE

Visual Studio Code

https://code.visualstudio.com/docs/setup/linux

Essential Utilities

sudo apt install rename
sudo apt install fdupes
sudo apt install curl

Git Basic Usage

Install Git

sudo apt install git

https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup

All examples assume ~/Document/git is the location where git projects reside.

Clone a Git Project

cd /git
git config --global user.name "First Last"
git config --global user.email "myemail@example.com"
git clone git@my.git.repository:git_group/my_project.git

Create a new file, say README.md

cd ~/Document/git/my_project
touch README.md
git add README.md
git commit -m "add README"
git push [additional push options]

Recursively Add Folders and Files

To replicate the directory structure and all files under ~/Document/git/my_project/my_submodule, navigate to the project top-level directory and execute the following commands:

cd ~/Document/git/my_project
git add --all
git commit -am "<commit message>"
git push [additional push options]

pip for Python 3

sudo apt install python3-pip
sudo -H pip3 install --upgrade pip

Note that pip3 commands are run either with sudo using the -H option or without sudo. Otherwise, you will get warnings or errors about directory permissions.

Go

https://github.com/golang/go/wiki/Ubuntu

Install Go Language with Snappy

snap install --classic go

npm

sudo apt install npm nodejs-legacy

The nodejs-legacy package installs the node executable and is currently required for npm to work on Debian/Ubuntu.

MySQL

https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-16-04

sudo apt update
sudo apt install mysql-server
mysql_secure_installation

Check MySQL status:

systemctl status mysql.service

If MySQL isn't running you can start it with

sudo systemctl start mysql

Allow MySQL to autostart

sudo systemctl enable mysql

Set Unicode support as default for character set and collation variables. Among the available Unicode options, those with prefix utf8mb4 are recommended for most purposes. When you start a session logged in as an user with appropriate privileges, you can set default Unicode support options:

SET character_set_client = 'utf8mb4';
SET character_set_connection = 'utf8mb4';
SET character_set_database = 'utf8mb4';
SET character_set_results = 'utf8mb4';
SET character_set_server = 'utf8mb4';
SET collation_connection = 'utf8mb4_unicode_ci';
SET collation_database = 'utf8mb4_unicode_ci';
SET collation_server = 'utf8mb4_unicode_ci';

WARNING: Avoid changing values for character_set_filesystem, character_set_system, character_sets_dir variables without a good reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment