Installing Bash on Windows 10

To install Bash on your Windows 10 machine, make sure you have the latest Windows 10 update and are using a 64-bit OS.
First, search for and open “Settings” from the start menu. Then click “Update & Security” as seen here:

Click on “For Developers” from the sidebar:

Select the option for “Developer mode” and select “Yes” at the prompt:

The components will take a while to install. Once this is finished, open the Control Panel, click on “Programs“, and click on “Turn Windows features on or off” under ‘programs and features.’ In the new window that pops up, scroll down and select the “Windows Sybsystem for Linux” option.

After this, restart your computer. When your computer has finished rebooting, search for bash.exe in the start menu. You should be able to install a Linux distribution from the windows store via the command prompt, and setup a Linux user by running this executable, however, sometimes you will have an error where bash.exe will not launch a command prompt window. If bash.exe will not open, go to aka.ms/wslstore on your browser to open up the Windows store, where we will manually install a Linux distribution:

In this example, we are going to install Ubuntu:

Once Ubuntu is finished installing, we will click the “Launch” button to launch Ubuntu on our Windows machine:

Once the installation completes, you will be asked to make a username and password and will immediately have access to your bash shell. From here, you can begin typing Linux commands on your own Windows machine! If launching bash.exe worked for you, it should immediately send you to this same environment to set up your username and password instead of having to install Ubuntu manually from the Windows Store:

To have access to this shell again, simply search for and open Ubuntu (or whichever distribution you chose to install) in the start menu, and you will have access to it again immediately.

Using a PowerShell script to change the lock screen and desktop background in Windows

If you are creating a Windows 10 image, you will benefit from using a PowerShell script to change the lock screen and desktop background to ensure that all the desktops in your environment are uniformly configured to have the same settings. In this particular example, our PowerShell script is going to look something like this:

The value in quotes next to $Wallpaper and $Lockscreen should match the name of the file you are planning to use for the background and lock screen.

In your C:\ drive, create a folder named ‘background’ and copy the files of the background and lock screen images into this folder. Also, copy the file containing your PowerShell script into this folder.

Next, open an administrator PowerShell prompt and type the following command:
set-executionpolicy unrestricted
Enter Y at the prompt.

Now, type the following commands in PowerShell:
cd c:\ background
./insert_script_name
(Whatever the name of your script is, simply put ./ to run it)

If successful, the PowerShell prompt should look like the following:

Once successful, restart your computer and you should see both the lock screen and desktop background change.

If you ran the script with the incorrect images, or need to undo the changes for whatever reason, search for and open regedit in the start menu to edit the Windows registry.
Then, navigate to: HKCU:\software\microsoft\windows\currentversion\policies\system
Right click on ‘wallpaper’, select ‘modify’, delete the value data, then click OK. Restart your computer, and you can attempt to run the script again with the same process above after you have made the necessary changes.

This is what the location for HKCU:\software\microsoft\windows\currentversion\policies\system looks like. HKCU is listed as “HKEY Current User” under ‘computer’ in regedit.
After you right click on ‘Wallpaper’ and select modify, you can delete the value, click OK, then restart your computer to undo the changes to the background.

How to Defragment Your Hard Drive

Over time, your hard drive will become fragmented, which can slow your computer down. Most systems will automatically defragment your hard drive regularly (once a week by default), but if you need to do it manually, you can do so by following these steps:

  1. Click the Start Menu, type “optimize”, and click the “Defragment and Optimize Drives” option that appears.
  2. Select your hard drive and click “analyze.”
  3. If the drive is fragmented, click the “optimize” button to defragment it.
  4. The process will take a while — Once it’s done, the drive should say it is 0% fragmented, and you will be finished.
  5. You can select “Change settings” if you would like to change the frequency that your hard drive is automatically defragmented.
This is where you find the Defragmentation tool.
This is where you can select your hard drive, then click to analyze and optimize it.
You can change how frequently your hard drive is automatically defragmented by clicking “change settings”.

Adding a shortcut to ‘My Computer’/ ‘This PC’ in Windows

  1. Press the Windows + R key on your keyboard in combination to bring up the run box.
  2. In the run box, type and enter:
    %appdata%\microsoft\Windows\Network Shortcuts
    This is the location where Windows will look for additional shortcuts.
  3. Right click on the empty space, select ‘new’, then select ‘shortcut.’
  4. In the “Create shortcut” dialogue box that pops up, enter the location of the program, file, or folder that you would like to insert as the shortcut. Click next, type a name for the shortcut, and then click finish.
  5. Click on “This PC” and you should see the shortcut appear under “Network Locations.”
Step 1+2
Step 3
Step 4
Step 5