Windows software installation: Difference between revisions

From 22115
Jump to navigation Jump to search
(Created page with "These are instructions for how to install software and data used on the course Computational Molecular Evolution (22115) when using the Windows operating system. __TOC__ == Windows 10 == Installing and running Windows Subsystem for Linux 2 (WSL2) is simpler on Windows 11. We therefore recommend that you [https://www.microsoft.com/en-us/windows/windows-11-specifications upgrade to Windows 11 if possible]. If you can't upgrad...")
 
No edit summary
Line 3: Line 3:
__TOC__
__TOC__


== Windows 10 ==
Installing and running Windows Subsystem for Linux 2 (WSL2) is simpler on Windows 11. We therefore recommend that you [https://www.microsoft.com/en-us/windows/windows-11-specifications upgrade to Windows 11 if possible]. If you can't upgrade to windows 11, then follow the instructions for Windows 10.


# Update Windows to latest version (necessary if you want to install WSL2): [https://support.microsoft.com/en-us/windows/update-windows-3c5ae7fc-9fb6-9af1-1984-b5e0412c556a#WindowsVersion=Windows_10 Windows Update]
== Windows 11 ==
# Install Windows Terminal from Microsoft Store (free): [https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701?activetab=pivot:overviewtab Windows Terminal]
# Update Windows to latest version (necessary if you want to install WSL2): [https://support.microsoft.com/en-us/windows/update-windows-3c5ae7fc-9fb6-9af1-1984-b5e0412c556a#WindowsVersion=Windows_11 Windows Update]
# Install WSL2:  
# Install WSL2:  
## [https://www.digitalcitizen.life/open-windows-terminal/ Start Windows Terminal as administrator], and then issue the following command (followed by RETURN):
## [https://www.digitalcitizen.life/open-windows-terminal/ Start Windows Terminal as administrator], and then issue the following command (followed by RETURN):
## <code>wsl --install</code>
## <code>wsl --install</code>
## More details: [https://cloudbytes.dev/snippets/how-to-install-wsl2-on-windows-1011 How to install WSL2 on Windows 10/11]
## More details: [https://cloudbytes.dev/snippets/how-to-install-wsl2-on-windows-1011 How to install WSL2 on Windows 10/11]
# Install VcXsrv  X-server:
## Follow instructions here: [https://aalonso.dev/blog/how-to-use-gui-apps-in-wsl2-forwarding-x-server-cdj How to use GUI apps in WSL2 (forwarding X server)]
## When you need to use linux with graphical user interface software: Start the X-server by clicking Xlaunch (and just let it run in the background)
# Set Ubuntu as default profile in Windows Terminal:
# Set Ubuntu as default profile in Windows Terminal:
##  Open Windows Terminal app
##  Open Windows Terminal app
Line 27: Line 22:
## Follow instructions on [[Linux software installation]] page
## Follow instructions on [[Linux software installation]] page


== Windows 11 ==
== Windows 10 ==
# Update Windows to latest version (necessary if you want to install WSL2): [https://support.microsoft.com/en-us/windows/update-windows-3c5ae7fc-9fb6-9af1-1984-b5e0412c556a#WindowsVersion=Windows_11 Windows Update]
Installing and running Windows Subsystem for Linux 2 (WSL2) is simpler on Windows 11. We therefore recommend that you [https://www.microsoft.com/en-us/windows/windows-11-specifications upgrade to Windows 11 if possible]. If you can't upgrade to windows 11, then follow the instructions for Windows 10.
 
# Update Windows to latest version (necessary if you want to install WSL2): [https://support.microsoft.com/en-us/windows/update-windows-3c5ae7fc-9fb6-9af1-1984-b5e0412c556a#WindowsVersion=Windows_10 Windows Update]
# Install Windows Terminal from Microsoft Store (free): [https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701?activetab=pivot:overviewtab Windows Terminal]
# Install WSL2:  
# Install WSL2:  
## [https://www.digitalcitizen.life/open-windows-terminal/ Start Windows Terminal as administrator], and then issue the following command (followed by RETURN):
## [https://www.digitalcitizen.life/open-windows-terminal/ Start Windows Terminal as administrator], and then issue the following command (followed by RETURN):
## <code>wsl --install</code>
## <code>wsl --install</code>
## More details: [https://cloudbytes.dev/snippets/how-to-install-wsl2-on-windows-1011 How to install WSL2 on Windows 10/11]
## More details: [https://cloudbytes.dev/snippets/how-to-install-wsl2-on-windows-1011 How to install WSL2 on Windows 10/11]
# Install VcXsrv  X-server:
## Follow instructions here: [https://aalonso.dev/blog/how-to-use-gui-apps-in-wsl2-forwarding-x-server-cdj How to use GUI apps in WSL2 (forwarding X server)]
## When you need to use linux with graphical user interface software: Start the X-server by clicking Xlaunch (and just let it run in the background)
# Set Ubuntu as default profile in Windows Terminal:
# Set Ubuntu as default profile in Windows Terminal:
##  Open Windows Terminal app
##  Open Windows Terminal app
Line 54: Line 55:
** [https://thegeekpage.com/wsl-register-distribution-error-0x80370102/ Fix: WSL Register Distribution Error 0x80370102 issue in Windows 11 / 10]
** [https://thegeekpage.com/wsl-register-distribution-error-0x80370102/ Fix: WSL Register Distribution Error 0x80370102 issue in Windows 11 / 10]


===RStudio: use RStudio Server if RStudio Desktop does not work===
===R + RStudio: consider running Windows version instead of Linux version===
* Instead of Desktop version, you can alternatively use [https://support.rstudio.com/hc/en-us/articles/217799198-What-is-the-difference-between-RStudio-Desktop-RStudio-Workbench-and-RStudio-Server- RStudio Server]. RStudio Server is an application that provides a web-browser-based interface (instead of the standalone desktop app). Here are instructions for installing and running RStudio Server under WSL2:
* If you have any issues installing R and RStudio under WSL2, an alternative is to install Windows versions:
* In a Ubuntu session in WSL2, run the following commands to install RStudio server:
** https://posit.co/download/rstudio-desktop/
** <code> wget https://rstudio.org/download/latest/stable/server/bionic/rstudio-server-latest-amd64.deb </code>
* NOTE: if you use this approach, you will have to access files on the Linux file system from the Windows file system, or to move files back and forth. You can find more information about how to do that here (or ask chatGPT):
** <code> sudo gdebi rstudio-server-latest-amd64.deb </code>
** https://learn.microsoft.com/en-us/windows/wsl/filesystems
** <code>sudo rm rstudio-server-latest-amd64.deb </code>
* Start the RStudio server in Ubuntu:
** <code> sudo rstudio-server start </code>
*  Open a browser window in Windows
* Go to the following URL, which should give you a GUI interface (in the web browser) for rstudio running on your Ubuntu: [http://localhost:8787 http://localhost:8787/]

Revision as of 13:08, 31 January 2026

These are instructions for how to install software and data used on the course Computational Molecular Evolution (22115) when using the Windows operating system.


Windows 11

  1. Update Windows to latest version (necessary if you want to install WSL2): Windows Update
  2. Install WSL2:
    1. Start Windows Terminal as administrator, and then issue the following command (followed by RETURN):
    2. wsl --install
    3. More details: How to install WSL2 on Windows 10/11
  3. Set Ubuntu as default profile in Windows Terminal:
    1. Open Windows Terminal app
    2. Click down-arrow button on the top bar of the terminal window, and click Settings
    3. Select Startup --> Default profile --> Ubuntu
    4. Click Save, and close settings.
  4. Set Ubuntu home directory as starting directory for Windows Terminal
    1. In Windows Terminal running Ubuntu:
    2. echo "cd ~" >> ~/.profile
  5. Install Linux software:
    1. Start Ubuntu in your Windows Terminal
    2. Follow instructions on Linux software installation page

Windows 10

Installing and running Windows Subsystem for Linux 2 (WSL2) is simpler on Windows 11. We therefore recommend that you upgrade to Windows 11 if possible. If you can't upgrade to windows 11, then follow the instructions for Windows 10.

  1. Update Windows to latest version (necessary if you want to install WSL2): Windows Update
  2. Install Windows Terminal from Microsoft Store (free): Windows Terminal
  3. Install WSL2:
    1. Start Windows Terminal as administrator, and then issue the following command (followed by RETURN):
    2. wsl --install
    3. More details: How to install WSL2 on Windows 10/11
  4. Install VcXsrv X-server:
    1. Follow instructions here: How to use GUI apps in WSL2 (forwarding X server)
    2. When you need to use linux with graphical user interface software: Start the X-server by clicking Xlaunch (and just let it run in the background)
  5. Set Ubuntu as default profile in Windows Terminal:
    1. Open Windows Terminal app
    2. Click down-arrow button on the top bar of the terminal window, and click Settings
    3. Select Startup --> Default profile --> Ubuntu
    4. Click Save, and close settings.
  6. Set Ubuntu home directory as starting directory for Windows Terminal
    1. In Windows Terminal running Ubuntu:
    2. echo "cd ~" >> ~/.profile
  7. Install Linux software:
    1. Start Ubuntu in your Windows Terminal
    2. Follow instructions on Linux software installation page

Troubleshooting

Windows Subsystem for Linux

R + RStudio: consider running Windows version instead of Linux version