Linux · sudo & Privilege Escalation

pkexec nano works in a terminal, but pkexec gnome-text-editor fails with cannot open display. What extra setup does the graphical case need?

Answer locked. Get the free KnowCard app to reveal it — plus spaced-repetition review so it actually sticks.

Get it on App StoreGet it on Google Play

This is one card from the KnowCard library — thousands more across SAP, Linux, Python and more. In the app you get the answer, AI explanations, and cards that come back right before you would forget them. Free to start on iOS, Android or the web.

More in sudo & Privilege Escalation

After one successful sudo, you run several more sudo commands in a row and only the first asked for a password. What controls that window?
You run su to a user in a terminal, then type exit when done. Whose password does su prompt for, and how do you get back?
Someone runs su root, becomes root, but finds admin commands in /usr/sbin fail with command not found. What did they forget?
On a server with several admins, why is sudo preferred over sharing the root password, and whose password does each admin type?
sudo ls /etc > /etc/out.txt fails with a permission error even though sudo can read /etc. Why, and how do you fix it?
For a long series of admin commands, what does sudo -s give you over prefixing sudo to each one, and how do you leave it?

Start learning today

Free to start — download the app or use it in your browser.

Get it on App StoreGet it on Google Play