Linux - Quick Setup Guide for Development Environment
"A comprehensive guide to setting up a development environment on Linux, covering essential tools and software."
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
, andgit
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
, andlibffi-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.
- Install SDKMAN:
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
- Install Java 17, Maven, Gradle:
sdk install java 17.0.8.1-tem
sdk install maven
sdk install gradle
- Verify installation:
java --version
mvn --version
gradle --version
pyenv: Python Version Management
pyenv is a tool to manage multiple Python versions on your system.
- Install pyenv:
curl https://pyenv.run | bash
- Add pyenv to shell startup:
source ~/.bashrc
- 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.
- 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
- Start Docker on boot:
sudo systemctl enable docker
sudo systemctl start docker
- (Optional) Add user to the Docker group:
sudo usermod -aG docker ${USER}
Development and Productivity Tools
Database Management: DBeaver
- Install DBeaver:
sudo apt install -y dbeaver-ce
Code Editor: Visual Studio Code
- Install VS Code:
sudo apt install -y code
Utility Applications
Web Browser: Google Chrome
- 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
- 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.