Skip to content

Latest commit

 

History

History
364 lines (282 loc) · 10 KB

File metadata and controls

364 lines (282 loc) · 10 KB

Ubuntu Development Environment Setup Guide

Table of Contents

  1. Essential Tools
  2. Development Environment
  3. Programming Languages
  4. Media Tools
  5. Additional Software

1. Essential Tools

Basic Utilities

  1. Install basic tools:

    sudo apt-get install vim vlc -y
  2. If you experience issues with VLC, add this environment variable to your ~/.bashrc:

    echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6' >> ~/.bashrc
  3. Setup SSH keys:

    ssh-keygen
    ssh-add
  4. Configure Git:

    git config --global user.email "afzalex.store@gmail.com"
    git config --global user.name "Afzal Sheikh"

2. Development Environment

Docker

  1. Install Docker Engine

  2. Add your user to the docker group:

    sudo usermod -aG docker $USER
    newgrp docker
  3. Optional: Install Docker Desktop

    gpg --generate-key
    pass init <your_generated_gpg-id_public_key>
  4. Docker Desktop Issue Fix

    If you are unable to run Docker commands without Docker Desktop being opened, run the following command:

    echo 'export DOCKER_HOST=unix:///var/run/docker.sock' >> ~/.bashrc

    This will set the DOCKER_HOST environment variable to use the Unix socket directly.

    This happens because of different context of docker, that could be seen by running docker context ls.

    If you don't want to change back the DOCKER_HOST, you will have to start docker desktop on login. Which could be done by following:

    1. Open Startup Applications (gnome-session-properties)
    2. Click Add
    3. Enter:
      Name: Docker Desktop
      Command: /usr/bin/docker-desktop
      Comment: Start Docker Desktop on boot
      
    4. Save and reboot

IDEs and Editors

Visual Studio Code

  1. Download VS Code from https://code.visualstudio.com/download
  2. Install recommended extensions for your development needs

IntelliJ IDEA

  1. Download Community Edition from https://www.jetbrains.com/idea/download/?section=linux

  2. Extract and install:

    tar -xzvf <idea.tar.gz file>
    sudo mv idea-IC* /opt/idea
    /opt/idea/bin/idea
  3. Create desktop entry through IDE: Tools > Create Desktop Entry

Cursor IDE

  1. Download Cursor from https://www.cursor.com/

  2. Install the AppImage:

    chmod +x cursor-*.AppImage
    ./cursor-*.AppImage --appimage-extract
    sudo mv squashfs-root /opt/cursor
  3. Create desktop entry:

    sudo bash -c 'cat << EOF > /usr/share/applications/cursor.desktop
    [Desktop Entry]
    Name=Cursor
    Exec=/opt/cursor/AppRun
    Icon=/opt/cursor/usr/share/icons/hicolor/256x256/apps/cursor.png
    Type=Application
    Categories=Development;Utility;
    Terminal=false
    EOF'
    sudo chmod +x /usr/share/applications/cursor.desktop
    sudo update-desktop-database
  4. Fix sandbox issues if needed:

    sudo chown root /opt/cursor/usr/share/cursor/chrome-sandbox
    sudo chmod 4755 /opt/cursor/usr/share/cursor/chrome-sandbox

Android Development

Android Studio

  1. Download and install Android Studio

  2. Set environment variables:

    cat << EOF >> ~/.bashrc
    # Android SDK environment variables
    export ANDROID_HOME=\$HOME/Android/Sdk
    export PATH=\$PATH:\$ANDROID_HOME/emulator
    export PATH=\$PATH:\$ANDROID_HOME/tools
    export PATH=\$PATH:\$ANDROID_HOME/tools/bin
    export PATH=\$PATH:\$ANDROID_HOME/platform-tools
    EOF
  3. Create desktop entry through IDE: Tools > Create Desktop Entry

Flutter

  1. Install required dependencies:

    sudo apt update && sudo apt install clang cmake ninja-build pkg-config libgtk-3-dev -y
  2. Set environment variables:

    cat << EOF >> ~/.bashrc
    # Flutter SDK path
    export PATH=\$PATH:/home/afzal/Android/flutter/bin
    export PATH=\$PATH:/home/afzal/Android/
    EOF
  3. Verify the installation:

    flutter doctor

Postman

  1. Download from https://www.postman.com/downloads/

  2. Extract and install:

tar -xzvf postman-linux-x64.tar.gz
sudo mv Postman/app /opt/postman
  1. Create desktop entry:
