DEV Community

Cover image for Linux development setup on non-Linux environment (with VSCode)
hiro
hiro

Posted on

Linux development setup on non-Linux environment (with VSCode)

Hello Windows and macOS users!

Have you ever thought about learning C/C++, or low level programming in other languages? Perhaps you've even bought a book, or explored related blogs, only to discover at the end of the day that the resources you've gathered are tailored exclusively for Linux.

"Oh... this only works for Linux..."

Now, you're faced with several options. The most costly one would be investing in dedicated hardware to fulfill your programming desire. Alternatively, you could set up a Linux virtual machine on your computer or explore cloud-based solutions, among other possibilities.

Developing Inside a Container

Or, you can create a Linux container and bind your local folder on your computer to the container, which is for free, and probably the fastest way to achieve it (if your choice of text editor is Visual Studio Code).

(It should work on Windows using the same way I haven't tried it though)

Prerequisite

  • Visual Studio Code
  • and Docker Desktop

Steps

  1. Start Docker Desktop (if you didn't)
  2. Install Dev Containers extension
  3. In your VSCode, click "Open a remote window" button on the bottom left
  4. Click "New Dev Container". Then select the language of your choice (for example, 'Go'). This will build a new Linux container for your development.
  5. Be patient until it's ready (it probably takes a few minutes...)

After finishing the steps above, you will see your dev container is up and running now!

Links

Thanks for reading ✌️

Top comments (0)