Skip to content
Advertisement

Is there a way to ‘store’ Sudo temporarily

I’m quite new to Linux. I remember using a tutorial were you were able to declare your sudo (+password) at the start and then use terminal without having to do sudo or import your password again.

I.e.

Sudo yum-get update -> yum-get update.

Sorry if this is a very obvious question, I honestly don’t remember where the tutorial was from, and how to do it again.

ps – if it helps, I’m on a RedHat Distro, but go between Debian and RedHat.

Advertisement

Answer

You can use su. This way you are changing the ownership of the session to root (by default, you can also change to any other user on the system) and therefore you will be able to avoid the sudo.

Here you can find some more information on the command.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement