Running Ubuntu Through WSL on Windows: Essential Commands and Tool Setup
WSL Command Reference
wsl # Launch Ubuntu shell
wsl --list # Show installed Linux distributions
wsl --shutdown # Terminate all Linux instances
wsl -l -v # Display version and state of each distribution
Core Linux File Commands
Directory Navigation
cd /home/user # Navigate to specified home directory
cd .. # Move to parent directory
cd ../.. # Jump up two directory levels
cd # Return to user's home directory
cd ~username # Access another user's home directory
cd - # Switch to previous working directory
pwd # Print current directory path
File and Directory Listing
ls # Display directory contents
ls -F # Show files with type indicators
ls -l # List with permissions, size, and timestamps
ls -a # Include hidden files
ls *[0-9]* # Filter files containing digits
tree # Render directory structure hierarchically
lstree # Alternative tree display
Create and Delete Operations
mkdir new_directory # Create single directory
mkdir dir1 dir2 # Create multiple directories
mkdir -p /path/to/nested/dir # Build complete directory tree
rm -f filename # Force remove file
rmdir old_directory # Remove empty directory
rm -rf target_directory # Remove directory with contents
rm -rf dir1 dir2 # Batch remove directories
Copy, Move, and Link Commands
mv oldname newname # Rename or relocate item
cp source.txt destination.txt # Duplicate file
cp /source/* . # Copy all files from source
cp -r /tmp/source . # Recursively copy directory
cp -a dir1 dir2 # Archive copy preserving attributes
ln -s /path/to/file link # Create symbolic link
ln /path/to/file hardlink # Create hard link
touch -t 202412011200 filename # Update file timestamp
iconv -l # List supported encodings
File Search Operations
find / -name target # Search from root filesystem
find / -user username # Find files owned by user
find /home/user -name "*.bin" # Pattern matching in specific path
find /usr/bin -type f -atime +90 # Find executables unused for 90+ days
find /usr/bin -type f -mtime -7 # Locate files modified within week
find / -name "*.rpm" -exec chmod 755 '{}' \; # Search and modify permissions
find / -xdev -name "*.rpm" # Exclude removable media from search
locate "*.ps" # Quick filename lookup in database
whereis binary_name # Locate binary, source, and manual pages
which executable # Show full path of executable
Desktop Environment Configuration
Xfce4 with VcXsrv
After launching VcXsrv X Server on Windows, initialize the graphical environment:
startxfce4
Conda Environment Management
Virtual Environment Operations
# List all available environments
conda info --env
# Initialize new environment with specific Python version
conda create --name myenv python=3.9
# Create environment with predefined packages
conda create --name dataenv python=3.8 pandas matplotlib
# Activate environment for use
conda activate myenv
# Exit current environment
conda deactivate
# Duplicate existing environment
conda create --name clone_env --clone original_env
# Permanently remove environment
conda remove --name oldenv --all
# Export environment specification
conda env export > environment.yml
# Reconstruct environment from file
conda env create -f environment.yml
Package Management
# Display installed packages in current environment
conda list
# List packages in specific environment
conda list -n customenv
# Search for available packages
conda search tensorflow
# Install package (optionally with version constraint)
conda install numpy
conda install scipy=1.10.0
# Install into non-active environment
conda install --name targetenv pkg_name
# Refresh installed packages
conda update --all
conda update scipy
# Update package in specific environment
conda update -n targetenv package_name
# Remove packages
conda remove scipy
conda remove -n targetenv package_name
# Clear cached packages
conda clean -p
Scientific Visualization Tools
PyMOL
pymol
Start the PyMOL-Rosetta integration server within PyMOL:
run PyMOLRosettaServer.py
Jupyter Notebook
jupyter notebook
PyRosetta Entegration
Refer to the official PyRosetta documentation for notebook examples:
https://rosettacommons.github.io/PyRosetta.notebooks/