Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! beginner's Avatar
    Join Date
    Feb 2006
    Kiel, Germany

    Question 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

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    St. Petersburg, FL
    First off, to read the value of PATH you should do:
    echo $PATH
    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.

  3. #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'`
    (It is just a little bit "elaborate", but it is needed to make sure it always works properly no matter what is in the PATH list... )

  4. $spacer_open
  5. #4
    Just Joined! beginner's Avatar
    Join Date
    Feb 2006
    Kiel, Germany

    Question 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?

  6. #5
    Quote Originally Posted by beginner
    The files, /etc/bash_profile, ~/.bashrc, and the folder /etc/bash/, do not exist in my system
    The only i do have on my suse 10.0 is ~/.bashrc
    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
    # 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
    You can delete the part from 'My startupaliases' since i put that in, although if you look at it, it adds some nice functionality.
    Now what? You have Linux installed and running. The GUI is working fine, but you are getting tired of changing your desktop themes. You keep seeing this "terminal" thing. Don't worry, they'll show you what to do @
    <~ ~>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts