-
Notifications
You must be signed in to change notification settings - Fork 13
ORNL WSL2 Installation
To conform to the enforced security protocols on an ORNL computer, WSL
must be installed using the following instructions. These instructions are specific to the Windows 10 operating system. If using Windows 11 or newer, some details may have changed.
-
Open the
Privilege Elevation Tool - Self Service
application and generate a request with the following information:-
Reason for Privilege Elevation:
WSL install
-
Category of Privilege Elevation:
Install/Uninstall Software
If you do not have access to the tool, you can request it via
UCAMS
or ask a team member to assist you. -
Reason for Privilege Elevation:
- Save the generated credentials for use in the next step.
- Logout of your user account and login as the admin user using the credentials you just generated.
-
Open a Powershell and install
WSL
:-
Update
WSL
:wsl --update
If a help message appears, you can ignore this step and
WSL
will be updated when installed. -
Install
WSL
:wsl --install -d Debian
-
Update
- Restart your computer and login under your regular user account.
-
Open a PowerShell and install
Ubuntu
:-
Run:
wsl --install -d Ubuntu-24.04
- When prompted to create a user account:
- Use your 3-char id for the username.
- Use any password you would like.
- Save these credentials.
When complete, you will be in an Ubuntu bash shell.
-
Run:
-
Configure Ubuntu's DNS servers to use the internal resolution:
-
Run:
sudo bash -c 'echo -e "[network]\ngenerateResolvConf = false" >> /etc/wsl.conf'
This disables the DNS pass-through from Windows to WSL.
- When prompted for your password, use the password you just set for your Ubuntu account.
-
Open another Powershell and retrieve your host DNS server:
Get-DnsClientServerAddress -AddressFamily IPv4
You will likely see two or more DNS servers, you can use the first address available.
-
Run:
sudo bash -c 'echo -e "DNS=[insert_dns_here]" >> /etc/systemd/resolved.conf'
Remember to replace
[insert_dns_here]
with the upstream server found in the previous step. This enables the DNS resolver from systemd and uses the upstream DNS servers directly.
-
Run:
-
Restart
WSL
and setUbuntu
as the default.-
Exit the Ubuntu bash shell:
exit
This should put you back in the Powershell environment.
-
Shutdown
WSL
:wsl --shutdown
-
Set Ubuntu 24.04 as the default:
wsl --set-default Ubuntu-24.04
-
Restart
WSL
:wsl
- Once back in the Ubuntu bash shell, test the DNS configuration:
ping -c 10 ornl.gov
If configured correctly, you should see a response from
ornl.gov
. If nothing happens, there is likely an issue with your DNS configuration.
-
Exit the Ubuntu bash shell:
-
Update package lists:
sudo apt update
WSL should now be installed!