Linux - Quick Setup Guide for Development Environment

Development Environment
Jan 2025
LinuxUbuntuDockerJavaPythonMavenGradle

"A comprehensive guide to setting up a development environment on Linux, covering essential tools and software."

Linux - Quick Setup Guide for Development Environment
Table of Contents

Essential tools for software development in Linux environment. (Below setup was being used for Ubuntu)

Initial System Configuration and Prerequisites

Before installing any development tools, update the system packages and install required dependencies.

sudo apt update
sudo apt upgrade -y
sudo apt install -y curl wget unzip git build-essential libssl-dev zlib1g-dev \
                    libbz2-dev libreadline-dev libsqlite3-dev llvm libncursesw5-dev \
                    xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev

This command installs essential tools and libraries for development on Linux:

  • Core utilities: curl, wget, unzip, and git for downloading, unzipping files, and version control.
  • Build tools: build-essential for compiling (includes gcc, g++, and make).
  • Development libraries: SSL (libssl-dev), compression (zlib1g-dev, libbz2-dev, xz-utils, liblzma-dev), database (libsqlite3-dev), and XML (libxml2-dev, libxmlsec1-dev).
  • Other libraries: libreadline-dev, libncursesw5-dev, and libffi-dev for terminal input, text UI, and foreign function interface support.

Programming Language Environments

SDKMAN: Java Development Kit and Build Tools

SDKMAN is a tool for managing parallel versions of SDKs. We'll use it to install Java 17 and Maven.

  1. Install SDKMAN:
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
  1. Install Java 17, Maven, Gradle:
sdk install java 17.0.8.1-tem
sdk install maven
sdk install gradle
  1. Verify installation:
java --version
mvn --version
gradle --version

pyenv: Python Version Management

pyenv is a tool to manage multiple Python versions on your system.

  1. Install pyenv:
curl https://pyenv.run | bash
  1. Add pyenv to shell startup:
source ~/.bashrc
  1. Install and set Python 3.12.3:
pyenv install 3.12.3
pyenv global 3.12.3
python --version

Containerization and Services

Docker: Containerization Platform

Docker is a containerization platform that allows you to develop, deploy, and run applications in containers.

  1. Install Docker:
sudo apt update
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y docker-ce
  1. Start Docker on boot:
sudo systemctl enable docker
sudo systemctl start docker
  1. (Optional) Add user to the Docker group:
sudo usermod -aG docker ${USER}

Development and Productivity Tools

Database Management: DBeaver

  1. Install DBeaver:
sudo apt install -y dbeaver-ce

Code Editor: Visual Studio Code

  1. Install VS Code:
sudo apt install -y code

Utility Applications

Web Browser: Google Chrome

  1. Install Google Chrome:
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install -y ./google-chrome-stable_current_amd64.deb

Office Suite: LibreOffice

  1. Install LibreOffice:
sudo apt install -y libreoffice

System Cleanup and Maintenance

sudo apt autoremove -y
sudo apt clean

Conclusion

This guide provides a comprehensive setup for a robust Linux development environment. Feel free to customize the tools and versions according to your specific needs. Remember to always keep your system updated and secure.

Pro Tip: Consider using version managers like SDKMAN and pyenv to easily switch between different language versions and maintain project-specific environments.