An alternative using eval so avoiding use of a subshell:. sudo -s eval 'whoami; whoami' Note: The other answers using sudo -s fail because the quotes are being passed on to bash and run as a single command so need to strip quotes with eval.eval is better explained is this SO answer. Quoting within the commands is easier too: $ sudo -s eval 'whoami; whoami; echo "end;"' root root end;
sudo ifconfig eth0 10.0.0.100 netmask 255.255.255.0 To verify the IP address configuration of eth0, you can use the ifconfig command in the following manner. Linux Sudo to run Privileged Commands Allow normal users to run any privileged commands by escalating to Sudo, by configuring Linux Sudo on any Linux os normal users are allowed to get root access. About Unix sudo and su commands Jun 18, 2019
EssentialsX Info. Home; Permissions; Commands; GitHub; Jenkins; Change width
Aug 17, 2011 sudo command in Linux with Examples - GeeksforGeeks V: The -V (version) option causes sudo to print the version number and exit. If the invoking user is … Using the Sudo Command - Lifewire
Jan 17, 2020
Linux Commands Cheat Sheet: Definitive List With Examples Hardware Information. Show bootup messages: dmesg. See CPU information: cat /proc/cpuinfo. … sudo - Unix, Linux Command - Tutorialspoint