WSL openSUSE for web dev
So I had a play around with the openSUSE Leap 15.2 you can get on the Windows store and after familiarising myself with it decided to see if I could use it for web development.
Well, yeah, you can, that’s it, that’s the post!
There’s a few subtle diffrences between doing it with Ubuntu/Debian which I’m going to cover here.
First up, I couldn’t get GUI app working for using tools like Cypress, Playwright etc. I did get it to a state where you could run node on it and have git working with VS Code.
I couldn’t spend any more time trying to work out the missing parts and this was more to see if I could use it like any other Linux distro I use.
Update and upgrade
The equivalent to sudo apt
in openSUSE is sudo zypper
so in
openSUSE to do a sudo apt update && sudo apt upgrade
you do this:
1sudo zypper ref && sudo zypper up
In openSUSE ref
or refresh
are equivalent to update
in
Ubuntu/Debian and up
or update
in openSUSE are equivalent to
upgrade
in Ubuntu/Debian.
Install dev tools
I’ve recently become a fan of using Zsh over Fish, I made notes on it and also done a stream on a full customisation.
I’ll start with adding in Zsh:
1# search for zsh2sudo zypper search zsh3# install zsh4sudo zypper in zsh
Then set the default shell to Zsh and install Oh My Zsh:
1# default the shell to Zsh2chsh -s $(which zsh)3# install git4sudo zypper in git5# one liner to install OMZ6sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Nano is my preferred terminal text editor, I’ll nee install that too:
1sudo zypper search nano2sudo zypper in nano
Rather than install Node with zypper
I’ll use nvm:
1curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | zsh2source ~/.zshrc3# confirm install4command -v nvm5# install preferred node version6nvm install 14
Add Yarn
Install yarn, the script is for bash here but it also adds the $PATH
variable to the .zshrc
file.
1curl -o- -L https://yarnpkg.com/install.sh | bash2source ~/.zshrc3yarn -v
Check that the following has been added to the .zshrc
file and add
it manually if it’s not there:
1export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
Add SSH keys
As with Ubuntu/Debian I can pop open the openSUSE file system in the
Windows file explorer by using the handy dandy explorer.exe .
that
comes with WSL2.
This means I can open the home folder of my user and add in some SSH keys I use for other WSL instances.
Be wary here, when pasting the files in they have a default owner and
group of root
:
1# change ownership of folder and contents2sudo chown scott:users .ssh/ .ssh/* .gitconfig3# change .ssh/ .ssh/* permissions4# change to the .ssh folder5~/.ssh/6sudo chmod 644 id_rsa.pub7sudo chmod 600 id_rsa8sudo chmod 644 known_hosts9# change out to set the folder permissions10../11sudo chmod 700 .ssh/12# authenticate with GitHub13ssh -T git@github.com
Recap and wrap!
That’s it for this, like I said at the top this is just me seeing if I can use openSUSE for doing web dev on.
What I covered:
- The diffrences to updating and installing on Ubuntu/Debian
- Installing required tools for web development, Zsh, git, nano
- Adding SSH keys from another Ubuntu/Debian install
I can now clone git repos and work on them as I would with Ubuntu/Debian. Just no GUI app at the moment!
Thanks for reading 🙌
Back to Top