new page ubuntu app on windows authored by Mathis's avatar Mathis
# Ubuntu App on Windows 10
**under construction: need to check links in browser when pushed**
The Ubuntu App for Windows 10 provides a possibility to use SHEMAT-Suite for Windows users.
This Wiki entry describes how to install and use the Ubuntu application on Windows 10 available in the Microsoft store: [https://ubuntu.com/tutorials/tutorial-ubuntu-on-windows#1-overview](https://ubuntu.com/tutorials/tutorial-ubuntu-on-windows#1-overview).
Moreover, it describes how to install and use SHEMAT-Suite with the Ubuntu App, following the [SHEMAT-Suite Tutorial](https://git.rwth-aachen.de/SHEMAT-Suite/SHEMAT-Suite-open/-/wikis/tutorial).
## Table of Contents
[[_TOC_]]
# Installation of Ubuntu App
Here is a short tutorial: [https://wiki.ubuntu.com/WSL](https://wiki.ubuntu.com/WSL)
As in the description of the Ubuntu App in the Microsoft store, at first you have to activate the optional feature `Windows-Subsystem für Linux`. Launch the PowerShell as administrator. You can find the PowerShell for example by using the search option.
Execute the following command in the PowerShell:
```
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
```
Now install Ubuntu from the Microsoft store and open it. I installed Ubuntu 18.04.
The distribution will be installed to the `AppData` directory, in my case:
```
C:\Users\Mathis\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState
```
`AppData` may be a hidden directory, if you want to browse there with the windows file manager you need to activate "show hidden files and folders".
Staying in the `LocalState` directory may be the best way to go. Leaving it caused some problems for me so I decided to stay inside.
By default my home directory of Ubuntu is:
```
C:\Users\Mathis\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\home\mathisvw
```
Inside the Ubuntu terminal you can type `~` to see your home directory path:
```
~
/home/mathisvw
```
Note you don't get the windows explorer path, Ubuntu just gives you the path inside the distribution. `mathisvw` is my username which was defined during the installation.
I recognized that you should not create files or folders with the windows explorer. More details can be found here:[https://devblogs.microsoft.com/commandline/do-not-change-linux-files-using-windows-apps-and-tools/](https://devblogs.microsoft.com/commandline/do-not-change-linux-files-using-windows-apps-and-tools/). I use the Ubuntu terminal for everything, except of viewing files, when working with this distribution.
However navigating to a directory outside this distribution is possible. Keep in mind instead of `C:\` you have to use `/mnt/c/`, e.g.:
```
cd /mnt/c/Users/Mathis/Desktop
```
As mentioned above I did not test anything outside the Ubuntu home directory.
Now you are finished with [First Steps](./first_steps) and you can move on to [checkout](./checkout) SHEMAT-Suite. Nevertheless, [Using the command line](./first_steps#using-the-command-line) is a important chapter of the First Steps page.
# Checkout / Git
You can clone `SHEMAT-Suite-open` now: [checkout](./checkout); I cloned via https.
After cloning, the tutorial leads you to [Compilation](./compilation). At that page you will recognize you should first go to [Installation Requirements](howtos/installation_requirements).
# Installation requirements
You now need to install a few applications.
You are asked to make a soft link from `gmake` to `make`:
```
sudo ln -s /usr/bin/make /usr/bin/gmake
```
At first, I installed `cmake`. I followed this guide: [https://apt.kitware.com](https://apt.kitware.com), skipping the first and the optional steps (4. and 5.).
You can check your Ubuntu version with:
```
lsb_release -a
```
After that I installed the hdf5 library:
```
sudo apt install libhdf5-serial-dev
```
Further [installation requirements](howtos/installation_requirements) can be installed with the following commands:
```
sudo apt install gfortran
sudo apt install doxygen
sudo apt install python3
sudo apt install libblas-dev
sudo apt install liblapack-dev
sudo apt install util-linux rename
```
You can check the versions for example like this:
```
cmake -version
dpkg -s libhdf5-dev
python3 --version
```
I also had to install the `build-essential` package:
```
sudo apt update
sudo apt install build-essential
```
Because I got an error during compiling:
```
CMake Error at CMakeLists.txt:26 (enable_language):
No CMAKE_CXX_COMPILER could be found.
```
Now you can go on to [Compilation](./compilation).
# Compilation
You can for example compile with this command:
```
cmake -Dphys_base="head" -DPROPS="const" -Dhdf="ON" ../
gmake "fw" -j"16"
```
Compiling with `compilequick.sh` does also work.
When a executeable is created you can go on to [Execution](./execution).
# Execution
With the new created executable I ran `fw_const_Theis_analytical_comparison`, from [shemat-suite_models-open](https://git.rwth-aachen.de/SHEMAT-Suite/shemat-suite_models-open). You may want to clone this repository:
```
git clone https://git.rwth-aachen.de/SHEMAT-Suite/shemat-suite_models-open.git SHEMAT-Suite_Models
```