sudo bash -c 'cat << EOF > /usr/share/applications/postman.desktop
[Desktop Entry]
Name=Postman
Exec=/opt/postman/Postman
Icon=/opt/postman/icons/icon_128x128.png
Type=Application
Categories=Development;Utility;
Terminal=false
EOF'
sudo chmod +x /usr/share/applications/postman.desktop
sudo update-desktop-database

3. Programming Languages

Node.js and NPM

  1. First of all install nvm for managing multiple versions from https://github.com/nvm-sh/nvm

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
  2. Restart terminal and then run following command to install the latest Node.js version:

    nvm install node

Java

  1. Check available OpenJDK versions:

    apt-cache search openjdk | grep openjdk
  2. Install JDK 17 and configure alternatives:

    sudo apt-get install openjdk-17-jdk -y
    sudo update-alternatives --config java

Python (Miniconda)

  1. Download Miniconda from https://repo.anaconda.com/miniconda/

  2. Install Miniconda:

    chmod +x Miniconda3-py310_*.sh
    ./Miniconda3-py310_*.sh

4. Media Tools

Graphics Applications

Blender

  1. Download Blender from https://www.blender.org/download/

  2. Extract and install:

    sudo mv blender-* /opt/blender
  3. Create desktop entry:

    sudo bash -c 'cat << EOF > /usr/share/applications/blender.desktop
    [Desktop Entry]
    Version=1.0
    Type=Application
    Name=Blender
    Icon=/opt/blender/blender.svg
    Exec=/opt/blender/blender %f
    Comment=3D Creation Suite
    Categories=Graphics;3DGraphics;
    Terminal=false
    EOF'
    sudo chmod +x /usr/share/applications/blender.desktop
    sudo update-desktop-database

GIMP

  1. Download GIMP flatpakref from https://www.gimp.org/downloads/

  2. Install Flatpak and GIMP:

    sudo apt-get install flatpak
    flatpak install org.gimp.GIMP.flatpakref
  3. Create desktop entry:

    sudo bash -c 'cat << EOF > /usr/share/applications/gimp.desktop
    [Desktop Entry]
    Name=GIMP
    Comment=GNU Image Manipulation Program
    Exec=flatpak run org.gimp.GIMP
    Icon=/var/lib/flatpak/exports/share/icons/hicolor/256x256/apps/org.gimp.GIMP.png
    Terminal=false
    Type=Application
    Categories=Graphics;
    EOF'
    sudo chmod +x /usr/share/applications/gimp.desktop
    sudo update-desktop-database
  4. Optional: Enable terminal command access

    sudo ln -s /var/lib/flatpak/exports/bin/org.gimp.GIMP /usr/local/bin/gimp
    # Add this line if you see IBus warnings and don't need IBus input methods
    echo 'export GTK_IM_MODULE=xim' >> ~/.bashrc

    This allows you to launch GIMP by typing gimp in terminal. The second command prevents GTK warnings by switching to XIM input method, but skip it if you use IBus for typing in other languages.

Video Tools

OBS Studio

  1. For detailed installation instructions, visit https://obsproject.com/download

  2. Install OBS Studio and dependencies:

    sudo add-apt-repository ppa:obsproject/obs-studio
    sudo apt update
    sudo apt install ffmpeg obs-studio

Note: These commands are for Ubuntu 24.04 and newer. For other installation methods, including Flatpak, visit the official download page.

Utilities

qBittorrent

  1. Download AppImage from https://www.qbittorrent.org/download

  2. Install the AppImage:

    chmod +x qbittorrent-*.AppImage
    ./qbittorrent-*.AppImage --appimage-extract
    sudo mv squashfs-root /opt/qbittorrent
  3. Create desktop entry:

    sudo bash -c 'cat << EOF > /usr/share/applications/qbittorrent.desktop
    [Desktop Entry]
    Version=1.0
    Name=qBittorrent
    Exec=/opt/qbittorrent/AppRun
    Icon=/opt/qbittorrent/qbittorrent.svg
    Type=Application
    Categories=Network;FileTransfer;P2P;Utility;
    Terminal=false
    EOF'
    sudo chmod +x /usr/share/applications/qbittorrent.desktop
    sudo update-desktop-database

5. Additional Software

Web Browsers

Document Tools

Development Tools

Media

Notes

  • After installing applications, you may need to log out and log back in for some changes to take effect
  • Keep your system updated regularly using sudo apt update && sudo apt upgrade
  • Back up your configuration files before making changes