In addition, most sh scripts can be run by Bash without modification. It offers functional improvements over sh for both programming and interactive use. It is intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools standard. You have to call sudo with root privileges: sudo su. Therefore you cannot switch to the root user with su (you can try). Answer (1 of 7): Your question has already been answered. Bash is an sh-compatible shell that incorporates useful features from the Korn shell (ksh) and C shell (csh). But, in most modern (desktop-) Linux distributions (for example Ubuntu) the root user is disabled and has no password set. Sudoers file maintains by the system administrator, who allows to access rights for some. This command runs "bash" as a super user.īash is the shell, or command language interpreter. sudo command stands for superuser do & also know as sudoers. The sh utility is a command language interpreter that shall execute commands read from a command line string, the standard input, or a specified file. This is where sudo comes in - it allows authorized users (normally "Administrative" users) to run certain programs as Root without having to know the root password. sudo su will execute commands as root in your present working directory but sudo -i will take you to your roots home directory (by default to /root) Another difference is if you are using anything other than bash as. However, since the Root account physically exists it is still possible to run programs with root-level privileges. As pointed by the user user535733 in the comments section, both commands will take you to different working directory. This means that you cannot login as Root directly or use the su command to become the Root user. This command is used to login at root account.īy default, the Root account password is locked in Ubuntu. In some cases, this is necessarily Root, but most of the time it is a regular user. The su command stands for 'substitute user', and allows you to become different user (super user). It might also be the case that: even if you start a login shell, different changes were made in roots /.profile, which might pollute the users environment. So changes made in /.profile wont take effect. Ideally, you run as a user that has only the privileges needed for the task at hand. In particular, this means that the /.profile (or similar file) for that user is not sourced. You could type a command incorrectly and destroy the system. The SuperUser can do anything and everything, and thus doing daily work as the SuperUser can be dangerous. In Linux (and Unix in general), there is a SuperUser named Root.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |