12/25/2023 0 Comments Sudo meaning in linux![]() ![]() Note: If you don’t mention username after “su” then Linux system will assume that you want to switch to root account and will ask root password. Now run su command to switch user su /home/user1 -> User directory does not change because it opens an interactive non login shell I am logged in as user1 in terminal /home/user1 Linux su privilege command opens an “ interactive non login shell” that is used to switch user ( root or any standard user ) but do not change the current user home directory. non-interactive shell: A (sub)shell that is probably run from an automated process.interactive shell: A shell (login or non-login) where you can interactively type or interrupt commands.When you open a graphic terminal in gnome it is a non-login shell. non-login shell: A shell that is executed without logging in, necessary for this is a currently logged-in user.When you hit ctrl+ alt+ F1 to login into a virtual terminal you get after successful login a login shell. login shell: A login shell logs you into the system as a specified user, necessary for this is a username and password. ![]() Lets explain the difference between following Linux privilege commands:īefore going to Privilege command need to understand the type of login shell in Linux system ![]() Today i will explain which command you should use to get right privilege at right time to execute your task. Do you know, you can get superuser privilege on your Linux system to just execute two commands but surely you don’t know about what is difference between Linux super privilege commands su, su -, Sudo su, sudo su-, sudo -s, sudo -i or sudo /bin/bash so on. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |