VSCode in WSL: how to sudo a root file so I can edit it

后端 未结 5 1758
孤独总比滥情好
孤独总比滥情好 2021-02-12 13:12

WSL v.1 -- VSCode v1.40.1 (using \'Remote - WSL\' extension 40.3)

How to open a root-owned file for edit using sudo and VSCode? (without running as root)

5条回答
  •  无人及你
    2021-02-12 13:46

    input this in powershell and press 'Enter'

    ubuntu config --default-user root
    

    then you will login wsl with root user and you can do anything now

提交回复
热议问题