How do i get into root from konsole?
I am new to linux and need to check a file in root. The problem is that the konsole tells me I dont have permission to access. My computer is not a network and I want full access to everything. Basically, I want to change from user to root. What is the command for that?
|
su
or su - |
Just type "su -" press enter then your password when prompted.
|
thanks will try
|
And I think 'su' keeps you in the same directory while 'su -' moves you to /root (or is it the other way around?)
-JMagi |
'su -' moves you back to the root's home directory, but it also adds the paths not included by using just su, like /sbin. for example if using just su and trying to run hdparm, you'd have to use /sbin/hdparm. if using 'su -', the you just need to type in hdparm to run it.
|
yeah - to be exact the "-" tells su to start a new shell for the user you are suing to.
|
Oh ok. That clears up quite a bit. I've usually used su by itself but I didn't realize the dash adds the paths for root as well. Maybe I'll have to make a shell script to "su -" you and then switch back into the folder you were just in.
-JMagi |
All times are GMT -5. The time now is 06:15 AM. |