I was wondering if there is a way to enter in my admin password someplace just once and keep it for my entire time logged in. I hate having to type sudo command-name* every five seconds, or typing in the password every time the system wants to perform a task. Is there a way to just enter it once for my session and have it be remembered.
I know this is bad practice, but this is on a VM that I don't care about.
Best Answer
sudo su
will work - You will have a shell as root until you close it, as will giving root a password usingpasswd root
and logging in directly as root. Both of these are heavily frowned upon for many reasons that have been listed here the dozens of other times this question has been asked.