Sponsored Content
Top Forums UNIX for Dummies Questions & Answers why the PATH can not be set correctly? Post 25031 by yishen on Tuesday 23rd of July 2002 05:51:06 PM
Old 07-23-2002
Data why the PATH can not be set correctly?

I'm using Linux-Mandrake 8.0 in my laptop. After I logged in as a "root", I added a new path in my .bashrc file (I use bash shell). Then I can observe it has been set correctly by typing echo $PATH.


But, when I log in again as a personal account, not "root", then I open my bash shell, and type echo $PATH, the path I just set in the "root" account is missing!?

So could anyone tell me what is wrong? Thanks!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Couldn't set locale correctly

When a user connects via ssh to one of out Sun V120 boxes the following message is displayed. "couldn't set locale correctly" The .profile has the following line # @(#)local.profile 1.6 98/02/06 SMI stty istrip stty erase ^H So I put a set -x in the .profile and re sourced it and... (1 Reply)
Discussion started by: mattd
1 Replies

2. UNIX for Dummies Questions & Answers

ssh2: .profile not set correctly

When logging into solaris box through ssh, my profile does not get set correctly and I'm presented with the default ksh prompt "$". When logging in through telnet, everything is set correctly. Is there a special profile that sshd runs? ssh2: F-Secure SSH 2.4.0 (build 15) on sparc-sun-solaris2.8 (0 Replies)
Discussion started by: dangral
0 Replies

3. UNIX for Dummies Questions & Answers

How do I set the public keys up correctly for a migration from an HP-UNIX server to I

I am getting the error message "Permission denied (publickey). lost connection" when I attempt to do an scp migration. I know how to generate the public keys in both IIS and UNIX, and I believe they are both suppose to have the same public key - but where are they each suppose to be stored (I... (1 Reply)
Discussion started by: whs2k
1 Replies

4. Solaris

Couldn't set locale correctly

hi All, I'm using sun OS 5.10. All locales are set to en_US.ISO8859-1 in /etc/profile/init file. I'm using one functional user.When I tried to "sesu - functionalUser",its giving me error like "Couldn't set locale correctly".In functional user profile i'm tring to set locales to en_US.After... (1 Reply)
Discussion started by: Kathraji
1 Replies

5. Solaris

Couldn't set locale correctly

Hello, I have a recently configured machine that when log into it as a user or remotely as root it displays "Couldn't set locale correctly" When I type locale it displays the below which is wrong compared to other machines LC_CTYPE="C" LC_NUMERIC="C" LC_TIME="C" LC_COLLATE="C"... (7 Replies)
Discussion started by: Mr Pink
7 Replies

6. Solaris

couldn't set locale correctly

Dear All, I Have problem at my console (Ultra 24, solaris 10 x86), when i type dmesg always come out : like this You have new mail. root@console # bash root@console # dmesg couldn't set locale correctly couldn't set locale correctly So how to fix it...? Best Regards simbah (3 Replies)
Discussion started by: mbah_jiman
3 Replies

7. Solaris

LC_ALL & LANG are set OK, but others couldn't set locale correctly.

Hi, I have a Solaris (SunOS 5.10) installed, by default with the en_AU.UTF-8 locale. I want to change it to en_US.UTF-8 With AU, I have no issues whatsoever, so I installed the language package and now locale -a shows "en_US.UTF-8". Problem is even with LC_ALL set in etc/default/init, the... (2 Replies)
Discussion started by: asdfg
2 Replies

8. Shell Programming and Scripting

Can't add directory to path correctly

Hello everyone I am a newcomer to UNIX and I have hit a snag in something that would probably take experienced people about 30 seconds. Long story short I am trying to add a directory to my PATH and it is getting added but not working. I mean, the object of adding it to the path is so I can access... (2 Replies)
Discussion started by: tastybrownies
2 Replies

9. UNIX for Dummies Questions & Answers

Path set

Something changed on my unix box. Now when I log in it is showing entire path. It used to show only $ prompt before. I know I need to do something in .profile to show only $ prompt Could you please tell me what I should do, to show only $ prompt. (4 Replies)
Discussion started by: raopatwari
4 Replies

10. SCO

Set NIC correctly , but the network does not work

I'm trying to virtualize an instance of SCO Open Server 5.0.2c in VirtualBox (called VM- A) , I can not configure the network (NIC). The NIC I'm using is PCnet -FAST III (Am79C973 ) (this NIC works with VirtualBox + SCO 5.0.5M) When I add from ' Add new LAN adapter' I detects the NIC... (2 Replies)
Discussion started by: flako
2 Replies
WHICH(1)						      General Commands Manual							  WHICH(1)

NAME
which - shows the full path of (shell) commands. SYNOPSIS
which [options] [--] programname [...] DESCRIPTION
Which takes one or more arguments. For each of its arguments it prints to stdout the full path of the executables that would have been exe- cuted when this argument had been entered at the shell prompt. It does this by searching for an executable or script in the directories listed in the environment variable PATH using the same algorithm as bash(1). This man page is generated from the file which.texinfo. OPTIONS
--all, -a Print all matching executables in PATH, not just the first. --read-alias, -i Read aliases from stdin, reporting matching ones on stdout. This is useful in combination with using an alias for which itself. For example alias which='alias | which -i'. --skip-alias Ignore option `--read-alias', if any. This is useful to explicity search for normal binaries, while using the `--read-alias' option in an alias or function for which. --read-functions Read shell function definitions from stdin, reporting matching ones on stdout. This is useful in combination with using a shell func- tion for which itself. For example: which() { declare -f | which --read-functions $@ } export -f which --skip-functions Ignore option `--read-functions', if any. This is useful to explicity search for normal binaries, while using the `--read-functions' option in an alias or function for which. --skip-dot Skip directories in PATH that start with a dot. --skip-tilde Skip directories in PATH that start with a tilde and executables which reside in the HOME directory. --show-dot If a directory in PATH starts with a dot and a matching executable was found for that path, then print "./programname" rather than the full path. --show-tilde Output a tilde when a directory matches the HOME directory. This option is ignored when which is invoked as root. --tty-only Stop processing options on the right if not on tty. --version,-v,-V Print version information on standard output then exit successfully. --help Print usage information on standard output then exit successfully. RETURN VALUE
Which returns the number of failed arguments, or -1 when no `programname' was given. EXAMPLE
The recommended way to use this utility is by adding an alias (C shell) or shell function (Bourne shell) for which like the following: [ba]sh: which () { (alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot $@ } export -f which [t]csh: alias which 'alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde' This will print the readable ~/ and ./ when starting which from your prompt, while still printing the full path when used from a script: > which q2 ~/bin/q2 > echo `which q2` /home/carlo/bin/q2 BUGS
The HOME directory is determined by looking for the HOME environment variable, which aborts when this variable doesn't exist. Which will consider two equivalent directories to be different when one of them contains a path with a symbolic link. AUTHOR
Carlo Wood <carlo@gnu.org> SEE ALSO
bash(1) WHICH(1)
All times are GMT -4. The time now is 02:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy