![]() ![]() Users in the wheel group are automatically granted sudo privileges and can perform tasks requiring elevated permission. The command adduser -G wheel $myUsername adds the user myUsername to the wheel group. ![]() You will want to add the username to the sudoers file so that enables the user to use sudo. In this example, the username will be 'caloewen'. Use this command to install sudo and password setting tools into CentOS, create a user account, and set it as the default user. To set up user account with the CentOS distribution we just imported, first open PowerShell and boot into CentOS, using the command: wsl -d CentOS You can set up your own user account, but note that the set up process will vary slightly based on each different Linux distribution. Use the command wsl -l -v to check which distributions you have installed.įinally, use the command wsl -d CentOS to run your newly imported CentOS Linux distribution.Īdd WSL specific components like a default userīy default when using -import, you are always started as the root user. wsl -import CentOS E:\wslDistroStorage\CentOS. Use the command wsl -import to import the tar file. Open PowerShell and ensure that you have a folder created where you'd like the distribution to be stored. To import the CentOS distribution tar file into WSL: Once you have a tar file ready, you can import it using the command: wsl -import. This process exports the CentOS tar file from the Docker container so that we can now import it for use locally with WSL. Grab the CentOS container ID using grep and awk: dockerContainerID=$(docker container ls -a | grep -i centos | awk '')Įxport the container ID to a tar file on your mounted c-drive: docker export $dockerContainerID > /mnt/c/temp/centos.tar Run the CentOS container inside Docker: docker run -t centos bash ls / ![]() Start the Docker service: sudo service docker start Open the command line (Bash) for a Linux distribution that you've already installed from the Microsoft Store (Ubuntu in this example).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |