Notices


Reply
Thread Tools
Posts: 162 | Thanked: 25 times | Joined on Dec 2009
#1
Hi,

I found that I could set variables and add aliases as an mortal by creating a file '.shrc' in /home/user
However, this does not seem to work for root, at least not by becoming root with the command 'sudo gainroot' and creating /root/.shrc

How can I add aliases to root, or should I login as root in a different way? If so, how?

Thanks,
Paai
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#2
If you login as root by just typing "root" then it'll probably run the .shrc file.
 
Posts: 162 | Thanked: 25 times | Joined on Dec 2009
#3
Originally Posted by Rob1n View Post
If you login as root by just typing "root" then it'll probably run the .shrc file.
Yes, it does.

But then, what is the difference between 'root' and 'sudo gainroot'? In other words, what do we need 'sudo gainroot' for?
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#4
'sudo gainroot' doesn't change the directory, whereas 'root' does (which can be irritating). Not sure what other differences there are though.
 
Reply


 
Forum Jump


All times are GMT. The time now is 03:36.