# Linux Tools for Windows Users [TOC] ## :hammer_and_wrench: --- Basic tools --- Over the years, Windows became more and more friendly with respect to interaction with Linux environment. Recent implementation of "Windows Subsystem for Linux - version 2" [WSL2](https://docs.microsoft.com/en-us/windows/wsl/install-win10) is a significant step toward this direction and perhaps might be one of the best approach in the near feature. Despite that, there are tools that have became essential over the time and are more than enough for the purpose of effective interaction with Linux. :::success **Advise:** :pencil: - If you are a beginner - install and use [MobaXterm](https://hackmd.io/@pmitev/Linux4WinUsers#MobaXterm). - If you are familiar with Linux in general, perhaps, the most flexible setups is [WSL2](https://hackmd.io/@pmitev/Linux4WinUsers#Windows-Subsystem-for-Linux-WSL2) + X11 server. ::: --- ### ![](https://mobaxterm.mobatek.net/img/moba/xterm_logo.png) [MobaXterm](https://mobaxterm.mobatek.net/) >[color=#907bf7] Enhanced terminal for Windows with X11 server, tabbed SSH client, network tools and much more - it has [everything](https://mobaxterm.mobatek.net/features.html) you need to start. :::spoiler YouTube - MobaXTerm intro {%youtube KRpgYS-eHj8 %} ::: :::spoiler Advantages - All tools in one place, simple installation, ready to go. - **X11 server with most important configurations in the GUI!!!** - Available as portable installation. - One can install additional packages. ::: :::spoiler Disadvantages - Not the best way to transfer large files - WinSCP is one of the right choices. - Tools might get names with `.exe` at the end, that might need fixes to your bash scripts to be able to work. ::: ### ![](https://winscp-static-746341.c.cdn77.org/assets/images/logos/logo@2x.png?v=6336 =48x) [WinSCP](https://winscp.net/eng/index.php) >[color=#907bf7] With WinSCP you can copy file between a local computer and remote servers using FTP, FTPS, SCP, SFTP, WebDAV or S3 file transfer protocols. WinSCP includes also **PuTTY** in the installation. :::spoiler YouTube - How to Use WinSCP FTP Client {%youtube xW0BQIaz7Ic %} ::: :::spoiler Advantages - It simply works and supports all possible variants for file transport to common Linux and other platforms. - Supports [transfer resuming](https://winscp.net/eng/docs/resume) - [Transfer Queue / Background Transfers](https://winscp.net/eng/docs/transfer_queue) ::: ### ![](https://upload.wikimedia.org/wikipedia/commons/b/b6/PuTTY_icon_128px.png =54x) [Putty](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) > Note: The PuTTY program is included in the WinSCP installation Download and install the .msi package. If for some reason you are restricted and cannot use the installer - download the 64-bit executable `putty.exe` and `pageant.exe` and save it for convenience on your Desktop. :::spoiler YouTube - PuTTY Tutorial for beginners {%youtube GMuMXSAC0D4 %} ::: :::spoiler Advantages - Perhaps the best lightweight SSH client around. - Excellent tool for port forwarding. ::: ### ![](https://i.imgur.com/Reqq2hT.png =54x) [GWSL](https://opticos.github.io/gwsl/) >[color=#907bf7] The Feature-Packed, Highly-Integrated Windows 10 XServer GWSL automates the process of running X on top of WSL and over SSH: * It lets you easily run graphical Linux apps on Windows 10. * It lets you run graphical apps located on remote Linux machines. * It provides a simple UI for launching Linux apps, managing them graphically, and creating customized Windows shortcuts for them. * All this at the click of a button! No memorization of commands necessary. Easy! > **Warning:** Make sure you are not running multiple X servers (MobaXterm, VcXsrv, or GWSL) simultaneously, since they will conflict each other. ### ![](https://upload.wikimedia.org/wikipedia/commons/0/01/Windows_Terminal_Logo_256x256.png =50x) [Windows Terminal](https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701) >[color=#907bf7] The Windows Terminal is a modern, fast, efficient, powerful, and productive terminal application for users of command-line tools and shells like Command Prompt, **PowerShell**, and **WSL**. If you need `ssh` only, this might be enough + some extras. </br> ## :atom_symbol: --- Advanced tools --- ### ![](https://seeklogo.net/wp-content/uploads/2015/11/microsoft-windows-logo-vector-download.jpg =50x) ![](https://seeklogo.com/images/L/Linux_Tux-logo-DA252F3C21-seeklogo.com.png =35x) Windows Subsystem for Linux [WSL2](https://docs.microsoft.com/en-us/windows/wsl/install-win10) Make sure you get [WSL2](https://docs.microsoft.com/en-us/windows/wsl/install-win10) since the older version 1 is outdated. You get lightweight virtual Linux environment which is really capable in contrast to the old version. **[GWSL](https://opticos.github.io/gwsl/) is designed and works very well with WSL 2 - one of the best combination to have Linux environment running on your Windows computer.** Alternatively, combined with X11 server ( [VcXsrv Windows X Server](https://sourceforge.net/p/vcxsrv/wiki/Home/) or the built-in X11 server from [MobaXterm](https://mobaxterm.mobatek.net/) ) :::spoiler YouTube - WSL 2: Getting started {%youtube _fntjriRe48 %} ::: </br> :::spoiler WSL2 with X11 MobaXterm > You need to set "on-demand" or "didsabled" /be careful/ for the "X11 remote access" or fiddle with `xhost +ip_address`. ![](https://i.imgur.com/uPxYjeU.png) ::: :::spoiler WSL2 and X11 complications (solved with GWSL) The WSL2 virtual machines are running into separate virtual network space and the default DISPLAY environment is not properly setup. The easiest way to get the virtual network adapter IP address ( in this example) for your instance is via: - `Windows power shell` or `Command Prompt` ``` bash PS C:\> ipconfig.exe Windows IP Configuration ... Ethernet adapter vEthernet (WSL): Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : fe10::d03e:1243:9d6:b2df%65 IPv4 Address. . . . . . . . . . . : Subnet Mask . . . . . . . . . . . : Default Gateway . . . . . . . . . : ``` - From the WSL2 instance itself ``` bash $ip route default via dev eth0 dev eth0 proto kernel scope link src ``` Then the correct `DISPLAY` environment to export is: ``` export DISPLAY= ``` ::: ### ![](https://www.virtualbox.org/graphics/vbox_logo2_gradient.png =50x) [VirtualBox](https://www.virtualbox.org/) >[color=#907bf7] VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. As such, one can install fully virtualized Linux environment which gives you the closest Linux experience. Effectively you get access to real Linux environment while sharing the CPUs and reserve RAM on your computer. </br> ## :gear: --- Other tools --- ### ![](https://sourceforge.net/p/vcxsrv/wiki/Home/attachment/x-3d-shadow-50px.png =50x) [VcXsrv Windows X Server](https://sourceforge.net/p/vcxsrv/wiki/Home/) >[color=#907bf7] VcXsrv is an X Server for WinNT. In order to be able to start the graphical (GUI) version of programs (e.g. xstata = X window version of STATA) on Unix servers (e.g. of the bwHPC network) under Windows, you need an X server that is on your local Computer must be installed (e.g. for Putty, Kitty, Smartty or other ssh-forwarting or in Windows 10 as X-Server Host for Linux Subsystem's). :::spoiler YouTube - Installing VcXsrv X Server {%youtube 4SZXbl9KVsw %} ::: </br> **Hint:** use this settings to start the program `"C:\Program Files\VcXsrv\vcxsrv.exe" :0 -ac -terminate -lesspointer -multiwindow -clipboard -wgl -dpi auto` :::warning Keep in mind that `-ac` option disables the *access control restrictions*, which is a security concern. ::: :pencil: Opinion: The MobaXterm's build in X11 server is perfectly capable alternative. ### ![](https://upload.wikimedia.org/wikipedia/commons/thumb/2/29/Cygwin_logo.svg/240px-Cygwin_logo.svg.png =50x) [Cygwin](https://www.cygwin.com/) >- a large collection of GNU and Open Source tools which provide functionality similar to a Linux distribution on Windows. >- a DLL (cygwin1.dll) which provides substantial POSIX API functionality. Unless, you need explicitly Cygwin, MobaXterm will be more than an adequate replacement. </br> ## :anchor: --- Related tools --- ### ![](https://www.cendio.com/website/static/img/logo_mono.png =100x) [ThinLinc](https://www.cendio.com/) >[color=#907bf7] ThinLinc is a software that enables organizations to implement a Linux server-based computing (SBC) infrastructure. ThinLinc graphical connection user guide [@UPPMAX](https://www.uppmax.uu.se/support/user-guides/thinlinc-graphical-connection-guide/) </br> # Contacts: - [Pavlin Mitev](https://katalog.uu.se/profile/?id=N3-1425) - [UPPMAX](https://www.uppmax.uu.se/) ![](https://snic.se/digitalAssets/603/c_603880-l_1-k_image.png =122x38) ![](https://live.webb.uu.se/digitalAssets/207/c_207717-l_3-k_bg-city.png) ###### tags: `UPPMAX`, `SNIC`, `User practices`