Linux, Ubuntu, Development Environment, Programming
Linux development environment setup
December, 28, 2025
Preparation (after OS installation)
Install recommended NVIDIA drivers: Open the "Software & Updates" application, navigate to the "Additional Drivers" tab, and select the recommended NVIDIA driver for your GPU. Apply the changes and reboot when prompted. Alternatively, install via terminal:
Power Management (Powertop): Linux's battery management on laptops tends to be less optimized than other operating systems. Powertop helps optimize power consumption and extend battery life. Install with:
You can use GNOME Tweaks to adjust various settings such as themes, fonts, and extensions to enhance your desktop experience. Here are some of my favorite GNOME extensions:
Dash to Dock: Turn the GNOME dash into a nice-looking dock for easier access to applications.
Caffeine-NG: Prevents your computer from going to sleep or activating the screensaver when certain applications are running.
Blur my Shell: Adds a blur effect to the GNOME shell elements for a sleek look.
Vitals: Monitors system resources like CPU, RAM, and network usage directly from the top bar.
If you want even more customization, consider KDE Plasma desktop environment.
GDM settings: lock screen customization, auto login, etc. Install GDM settings with:
sudo apt install gdm3setup -y
Change Some Default Behaviors
Change keybinding: on Linux, copy and paste in the terminal is defaulted as Ctrl+Shift+C and Ctrl+Shift+V. To change it to Ctrl+C and Ctrl+V, open the terminal, then go to the burger menu, then Preferences > Shortcuts, and change the Copy and Paste shortcuts. After changing, restart the terminal. Now, Ctrl+Shift+C will be automatically mapped to cancel command (SIGINT), and Ctrl+C and Ctrl+V will work as expected for copy and paste.
Better Bash autocompletion: Install bash-completion for improved command-line experience:
Next, add the following line to your ~/.bashrc file to enable bash-completion automatically on terminal startup:
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
The next thing I did is to enable a menu-style tab completion by adding the following lines to ~/.inputrc:
# Show all matches immediately
set show-all-if-ambiguous on
# Enable menu-style completion
TAB: menu-complete
# Case-insensitive completion
set completion-ignore-case on
set completion-map-case on
# Mark symlinked directories
set mark-symlinked-directories on
Finally, reload it with:
bind -f ~/.inputrc
How this works: let's say you're in a folder called UCLA, with the following folders inside:
ls UCLA
CS-111 CS-180 CS-35L CS-M51A ECE-102 ECE-115C
now, when you press CS + Tab, it will rotate through different options of the CS folders. Then simply press enter to select the desired folder.
Remap certain keys (optional). One of the annoying things about Laptops made in recent years is that they come with the copilot key, which is located where the right Ctrl key should be. To remap it back to Ctrl, first install keyd to tell which keycode corresponds to the copilot key:
Settings: on Linux, again, copy and paste is defaulted as Ctrl+Shift+C and Ctrl+Shift+V. To change it back to Ctrl+C and Ctrl+V, go to Settings > Keyboard Shortcuts, and paste the following JSON:
CMake and CMake GUI: Build system generator with GUI support for easier project configuration. Install with:
sudo apt install cmake cmake-qt-gui -y
Package Managers:
Vcpkg: Microsoft's C++ package manager. Install with:
cd ~
git clone https://github.com/microsoft/vcpkg
./vcpkg/bootstrap-vcpkg.sh
export VCPKG_ROOT=~/vcpkg
export PATH=$VCPKG_ROOT:$PATH
Add the export lines to your .bashrc file to make them permanent.
Conan: Alternative C++ package manager. Install with:
pip install conan
GPU Programming:
CUDA Toolkit: GPU programming framework. Follow the installation instructions on the
NVIDIA website.
After installation, add these lines to your .bashrc:
# CUDA Toolkit paths
export PATH=/usr/local/cuda-13.1/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-13.1/lib64:$LD_LIBRARY_PATH
Replace "13.1" with your installed version.
Update the environment:
source ~/.bashrc
to update the environment variables. Verify the installation by running:
Anaconda: Python development and package management platform.
Download the installer from the
Anaconda website and follow the installation instructions. Verify installation:
source ~/.bashrc
conda --version
Managing your Anaconda environments:
Prevent Auto-Activation: If you don't want the (base) environment to start every time you open a terminal, run:
conda config --set auto_activate_base false
Create a New Environment: To create a new environment with a specific Python version, run:
conda create -n myenv python=3.10
Activate an Environment: To activate an environment, run:
conda activate myenv
Deactivate an Environment: To deactivate the current environment, run:
conda deactivate
Note: The global pip restriction mentioned earlier can interfere with pip usage inside Anaconda environments. To temporarily override it, prefix your pip commands with:
PIP_REQUIRE_VIRTUALENV=false
JavaScript and Web
Node.js and npm: JavaScript runtime and package manager. Install with:
sudo apt install nodejs npm -y
Yarn: Alternative JavaScript package manager. Install with:
npm install -g yarn
Cwebp: WebP image conversion tool. Install with:
sudo apt install webp -y
Now, you can convert images to WebP format using the cwebp command. For example:
# Convert PNG to WebP
cwebp input.png -o output.webp
# Batch convert all PNGs
for file in *.png; do cwebp "$file" -o "${file%.png}.webp"; done
Rust and Cargo
Rust and Cargo: Systems programming language with built-in package manager. Install with:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
Verify the installation by running:
rustc --version
cargo --version
Engineering Softwares
MATLAB: Numerical computing environment. Download from MathWorks and follow their installation instructions.
To add MATLAB to your application menu, create
~/.local/share/applications/matlab.desktop
with this content: