Results 1 to 5 of 5
When i ran the command: $PATH, I got something as following: bash: /sbin:/usr/sbin:/usr/local/sbin:/opt/kde3/sbin:/opt/gnome/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin: No such file or directory and i found out that, the directories /usr/lib/mit/bin and /usr/lib/mit/sbin do not ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-15-2006 #1
a Question on PATH, an environment variable
When i ran the command: $PATH, I got something as following:
bash: /sbin:/usr/sbin:/usr/local/sbin:/opt/kde3/sbin:/opt/gnome/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin: No such file or directory
and i found out that, the directories /usr/lib/mit/bin and /usr/lib/mit/sbin do not exist anymore
Please help me to remove these from the PATH, and tell me how to add other directories to the PATH.
Thank you very much
- 03-15-2006 #2
First off, to read the value of PATH you should do:
Second, to change the value of PATH permanently, there are several places where it is set: /etc/profile, ~/.bash_profile, ~/.bashrc, /etc/bash/bashrc, and potentially other places.
- 03-15-2006 #3
It is probably better to find and modify the code where '/usr/lib/mit/bin' and '/usr/lib/mit/sbin' are actually added to the PATH -- but, if for some reason you are not able or you think it would not be wise - place the following lines in your ~/.bashrc file:
PATH=`echo " $PATH " | /usr/bin/sed 's.:. .g' | /usr/bin/sed 's. /usr/lib/mit/bin . .g' | /usr/bin/sed 's. /usr/lib/mit/sbin . .g'` PATH=`echo $PATH | /usr/bin/sed 's. .:.g'`
- 03-16-2006 #4
Where is my .bash_profile...?
Yes, I try to find these files: /etc/profile, ~/.bash_profile, ~/.bashrc, /etc/bash/bashrc, but there exists only /etc/profile. The files, /etc/bash_profile, ~/.bashrc, and the folder /etc/bash/, do not exist in my system
What can i do now? (I am running SuSE 10.0). are there any other folders in SuSE 10.0 where i can find the above missing file and folder?
- 03-16-2006 #5Originally Posted by beginner
If you want mine go ahead ~>
# Sample .bashrc for SuSE Linux # Copyright (c) SuSE GmbH Nuernberg # There are 3 different types of shells in bash: the login shell, normal shell # and interactive shell. Login shells read ~/.profile and interactive shells # read ~/.bashrc; in our setup, /etc/profile sources ~/.bashrc - thus all # settings made here will also take effect in a login shell. # # NOTE: It is recommended to make language settings in ~/.profile rather than # here, since multilingual X sessions would not work properly if LANG is over- # ridden in every subshell. # This might be helpful for Linux newbies who previously used DOS... test -f /etc/profile.dos && . /etc/profile.dos # Some applications read the EDITOR variable to determine your favourite text # editor. So uncomment the line below and enter the editor of your choice :-) #export EDITOR=/usr/bin/vim #export EDITOR=/usr/bin/mcedit # For some news readers it makes sense to specify the NEWSSERVER variable here #export NEWSSERVER=your.news.server # If you want to use a Palm device with Linux, uncomment the two lines below. # For some (older) Palm Pilots, you might need to set a lower baud rate # e.g. 57600 or 38400; lowest is 9600 (very slow!) # #export PILOTPORT=/dev/pilot #export PILOTRATE=115200 test -s ~/.alias && . ~/.alias || true # My startupaliases # lsd is now the command for list only directories alias lsd="ls -la | grep ^d" # never remove without prompting, to remove without prompting now use rm -f (force option) alias rm="rm -i" # start pico with options -e -k, resp. for tab-completion and cut until end of line. alias pico="pico -e -k" # This alias creates a new command called "today" that will display today's date with nice formatting. alias today='date +"%A, %B %-d, %Y"' # user added binds to special keys: # <Alt>+w to show all possible completions for a command from history. bind '"\M-w"':"\"\C-k\C-ahistory | grep '^ *[0-9]* *\C-e.'\C-m\"" # the prompt for the user is also set in /etc/bash.bashrc.local