LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do i get into root from konsole? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-get-into-root-from-konsole-111182/)

AngelLucifer 11-01-2003 02:41 PM

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?

megaspaz 11-01-2003 02:42 PM

su

or

su -

david_ross 11-01-2003 02:42 PM

Just type "su -" press enter then your password when prompted.

AngelLucifer 11-01-2003 03:30 PM

thanks will try

jrdioko 11-01-2003 04:06 PM

And I think 'su' keeps you in the same directory while 'su -' moves you to /root (or is it the other way around?)

-JMagi

megaspaz 11-01-2003 04:13 PM

'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.

david_ross 11-01-2003 04:23 PM

yeah - to be exact the "-" tells su to start a new shell for the user you are suing to.

jrdioko 11-01-2003 05:23 PM

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.