![]() Are there other configurations you’d like to make to WSL? What other options would you like to be able to specify in wsl.conf? Leave us a comment below.If your business subscription plan includes the desktop version of the Microsoft 365 apps you won't see an option to install it unless someone in your organization assigned a license to you. You can consult the Microsoft Docs as a reference. Setting this key will determine whether WSL will add Windows path elements to the $PATH environment variable. Setting this key will determine whether WSL will support launching Windows processes. These options are available in Insider Build 17713 and later. The “nf” file contains a DNS list that are capable of resolving a given hostname to its IP address. Setting this key will determine whether WSL will generate /etc/nf. The “hosts” file contains a static list or map of hostnames to their corresponding IP address. Setting this key will determine whether WSL will generate /etc/hosts. To change the options for a specific drive only, use /etc/fstab instead. Note: These options are applied as the mount options for all automatically mounted drives. Otherwise, the default value will always be appended. If the user specifies a gid or uid option explicitly via this key, the associated value will be overwritten. By default, WSL sets the uid and gid to the value of the default user (in Ubuntu distro, the default user is created with uid=1000,gid=1000). If you want to explicitly specify those options, you must include every drive for which you want to do so in /etc/fstab. Options that the mount binary would normally parse into a flag are not supported. These can be found in an earlier blog post. Only DrvFs-specific options can be specified. This value is appended to the default DrvFs mount options string. For example, if you have a directory in WSL at “/windir/” and you specify that as the root, you would expect to see your fixed drives (for example, C:/) mounted at “/windir/c” This key lets you define a new directory where fixed drives will be automatically mounted. Thus, you can mount these filesystems automatically in WSL on start up. etc/fstab is a file where you can declare other filesystems, like an SMB share. Setting to true causes the file /etc/fstab to be processed on WSL start. Setting to false means they won’t be mounted automatically-but you could still mount them manually or via fstab. Setting to true causes your fixed drives (i.e C:/ or D:/) to be automatically mounted with DrvFs under “/mnt”. Below are key-values that can be set: Section: automount Key: enabled In WSL today, we have two sections: “automount” and “network”. ini conventions, keys are declared under a section. Notice how I must exit and reload WSL after making the change to wsl.conf so that WSL reads in my changes on launch. In the example below, I’ll tell WSL that I would like my drives to mount automatically with metadata enabled. Below is a sample that you could drop into your distros: If the file is missing or malformed (that is, improper markup formatting), WSL will continue to launch as normal. WSL will detect the existence of the file and will read its contents. If the file is not there, you can create it yourself. Wsl.conf belongs under the path /etc/wsl.conf. ![]() In order for a user to take advantage of this feature, they had to unmount and re-mount DrvFs each time they launched WSL–this is not the case any longer. For example, we released a blog post in the past about file system improvements in DrvFs. We’re introducing a file called wsl.conf to handle these configurations. This includes automount options and network configuration. Beginning with Insider Build 17093, we added a method for you to automatically configure certain functionality in WSL that will be applied every time you launch the subsystem.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |