- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Changing current directory of root
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2003 04:38 PM
10-14-2003 04:38 PM
Changing current directory of root
#cd
it should go to /usr directory.
Thanks
Jagadesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2003 05:04 PM
10-14-2003 05:04 PM
Re: Changing current directory of root
WARNING: Manually changing the 'passwd' file is a dangerous task. You should make a backup of the passwd file first, and ensure you can log in ON ANOTHER SESSION prior to closing the current session.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2003 05:32 PM
10-14-2003 05:32 PM
Re: Changing current directory of root
Maybe your best solution is to make an alias as in
alias "ucd=cd /usr"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2003 10:29 PM
10-14-2003 10:29 PM
Re: Changing current directory of root
I am not sure I understand you !
But if what you want is to change to an other directory then then yes alias could help you out.
Put this alias in one ./basbrc like ex:
alias myr="cd /usr/root"
this will then be there each time you start a new session.
You could also make this as a function like ex:
myr()
{
cd /usr/root
}
I prefer making a library of function (just a file full of functions I execute from .bashrc
But I feel one should limit the use of alias and such because it can get very messy and you soon forget how a system mormaly reacts
I once saw I user with more then 200 (alias, in is login that then complaind he could not control it !
OK but one or two if it makes life easy why not.
Hope this helps
J-P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2003 05:04 AM
10-15-2003 05:04 AM
Re: Changing current directory of root
if this is a serious problem for you, then you might just use the root account for too much of your daily work. Most of the time you should be able to use a normal account and there you can set your home to whatever you like without any risk to system integrity.
Greetings, Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2003 06:55 AM
10-17-2003 06:55 AM
Re: Changing current directory of root
HOME=/usr
export HOME
Then for that shell only, when you type "cd" you will go where you want. Cron jobs, other scripts, etc, will not be affected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2003 09:23 PM
10-19-2003 09:23 PM
Re: Changing current directory of root
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2003 07:56 AM
10-21-2003 07:56 AM