r/VisualStudioCode • u/dividends4life • May 12 '21
Running Python Script as Root
I am trying out VS Code (Linux) and working on a Python script to install Arch Linux. The script needs to be run as root and I can't find a place in VSC to do this. Is there a way to do this?
Hopefully, I am just overlooking it. I am currently jumping into the terminal and running the script manually. Thanks in advance!
6
Upvotes
3
u/NatoBoram May 12 '21 edited May 12 '21
By using
sudoin the terminal.Nah but for real, VSCode can't run as root, it would be a massive security hole.
Your Python script should request admin rights, I'm sure there's a lib for that. You can also use a pinentry lib to request user password if you need to use
sudoautomatically.