![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Change users login name | spacewalker | AIX | 9 | 03-20-2006 08:09 AM |
| pswd change on sco GUI login | qphillips | SCO | 3 | 10-03-2005 04:39 AM |
| How to i change the login banner in obsd 3.3 | vip3r | BSD | 2 | 10-02-2003 06:22 AM |
| Login screen change | miredale | UNIX for Dummies Questions & Answers | 2 | 10-25-2002 06:18 AM |
| Password change at login???? | rrivas | UNIX for Dummies Questions & Answers | 4 | 08-12-2002 03:02 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Ok when I log in to my terminal I land in a dir. How can I change the dir that I start from when I login?
Thanks for the help, sure it is a no brainer for you guys cd |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
You can change the dir in the /etc/passwd file, or use the usermod command.
usermod -d newdir loginname or usermod -d newdir -m loginname to move the content of the old dir to the new one. Last edited by sTorm; 01-24-2002 at 05:32 AM. |
|
#3
|
||||
|
||||
|
If this is for the root user, here is something I discovered the other day.
root:/root> cd root:/root> echo $HOME /root root:/root> HOME=/ root:/root> cd root:/> echo $HOME / root:/> HOME=/root root:/> cd root:/root> root:/root> HOME=/usr/local/bin root:/root> cd root:/usr/local/bin> HOME=/root root:/usr/local/bin> cd root:/root> There is a variable called $HOME. You can modify it to be what ever you want. When you type "cd" <enter> that is where you will go. As in the example above. You can make this permanent by putting in the bottom of your .profile. export HOME=/some/dir. This works for any user, even root and application user IDs.
__________________
My brain is your brain |
|
#4
|
|||
|
|||
|
I tried the " usermod " command and it seems that my unix (Mac OSX) does not have this command. Any other options???
thanks cd |
|
#5
|
||||
|
||||
|
UNIX or Apple???...
Are you sure that you are running UNIX or are you running Apple's OSX that is based (coded in) UNIX? OSX was created with UNIX because it is more stable. Unless I am mistaken, you are actually running Apple OS that is built on top of UNIX.
This is like saying that you are running DOS when you are actually running Win98. Correct me if I am wrong.
__________________
My brain is your brain |
|
#6
|
||||
|
||||
|
Darwin (the underlying OS in OSX) is based on BSD4.4, so generally speaking, it is Unix.
lorcet222, log in to a command prompt (as root), and execute the following command: pico /etc/passwd If you don't have pico, you'll have to use another (harder to use) editor. Anyways, though, look for a line that begins with your username. You'll see something like this: samba:x:1005:100 Now look in the sixth colon-delimited field (in this case it says /home/samba, yours will be different). That is your home directory - where you will be when you first log in. Now if you change that to another directory, THATS where you'll start. Just be sure that you have the rights to be in that directory. Let us know how it goes. |
||||
| Google The UNIX and Linux Forums |