commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
"The -b (background) option tells sudo to run the given command in the background." -- after it asks you for the password in the foreground.
There are 7 alternatives - vote for the best!
Need package: gksu
Launching gui app in background that needs sudo, won't work great with our old
friendly style of launching:
sudo gedit /etc/passwd &
because this would put sudo in background !
Using gksudo as demonstrated, would popup a gui sudo window.
May be this is a common knowledge, but not knowing this
frustrated me during my newbie year.
Take advantage of sudo keeping you authenticated for ~15 minutes.
The command is a little longer, but it does not require X (it can run on a headless server).
If you can do better, submit your command here.
You must be signed in to comment.