Command Problems
ok when i try to type in lspci or lsmod it says command not found, but when i do a man lspci or man lsmod it shows me all the options for it, what gives?
|
I would think probably means the locations of those binaries are not in your PATH variable. Try using the full path and see if the commands work for you. If they do then I would add them to your path. Also, were you trying these commands as root? Just curious. Hope this helps.
|
Quote:
the man pages are a totally seperate app... unlike --help the manpages contain most of the linux documentation... wether its installed or not.. |
command line
use
# locate lspci and choose the right path (copy and paste) is the easiest way. |
Usually /sbin and /usr/sbin directories are not included in the $PATH of the regular users. Try /sbin/lsmod, or add /sbin and /usr/sbin to your $PATH (in your ~/.bash_profile)
|
thanks for the help guys, they were in the /sbin directory
|
how would i add those to my path though? i'm getting tired of having to type in the path and command
|
To add /sbin to your $PATH:
export PATH = "$PATH:/sbin" To make this permanent, you have to put it in a configuration file that runs at startup---eg /etc/profile or ~/.bashrc |
Where should i add that in?
# /etc/profile # System wide environment and startup programs, for login setup # Functions and aliases go in /etc/bashrc pathmunge () { if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then if [ "$2" = "after" ] ; then PATH=$PATH:$1 else PATH=$1:$PATH fi fi } # ksh workaround if [ -z "$EUID" -a -x /usr/bin/id ]; then EUID=`id -u` UID=`id -ru` fi # Path manipulation if [ "$EUID" = "0" ]; then pathmunge /sbin pathmunge /usr/sbin pathmunge /usr/local/sbin fi # No core files by default ulimit -S -c 0 > /dev/null 2>&1 if [ -x /usr/bin/id ]; then USER="`id -un`" LOGNAME=$USER MAIL="/var/spool/mail/$USER" fi HOSTNAME=`/bin/hostname` HISTSIZE=1000 if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then INPUTRC=/etc/inputrc fi export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC for i in /etc/profile.d/*.sh ; do if [ -r "$i" ]; then . $i fi done unset i unset pathmunge |
Hi,
Try to enter right below the line export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC It should look as export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC export PATH = "$PATH:/sbin" |
All times are GMT -5. The time now is 06:38 PM. |