Windows Subsystem for Linux (WSL)

Starting in Fall 2023, campus lab computers running Windows 11 now have Windows Subsystem for Linux (WSL) installed and enabled by default.

From Microsoft’s WSL site: https://learn.microsoft.com/en-us/windows/wsl/about

"The Windows Subsystem for Linux lets developers run a GNU/Linux environment -- including most command-line tools, utilities, and applications -- directly on Windows, unmodified, without the overhead of a traditional virtual machine or dualboot setup.

You can:

  • Choose your favorite GNU/Linux distributions from the Microsoft Store.
  • Run common command-line tools such as grep, sed, awk, or other ELF-64 binaries.
  • Run Bash scripts and GNU/Linux command-line applications including:
  • Install additional software using your own GNU/Linux distribution package manager.
  • Invoke Windows applications using a Unix-like command-line shell.
  • Invoke GNU/Linux applications on Windows.
  • Run GNU/Linux graphical applications integrated directly to your Windows desktop *
  • Use GPU acceleration for machine learning, data science scenarios and more"

* Note: No plans to support Linux GUI applications in WSL on Humboldt lab and office computers.

WSL is a relatively new addition to Windows operating systems that allows people to run native Linux applications from within Windows without having to run third party virtualization like Virtual Box.

You can start using WSL now by clicking on the Start Button and clicking on Terminal:

Windows 11 Start Menu with red arrow pointing to Terminal application.

 

After Terminal opens, click on the downward pointing caret symbol (), and click on Ubuntu:

Windows Terminal windows with a red arrow pointing to the Ubuntu Windows Subsystem for Linux option.

 

In a few seconds a new Terminal tab will appear with an Ubuntu Bash command prompt:

Windows Terminal window with the Ubuntu WSL tab opened.

You are now running Linux in Windows and can access any data created in your WSL home directory from within Windows Explorer.

Examples of working in WSL within your Windows user profile:

Example 1.
Create a file within your WSL home directory using touch and add a line of text to it:

touch ./test.txt && echo testing >> ./test.txt

Demonstration of running the touch command outlined above the image.

To access your newly created file from within your WSL home directory, click on the file folder icon on the Taskbar or open the “This PC” icon (labelled as the lab computer’s hostname in Humboldt labs) and you’ll see a Linux Tux icon on the left-hand pane of any Explorer window:

 Screenshot of Windows Explorer with an arrow pointing to the WSL Linux node.

Click on the caret to expand the tree view of the Linux node and you’ll see the root of this WSL distribution’s filesystem.

Expand out the home directory, click on student, and you’ll see the file you just created in Linux:

 Windows Explorer with an arrow pointing to the test.txt file that was created from within WSL.

That's just the beginning.

Example 2.
In this example we’re using the touch command to create a file on your Windows desktop and then running the ls command to list the contents of this directory:

Step 1: Change directories to your desktop in Windows:

cd /mnt/c/Users/abc123/Desktop (where abc123 is your Humboldt username)

(please keep in mind that commands in Linux are case sensitive.)

Step 2: Run the following touch command that creates a file called test.txt and appends the output of “echo testing” to the file:

touch ./test.txt && echo testing >> ./test.txt

You should now see test.txt appear on your Desktop:

Screenshot of a Windows desktop and the Terminal application open with arrows pointing to the test.txt file on the desktop as well as in the output after running the ls command in WSL.

Information for Faculty and Staff

The same instance of WSL that's currently installed in labs can be deployed to faculty and staff computers for evaluation. 

To do so, please file a ticket requesting WSL using the Help Desk Ticketing form, select the Office Computer radio button, and make sure to specify your workstation's property tag or hostname when submitting your ticket.



Need Help?



 Self-Service Troubleshooting

Call (707) 826-4357

Help Desk

Spring 2024 Hours


Monday - Friday 8am - 8pm
Saturday - Sunday 12pm - 4pm

After hours emergencies:
Call UPD at 826-5555

System Status

Status System Est. resolution
Available All Systems

Full System Status Information