To use the Fedora Docker container as your go-to command shell a little extra configuration is required. Start Windows Terminal – you should see the list of WSL images in the drop-down and can customize accordingly in Terminal settings. Confirm the container imported correctly by listing your WSL distributions. It has to be a separate location for each one you create, so think about this before running the command.Ħ. Note: the “./fedora” argument in this example sets where WSL will maintain the root folder for this distribution. Get the Docker container ID using “docker ps -a” and export the container as a tar file Create a new container based on this image, with an interactive bash shell:Ĥ. Note: It’s a good idea to create a specific folder to do the work in.ģ. Using the Docker command pull the container image for the Linux distribution of your choice: To install Docker desktop for Windows see. If you don’t want to run Docker desktop on Windows you could alternatively do steps 1-4 on a Linux VM using Docker and then copy the tar file to Windows for step 5. To get started you need the following installed on your Windows machine:ĭocker is required to get a Docker image and put it in a tar file format for WSL. This example can be extended to any Linux distribution which is available as a Docker container. Fedora is a popular RPM-compatible distribution owned by Red Hat (IBM), and it is not currently available as a free WSL distribution in the Microsoft Store (there is a non-free 3rd party remix version in the store). Using Fedora Linux as an example let’s go through the steps of running your own Fedora shell in Windows Terminal. As well as providing a customizable tabbed way to use existing command shells like PowerShell, command.exe, Azure Cloud Shell and WSL Store offerings like Ubuntu, you can also create your own custom shell from a Docker container image. It’s a must-have utility like VS Code where once you start using it you wonder how you ever managed without it. Windows Terminal is the best command line tool on Windows. This article shows how to run a custom Linux shell (in this case Fedora) in Windows Terminal.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |