Open the wsl's .bashrc file on Windows's portable Sublime Text with 1 click
This app allows the user to open the .bashrc file safely without having to manualy navigate from the windows file explorer to open linux files, avoiding this way accidental moving, deletion and accidentally opening the file with notepad, which would compromise it's format.
- Install wsl2
- Download the file from the
bin
folder - You can pin this app to the taskbar or start menus
- Download the portable Sublime Text
- Decompress the folder using WinRAR
- Move the folder anywhere you want to store Sublime Text
- In the search bar type
control panel
- Open
control panel
and typeenv
in the top right search bar - Click
Edit enviromental variables from your account
- At the top panel click
New
if you don't have aPath
enviromental variable else clickEdit
- Add
Path
in the variable name if it doesn't exist and clickBrowse Directory
orBrowse
if you clicked toEdit
thePath
variable - Select the folder you previously decompressed
- Click
OK
till all windows close
- Open the app
- Click the button to open and modify .bashrc
- When you finish close the folder and program
If you wanna change the default wsl distribution whose .bashrc to modify open PowerShell
and type:
wsl -l -v
to list the installed distributions and:
wsl --setdefault <DistributionName>
to change the default distribution
If you want to use something sorter than source ~/.bashrc
open wsl
and type:
echo "alias sb='source ~/.bashrc'" >> ~/.bashrc && source ~/.bashrc
This way if you have the wsl terminal open you can reload it to see changes from a modified .bashrc
by simply typing sb