iTranslated by AI
WSL Development Environment: Installing Essential Packages on Debian
Introduction
When building a development environment on WSL (Windows Subsystem for Linux), it is important to install the necessary basic packages.
In this article, I will explain in detail the essential basic packages required for a Debian environment on WSL.
I also provide a script to install these basic packages all at once.
By using this script, you can reduce the time and effort spent on program installation and environment configuration, allowing you to focus more on development.
Key Terms
Here are the key terms used in this article.
-
WSL (Windows Subsystem for Linux):
A platform that allows you to run a Linux environment on Windows. -
APT:
A tool widely used in Debian-based distributions to manage the installation, updating, and removal of software packages.
1. What is a Package?
1.1 Package Basics
A package bundles software and configuration files together to make their management and distribution more efficient.
Packages allow for automatic dependency resolution and bulk updates.
When you install a specific package, related packages are installed automatically, so you don't need to install everything manually.
1.2 Packages and Package Managers
To manage packages, we use software called a package manager.
A package manager is a tool that simplifies and streamlines software management, such as installing, updating, and removing these packages.
2. Packages to Install
2.1 Package List
I have listed the packages to be installed and the reasons for their selection by category.
Archivers
An archiver is a tool that compresses and stores files and directories into a single file. This makes file management and data distribution easier.
| Package Name | Description | Reason for Selection |
|---|---|---|
zip |
Creating and extracting ZIP format archive files | Essential because it is widely used for extracting files distributed on the web |
7zip |
Creating and extracting 7z format archive files | A format characterized by high compression rates, which is effective for data transfer |
File Download
These provide the functionality to download files from the internet to your PC.
| Package Name | Description | Reason for Selection |
|---|---|---|
curl |
Downloading files from the web | Used in one-liners for executing web-based installers |
wget |
Downloading files from the web | Used when saving files locally |
Development Tools
This is a collection of tools used in general programming, such as version control and Make.
| Package Name | Description | Reason for Selection |
|---|---|---|
vim |
Text editor | A powerful and versatile text editor widely used for programming |
make |
Build automation tool | A standard build tool |
git |
Version control system | The standard tool for code management |
gawk |
Interpreter for the AWK language | AWK is widely used in UNIX/Linux scripting |
Utilities
| Package Name | Description | Reason for Selection |
|---|---|---|
binutils |
Binary file manipulation utilities | Used for commands provided by the package in scripts |
file |
Identifies the type of a specified file | Used for the file command in scripts |
tree |
Displays directory trees | Used when creating Zenn entries |
man |
Displays man pages |
The man command is standard for the OS |
2.2 How to Install Packages
The following script is for installing basic packages in bulk.
By using this script, you can install the necessary packages easily and quickly.
Follow the steps below to save and run the script.
-
Create a script file
installscripts.sh. -
Save the script
Copy and paste the following script and save it to the script file.installscripts.sh#!/usr/bin/env bash pkgs=" zip 7zip curl wget vim make git gawk binutils file tree man " for p in $pkgs; do sudo /usr/bin/apt install -y $p done -
Execute the script
Run the installation script with the following command:. ./installscripts.sh
By following the steps above, you can install basic packages all at once.
Conclusion
In this article, I introduced the essential packages used when building a development environment on Debian on WSL.
Let's build an efficient development environment on WSL by utilizing the tools introduced in this article.
Happy Hacking!
References
Websites
-
Debian GNU/Linux FAQ
URL: https://www.debian.org/doc/manuals/debian-faq/
Description: Official FAQ providing frequently asked questions and answers about Debian. -
Debian Package Management Tools
URL: https://www.debian.org/doc/manuals/debian-faq/pkgtools.ja.html
Description: Official information and documentation about the package management system used in Debian. -
APT - Wikipedia
URL: https://ja.wikipedia.org/wiki/APT
Description: Detailed information about APT, the package management tool used in Debian-based Linux distributions. -
What is the Windows Subsystem for Linux?
URL: https://learn.microsoft.com/ja-jp/windows/wsl/about
Description: Official information about WSL provided by Microsoft.
Discussion