You are not logged in.
Pages: 1
Since two days, I have a problem running some system commands, for example:
mkinitcpio
reboot
lspci
etc.
The result being: bash: mkinitcpio: command not found
The files are there, but work only if I give full path to them. I know it has something to do with the PATH variable not being loaded at the start of system, but I do not know how to fix it.
Help, please.
Last edited by Lockheed (2011-05-13 21:31:31)
Offline
What's the output of 'echo $PATH'?
https://wiki.archlinux.org/index.php/FA … tart_it.3F says /etc/profile should be sourced.
Last edited by karol (2011-05-13 15:50:28)
Offline
Also, what is the result of
cat /etc/profile
Check that ~/.profile and ~/.bashrc are not setting PATH to something - or if they are that $PATH: is at the start of the spec.
PATH=$PATH:mypath
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
$ echo $PATH
/usr/lib/libfm:/bin:/usr/bin:/usr/local/bin:/home/juha/bin
$ cat /etc/profile
# /etc/profile
#Set our umask
umask 022
# Set our default path
PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
export PATH
# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
for profile in /etc/profile.d/*.sh; do
test -r "$profile" && . "$profile"
done
unset profile
fi
# Source global bash config
if test "$PS1" && test "$BASH" && test -r /etc/bash.bashrc; then
. /etc/bash.bashrc
fi
# Termcap is outdated, old, and crusty, kill it.
unset TERMCAP
# Man is much better than us at figuring this out
unset MANPATH
Offline
Something is setting PATH but not referencing the previous PATH, thus overwriting it with what you see when you echo $PATH
Check ~/.profile and ~/.bashrc
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
Spot on. I forgot I messed up my /.bashrc.
Thanks
Offline
Ok, I called it solved too quickly.
It seems I can run all programs except for those from /sbin
Offline
Ok, I called it solved too quickly.
It seems I can run all programs except for those from /sbin
IIRC you need to be root (or use sudo) to run them.
Offline
It doesn't run with sudo
Offline
What's the error message?
EDIT: did you remember the colon after $PATH?
Last edited by skanky (2011-05-14 20:29:46)
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
I think I fixed it. Dropped the output of "cat" it into .bash somewhere as apparently it was being overwritten by some other file at boot up.
Offline
Pages: 1