You are not logged in.
Pages: 1
No basic commands like
sudo
or
ls
is not working. Every time I try to execute a command,
bash: sudo: command not found
I didn't do anything funny. I just switched off the computer before it shut down once and this happened. Should I use fsck to solve this?
Offline
I just switched off the computer before it shut down once
What does this mean? You switched it off, then it shut down again after restarting, or are you just saying it shut down when you switched it off?
When you boot up, do you log into a tty? I assume you are not running a graphical session with this problem. Are you fully booted into a tty, or are you in a recovery shell of the initramfs?
What is the output of `echo $PATH`?
EDIT: was this the first reboot after your partial upgrades resulting from unsupported repo selections reported in your previous thread? Or had you fixed your pacman.conf and updated since then?
Last edited by Trilby (2019-04-21 04:19:02)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
What does this mean?
I meant that I turned the switch off before the shutdown process was complete. But should that affect anything?
I assume you are not running a graphical session with this problem.
Yes, I am running a graphical session. Just no basic commands are working. ('cd' is working fine.)
What is the output of `echo $PATH`?
The output of
echo $PATH
is
$HOME/.local/bin:$PATH
Or had you fixed your pacman.conf and updated since then?
Yes, I fixed my previous problem and have updated since then.
Offline
The output of
echo $PATH
is
$HOME/.local/bin:$PATH
Without /usr/bin in your PATH, none of the system binaries will work. How did you manage to break $PATH?
Offline
How did you manage to break $PATH?
No idea . That's my question too. I installed some packages for setting up haskell. But how can I solve the problem now?
Last edited by sb8623 (2019-04-21 05:36:34)
Offline
Look at your shell and pacman history and work out what broke it. I'd start with the haskell packages.
Offline
where is your path set? if you're unsure you can do something like
grep -ir "path=" $HOME
if nothing comes up, expand that beyond your home (but it shouldn't need to)
Offline
grep -ir "path=" $HOME
grep is not working too. How am I supposed to do that?
bash: grep: command not found
Offline
export PATH=/usr/bin
Offline
export PATH=/usr/bin
It works but I have to do it every time I open a new session in terminal.
Offline
I suggested it so you could follow.
Look at your shell and pacman history and work out what broke it. I'd start with the haskell packages.
Once you have found the cause of the breakage you can address it.
Offline
HiImTye wrote:grep -ir "path=" $HOME
grep is not working too. How am I supposed to do that?
bash: grep: command not found
Just prepend /usr/bin/ to all executables. I.e.
/usr/bin/grep -r PATH=
Please provide its output.
Last edited by schard (2019-04-21 10:53:59)
macro_rules! yolo { { $($tokens:tt)* } => { unsafe { $($tokens)* } }; }
Offline
Thanks for clarifying the shutdown statement - In hindsight that makes perfect sense the way it was written, perhaps I was undercaffeinated and seeing various possible readings of it. In any case, that now looks irrelevant.
I'd bet in one of your shell configs you set PATH with single quotes. The following two are completely different:
export PATH='$HOME/.local/bin:$PATH'
export PATH="$HOME/.local/bin:$PATH"
You likely wanted the second one of those, but put the first in your bashrc or bash_profile.
Last edited by Trilby (2019-04-21 12:33:10)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Please provide its output.
The partial output of
/usr/bin/grep -r PATH=
is
Binary file .cache/kio_http/9c33c9df530cd42c0df02375e2250d9ef55559a4 matches
Binary file .cache/mozilla/firefox/hvcq7jsl.default-1550988949401/cache2/entries/2823186B3F9DB2BA6010ACFAC56C35752CA08C6B matches
Binary file .cache/go-build/ed/ed31bf9eb1e326b8d707a3438ef1e9466d7caf37bc1a3d43fb1af1a25732910c-d matches
The rest is taking a long time and is pretty big.
Offline
Pages: 1