1-Windows 10’da Geliştirici Modunu Etkinleştirmek Gerekli
Yeni bir Windows sürümü çalıştırıyorsanız 10 Insider önizleme, Yapı 10122 ya da daha kesin olarak, o zaman yeni bir fark olabilir “Geliştiriciler için” işletim sistem ayarları(settings) seçeneğinde.
Geliştirme için amaçlanan modlarını etkinleştirmek bu yapılandırma seçeneği sağlar, Örneğin düzgün çalıştığından emin olmak için canlı bir sistem geliştiriyoruz test uygulamaları için.
Geliştirici seçeneklerini etkinleştirme
Yeni geliştirici özelliklerini etkinleştirmek için,
- Üzerinde Windows tuşuna dokunun, Ayarlar (Settings) yazın ve yük ayarları – Arama sonuçlarının görüntülendiği zaman Modern uygulama.
- Güncelleştirme moduna geçebilirsiniz & Güvenlik > Geliştiriciler için yeni özellikler görüntülemek için.
- Orada ya da etkinleştirme olabilirsiniz “cihazlarınızdaki apps” veya “geliştirici modu”.
Kaynak: https://websetnet.com/tr/enable-developer-mode-in-windows-10-to-sideload-apps/
2-How to run Linux on Windows 10 with “Bash on Ubuntu on Windows!” – Windows 10 Anniversary Edition
OpenFOAM for Windows 10
The packaged distributions of OpenFOAM for Ubuntu 14.04LTS can now be installed directly on Microsoft Windows 10 using Bash on Ubuntu on Windows. Bash on Ubuntu on Windows provides a full compatibility layer for running Linux applications on Windows through the Windows Subsystem for Linux (WSL), which performs real-time translation of Linux system calls into Windows OS system calls. The system can support graphical Linux applications, such as the version of ParaView that includes the OpenFOAM reader module, with additional X server software (see below). Running OpenFOAM applications in parallel using WSL is reported to work effectively.Install Windows 10 Anniversary Update
The user first needs to install the Windows 10 Anniversary Update in a 64-bit Windows 10 OS in order to access the WSL.
- Open the Settings application and select Updates & Security → Windows Update.
- In Windows Update, click Check for Updates.
- The Anniversary Update appears as Feature update to Windows 10, version 1607. Click Update and the software will download and install.
- For full instructions, see How to Get the Windows 10 Anniversary Update.
Activate Windows Subsystem for Linux
The user then needs to to activate the WSL.
- Open the Settings application and select Updates & Security → For Developers.
- In For Developers, click Developer Mode (below right).
- Open the Control Panel and select Programs → Turn Windows Features On or Off
- Enable the Windows Subsystem for Linux (Beta) option from the list and click OK (below left).
- You will be prompted to reboot your computer. Click Restart Now and wait for the the computer to reboot.
Run Bash on Ubuntu on Windows
After the computer restarts, the user can launch Bash.
- Click the Start button, type
bash
, and press Enter.- The first time bash.exe is run, the user must accept the terms of service to install Bash on Ubuntu on Windows.
- When prompted, create a user account and password for use in the Bash environment.
Installing OpenFOAM
The packaged distributions of OpenFOAM on Ubuntu Linux can now be installed from within the Bash environment. We recommend users install the Ubuntu pack of OpenFOAM v4.1 or the current development version (or both).
- Installing OpenFOAM 4.1
1234 sudo add-apt-repository http://dl.openfoam.org/ubuntusudo sh -c "wget -O - http://dl.openfoam.org/gpg.key | apt-key add -"sudo apt-get updatesudo apt-get install openfoam4
Unable to resolve Host – Windows Bash hatasında
I’m using Windows Bash and I’m getting the error
fox@FOX:/etc$ sudo true
sudo: unable to resolve host FOXI’ve seen people say I’m suppose to edit
etc/hosts
, but I don’t know what to put in the file. Can someone tell me what I’m suppose to put to fix this?Answer | Çözüm
You can fix this by adding an entry to your
/etc/hosts
for your machine’s hostname.If you want a one-liner, something like this will do it:
1 |
printf "\n127.0.0.1 $HOSTNAME\n" | sudo tee -a /etc/hosts |
Kaynak: https://superuser.com/questions/1110633/unable-to-resolve-host-windows-bash
Kuruluma devam…
- Installing OpenFOAM-dev
1234 sudo add-apt-repository "http://dl.openfoam.org/ubuntu dev"sudo sh -c "wget -O - http://dl.openfoam.org/gpg.key | apt-key add -"sudo apt-get updatesudo apt-get install openfoam-devUser Configuration
In order to use the installed OpenFOAM package, the user needs to set their environment for OpenFOAM as follows.
- One Time Only: At the bottom of the user’s
.bashrc
file, source thebashrc
file in the OpenFOAM installation which contains the environment settings. Foropenfoam4
, the following command avoids the need to open an editor (for OpenFOAM-dev, replaceopenfoam4
withopenfoam-dev
):
1 echo "source /opt/openfoam4/etc/bashrc" >> .bashrc- One Time Only: register the change to the
.bashrc
file by typing at the terminal prompt (note the dots):
1 source $HOME/.bashrc- Test that the
simpleFoam
application, from the OpenFOAM package, is working by typing
1 simpleFoam -help
- A “Usage” message should appear. Your installation and user configuration is complete.
If more than one OpenFOAM package is installed, e.g. both
openfoam4
andopenfoam-dev
, the user’s.bashrc
file should contain only thesource...
command for the version they currently wish to use.Enabling Graphical Applications
To run graphical Linux applications, such as ParaView or the gedit editor, requires the installation of X server software. The most popular X server software for Windows is Xming, which can be installed as follows:
- Download the Xming installer.
- Run the Xming installer using the default settings.
- Launch Xming and it runs in the background, visible in the system tray, waiting for a graphical Linux application to be launched.
When a
bash
shell is opened, theDISPLAY
environment variable needs to point to the X server that is running. To make this addition permanent, set theDISPLAY
in the user’s.bashrc
file and source it again, i.e. execute one time only:
12 echo "export DISPLAY=:0" >> .bashrcsource $HOME/.bashrcWith graphics enabled, users may wish to install other useful supporting graphical applications for OpenFOAM, such as the gedit file editor, the GnuPlot graph drawing package, and mplayer video player (and mencoder encoder) software, e.g.
123 sudo apt-get install gedit gedit-pluginssudo apt-get install gnuplot gnuplot-x11 gnuplot-doc libgd-toolssudo apt-get install mplayer mencoderNext Steps
See OpenFOAM 4.1 on Ubuntu: Getting Started. If the user has enabled graphical applications, they can open the gedit editor in the background (
&
) with
1 gedit &Otherwise without graphical support, 3 popular editors which can work through a terminal are:
nano
: the easiest of the 3 editors for the purpose, seenano
basics guide;emacs
: powerful editor that uses a more complex set of key commands,emacs
basics;vim
: another editor with arguably a less familiar set of key commands, seevim
quick guide.It is worth knowing the command to exit the editor you use in case a problem arises:
nano
exits withC-x
(C
=Control key)emacs
exits withC-x C-c
(preceded byC-g
, if needed)vim
exits withESC :q!
Thanks to Dongyue Li (from the Contributors to OpenFOAM) for testing and reporting his experience with OpenFOAM using Bash on Ubuntu on Windows 10.
Kaynak: https://openfoam.org/download/windows-10/
Getting Started
Create a project directory within the
$HOME/OpenFOAM
directory named<USER>-4.1
(e.g.chris-4.1
for userchris
and OpenFOAM version 4.1) and create a directory namedrun
within it, e.g. by typing:
1 mkdir -p $FOAM_RUNCopy across the backward facing step example, generate the mesh with blockMesh and run the steady flow, incompressible solver simpleFoam
123456 cd $FOAM_RUNcp -r $FOAM_TUTORIALS/incompressible/simpleFoam/pitzDaily .cd pitzDailyblockMeshsimpleFoamparaFoamRefer to the OpenFOAM User Guide to get started.
Kaynak: https://openfoam.org/download/4-1-ubuntu/
Nerde bu dosyalar?