Linux

Created

October 9, 2022

Modified

July 28, 2025

WSL

System info


## Install the neofetch package
sudo apt install neofetch -y

## Show system info
neofetch --memory_unit gib

WSL Change sudo password

In the windows terminal, run the following command to change the sudo password:


wsl -u root

## Input the new password
passwd <username>

WSL configuration

  • WSL global config: C:\Users\<UserName>\.wslconfig
  • WSL distro config: \\wsl.localhost\Ubuntu-24.04\etc\wsl.conf

Conda

Installation


# Miniforge linux
wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh"

# Miniforge Mac
wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh"

# Install it
bash Miniforge3-$(uname)-$(uname -m).sh

# Add conda to PATH if found
if [ -f "$HOME/miniconda3/etc/profile.d/conda.sh" ]; then
    . $HOME/miniconda3/etc/profile.d/conda.sh
fi

Configuration


# Init
conda init --all

# Use mamba for faster solving
conda update -n base conda
conda install -n base conda-libmamba-solver

# Config
conda config --set solver libmamba
conda config --set always_yes true
conda config --set auto_activate_base false

# Setup channels
conda config --add channels bioconda
conda config --add channels conda-forge
#conda config --set channel_priority strict

# Install software from a specific channle
conda install -c conda-forge numpy

R environment

# Create R environment
conda create -n renv r-4.3 r-languageserver r-tidyverse r-irkernel r-httpgd

# Install bioconductor packages, all package names are lower case
conda install -n renv bioconductor-deseq2 bioconductor-edger

# Install repository packages
conda install -n renv r-qs r-fs r-tidyverse

# Remove a specific environment
conda remove --name renv --all

# Remove a software in a environment
conda remove --name renv package_name

# Export and save the conda env file with all software information
conda env export -n renv > renv.yml

# Export and save the conda env file with all software information
# without the prefix and bundle information
conda env export -n renv --no-builds > renv.yml

# Create a new environment with a environment file
conda env create -f renv.yml

# Rename an environment
conda create --name new_env_name --clone old_env_name
conda activate new_env_name
conda remove --name old_env_name --all