WSL
These tips are based on using the Ubuntu version of WSL.
Windows drives (usually called C and D) are available in /mnt
and you can work in these drives from the Linux command line, but the performance may be bit slow. For example, you can create directories in D
drive and make symlinks from your home directory under Linux
cd $HOME
mkdir /mnt/d/Work
ln -s /mnt/d/Work Work
mkdir /mnt/d/Tex
ln -s /mnt/d/Tex Tex
In addition, you can create symlinks to some useful Windows folders (replace USERNAME
with your Windows user name)
cd $HOME
ln -s /mnt/c/Users/USERNAME/Desktop Desktop
ln -s /mnt/c/Users/USERNAME/Documents Documents
ln -s /mnt/c/Users/USERNAME/Downloads Downloads
In Ubuntu, we install some important programs using apt
sudo apt install gcc gfortran
sudo apt install python (required by spack)
sudo apt install python3-numpy
sudo apt install python3-scipy
sudo apt install python3-sympy
sudo apt install python3-matplotlib
sudo apt install jupyterlab
sudo apt install gnuplot (install xming)
sudo apt install gv
sudo apt install xpdf
and the rest we install using Spack. Other applications can be installed on Windows side, e.g., FileZilla, FireFox, gVim, VisIt, VLC, gmsh, SourceTree, MikTex and VS Code. We can run these Windows programs from the Linux command line by defining some aliases, see sample bashrc file here which you can add at the end of your $HOME/.bashrc
file.
For instructios on setting up a WSL development environment, see this page, and for using VSCode with WSL, see this page.
Miscellaneous
- Search: press Windows Key and type your query.
- Lock screen: press Ctrl+Alt+Delete and select Lock, or press Windows key + L key.
-
Disable Windows bell sound, etc. in bash: Open
$HOME/.inputrc
and add the linesset bell-style none set completion-ignore-case on set show-all-if-ambiguous on
-
To set gvim font, add following line to file
/mnt/c/Users/USERNAME/.gvimrc
set guifont=Consolas:h11
- OpenMPI would give some warning message at end of each run; do this to get rid of this message
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope