Quote:
OK, DH, you got me, ... I have to ask.
How is 'sudo' different from 'sudo bash'? Is 'sudo' a temporary condition for one command, whilest 'sudo bash' is a condition until informed otherwise? ... as in while ... and ... endwhile?
Background: BASH is a shell, (Bourne Again SHell). Think of it as similar to what you would see if you opened a Terminal window in Windows using CMD. BASH scripts (.sh) are somewhat analogous to batch (.bat) scripts in Windows. BASH allows you to execute just about any and every LINUX command from within it's scripts and that is a cornerstone of UNIX and LINUX programming: building large complex programs from a number of small dedicated ones. A huge amount of what happens behind the scenes in a LINUX distro is the result of executing numerous BASH shell scripts: ie: deleting a file, renaming directories, etc. are actually shell scripts that are run by the OS,
but can also be executed directly by someone with root privileges A shell script in LINUX can be executed just like a compiled program ... makes no difference to the OS.
When you log onto a LINUX distro, you are actually running a BASH shell instance as a non-root user. Root is the "Superuser", a special user account with all privileges (referred to generally as "God-like"). If you make a mistake as root, (like deleting a system file) it's more or less permanent. "sudo" allows you to temporarily become the root user (generally) and run ANY program as the superuser. This would include BASH shell scripts that are intended to keep your OS working properly. For a LINUX newbie, this is a "Bad Thing" generally as it allows you to hork up your system and break it. Read: re-install your OS.
Sorry for the long-winded explanation. I've used LINUX for about 20 years and taught it at college level for 10.
Cheers.