How Do I Switch Users Under Linux?
In response to the su (switch user) command, you'll be prompted for the root account password. If you enter the password correctly, your prompt will change from a dollar sign to a pound sign (to reflect your status as root), and you will assume the powers of the root user. Issue the command
exit
to return to your previous identity. You can also use su to become any user on the system, not just root. For example, to become sigmund, you would enter this command:
su - sigmund
Don't forget the minus sign when you use su to temporarily become another user. Without it, the login profilefor that user is not executed--so it's not really the same as logging in, because your environment variables, and aliaseswould not change.
This would be like starting DOS without running the autoexec.bat file--things wouldn't work the same, because your personal setup commands (PATH and so on) would not run.
But why would you want to use su when you can have multiple log-ins via virtual consoles (see "Living in a Shell")? Because it's sometimes quicker or more convenient to switch between users using su, and because you may have no virtual consoles available--you may be using all of them or, if you're logged in to the machine via a modem, virtual consoles may not be available to you.
Previous Lesson: Changing Your Password
Next Lesson: Who is Logged In?
Comments - most recent first
(Please feel free to answer questions posted by others!)
Without the proper education, it is extremely difficult to get a fantastic job making a great employment A lot of lenders will be eagerly waiting to assist individuals with cash until payday so you would fix your important situations with comfort Regardless of this, financial emergency can certainly knock whenever at anyone's door Having said that, there is an choice of the there's a be approved, and finding the money wired to your account by the afternoon The amount of completely new potential customers has grown as the financial system continues to remain unforgiving Payday loans United kingdom come like a small money it is possible to bank loan through month-to-month instalments So, verify your existing annual income, work, bank statements and domestic address to create your credit standing
is i have to go back frm hermie user to someone else,I have to give su -root...
Y can't i do cd..(many times) till the root comes.please to help me
However, when I log off a current user (I want to switch users here), the screen goes blank and no login prompt is shown for logging in as a different user.(There are other OS users created on the system.)
i had mounted some files from server to client in linux...but i cant able to use that files in the client on user...pls tell the command to share root with user..
i want to make a script program which can enter as a oracle with password
after then it will enter in sql dthrough the sqlplus command and it will able to exec query .
can it possible? if yes please give me the way.
how copy the entair directory from root user to switch user using linux command
if u konw send me ASAP.............
thanku........
try to find grub ;) you can find grub in ubuntu under preferences
I installed linux on a partition on my hard drive so I thought and I was going to use windows and linux and now I cannot get the windows system to come back up when I reboot it do not give me the option to boot from either drive that I may want, have I lost the windows os or can I recover it ?
sometimes we will use 'sudo su' together...?
I added a user from root but when I try to see the list of users it does not show me the new user. It shows both the users as root and the number as 2
pl explain. (I was trying to su without -, i used su user and later typed su - user which prompted for p/w)
regards
su root what are the diffrences onthis.
we will swith in to root user only right.
code: "su - root"
-->press "Enter"
It will ask for the password for root.
code: "xxxxxxxxxx" <--use your root password.
-->press "Enter"
If the password was correct..the prompt will change from a "$" to a "#".
You now have the power to destroy your system. :)
NOTE: All enteres are without the quotes. '"'
I welcome your comments. However... I am puzzled by many people who say "Please send me the Linux tutorial." This website *is* your Linux Tutorial! Read everything here, learn all you can, ask questions if you like. But
don't ask me to send what you already have. :-) NO SPAM! If you post garbage, it will be deleted, and you will be banned.

