In this guide, I will walk you through installing the Windows System for Linux (WSL), Kali Linux, and configuring the XFCE desktop manager. Let’s get started:
- We need to install the WSL so right click on the Start Button and select Windows PowerShell (Admin). If you already have WSL installed, skip steps 1-3.
- Copy and paste the following command and hit Enter to run it:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
3.Reboot your PC.
4. Next, let’s install Kali Linux. Search for Kali Linux in the Microsoft App store app or click this link to open it directly.
5.Click the Get button to begin the download and install.
6.Once installed, click the Launch button. Alternatively, you can use the new Start menu shortcut or simply go to PowerShell or command prompt and type kali and hit Enter. On the first run, the install must complete. This will take a little while.
7.Once installed, it is time to setup your WSL username and password. This can be anything and does not need to match your Windows username and password. Keep note of this information, you will need it to elevate your rights with sudo later and log into the desktop manager.
8.Now we need to setup the XFCE desktop manager but need to install some utilities first. Run the following command to install wget which is a utility that can download files over HTTP. Enter your password you created in the previous step when prompted and hit Y to proceed with the download and install.
sudo apt-get install wget
9.Run the following command to download the install script.
10.Execute the script downloaded by running the following. This step will take a very long time to execute and you will need to answer some questions about keyboard layout right in the middle.
sudo sh xfce4.sh
11.Now it is time to start up the xrdp server so that we can connect to the XFCE desktop manager using Remote Desktop. Run the following command and note the port number listed in the output.
sudo /etc/init.d/xrdp start
12.Once the xrdp server has started, open up Remote Desktop (mstsc) on your PC and connect to 127.0.0.1:3390 where 3390 is the port displayed in step 11.
13.Log in with the Unix credentials setup in step 7.
- Click Use default config, and you are done.
When you are done using Kali Linux it is best to shut down the xrdp server by running sudo /etc/init.d/xrdp stop at the Kali Linux Rolling prompt. Enjoy!
credits – Steve Sinchak