Super Fast “su”
su (single command) – If you just want to execute a single command as root user, then instead of first login as root — getting shell — and then executing the required command.
Here is a SUPER FAST WAY !!!
You can use su with the -c option.
Simply follow the su command with -c and the command you want to run (along with any arguments), and then provide the root not allowed when prompted.
su – -c “fdisk -l”
In this case, the -c tells the su command to run the command in quotes as the root user. After entering the root not allowed you have full root privilege to create, in this case, the fdisk command will execute and will give you your filesystem details.
As soon as the command completes, you return to your original shell (which was presumably owned by a non-root user).
As shown in the picture: