Setting up a Web Develop Environment in Debian
@israel-laguanIsrael Antonio Rosales Laguan
I love to work from home, and work at night.
I am on Microverse working with a lot of people new to Software Development with Linux (I use this word to refer to Linux OS
and all his derivatives or distros), and in web development we use certain tools and pipelines that are more difficult to set up in Windows. So I found that most of the people new to Linux struggle to set up the tooling and basic commands for the first time.
This article tries to provide my dev environment as an example (I am not affiliated or related to any site or tool mentioned or linked here). I am using Debian 9, but most of the commands are similar in derivative distros as Ubuntu, Elementary, Mint or LinuxMX, e.g. all the ones that use `
` or packages `
`. I'll assume the one reading this article will just copy-paste the commands.
To me a great develop environment needs:
- An IDE or good text editor
- version control system
- the programming languages for you to develop
- some useful tools and utilities
I will concentrate myself in web development, so I'll go installing the following stack:
- vscode: text editor, along some extensions for web development
- git: version control standar, and some
functions, aliases and tricks
- some useful tools for web developers (screenshots, GIMP, VLC, Slack, teamViewer and dev fonts)
If you found some commands to be outdated or wrong for you, please comment the command that worked for you, along with your specs. I must note this is my actual machine, kernel and specs:
Please be sure you have
, if not visit this link
. From now on, when you type
you must enter your password on the terminal.
Check if system is updated:
sudo apt update
sudo apt upgrade -y
When you are ready, install these packages for develop in Linux:
sudo apt install make curl build-essential openssl libssl-dev unzip
A nice editor: Visual Studio Code
The easiest way to install it is using the precompiled package from Microsoft here
(press the button that says .deb Debian, Ubuntu
). You'll get in your
folder (or the place the browser put the file) a
package. But double click it won't do any help, you must install it using your terminal. Go ahead and open a terminal, then type (don't forget to changes the "x" in the command to the numbers in your file) :
sudo apt install ./code_x.xx.x-xx_amd64.deb
Also you can use tab for auto completion, learn here
will auto magically set up everything and when all is finished you can open vcsode
from your terminal (typing
), menu or launcher.
Extensions for VSCode
VSCode have a lot of extension on their Marketplace
, but filtering only web development extensions we found a great selection. The following are my favorites:
How to install them? One way is searching those on the marketplace and copy the command for install, for example:
Then inside of VSCode press
or in the menu go to View
then Command Pallete
and you'll get:
and the extension would be installed. More info here
A standard version control system: git
Luckily for us, git is super easy to install:
sudo apt install git
You must be greeted with your git's version.
But we have to make an extra setup: identify yourself. For this you need to create an account. Provide your name and email address, Git embeds this information into each commit we do, like this:
git config --global user.name "Your Name"
git config --global user.email "email@example.com"
Remember to put your name (or nickname) and your email. Now you should have Git installed and ready to use on your system.
functions, aliases and tricks
As git is so important in modern development, its great to know that we have several utilities and helper for manage git. And most of them are available for Debian.
One way is to use `
` terminal commands, like `
`. Talking about config you can use `
git config -l
`to get info about certain repository, like the GitHub/GitLab repository or the branches you had worked on.
As you can notice on the last screenshot I use some aliases or helper functions. In the aliases dept I like to use short versions of normal commands. For example instead of `
i can use only `
` or even `
`, is up to you. You can find here
a good guide about what aliases are people recommending and how to set up.
Did you commited something that was not supposed to commit (like secret keys!) or messed up working code? I found helping this guide
where you found a comprehensive guide for fixing bad commits/push/merges.
I found difficult to install
in Windows in comparison to install it on Linux, and this was one of the main reason I fully embraced Ubuntu and later Debian as my main OS. If you want to program for the web you will need NodeJS
sooner or later.
To install the current LTS version (other versions here
) you must use your terminal:
curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -
sudo apt install -y nodejs
From here you can use all the packages and helpers from node and npm. Here is a quick guide
for getting started.
Now you can use VSCode for making scripts and code to run over NodeJS, save it in a repository using Git and share it to the world. Go out there and find some great resources to learn
Some useful tools for web developers in Debian
: all Debian variants have support for using Print key, but if you want something more let me recommend you OBS
For manipulate (raster) images you have The GIMP, but if you prefer something easy but powerful try Pinta
If you want to be in touch with your team you can install Slack
, but of them using your terminal.
Do you have more useful tools for web developers on Debian? Any comment or suggestion? Feel free to comment and share! Lets use Debian at full capacity!
Subscribe to get your daily round-up of top tech stories!