bash: Command not found

Started by martin.schaible, December 30, 2019, 09:09:06 PM

Previous topic - Next topic
Hello

I didn't use the shell never before on my UTM, but now i need to do something.

After successful login, i tried to run a simple "ls -a", but the system can not find the command. In fact, bash finds no command at all. 

What can i do to get the command line working?

Thanks!

Martin

Might be related to the user rights?

Crude hack: sudo su...
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

felix eichhorns premium katzenfutter mit der extraportion energie

A router is not a switch - A router is not a switch - A router is not a switch - A rou....

bash does not exist on OPNsense. use posix shell (/bin/sh) for automation if that is your issue.

f you have bash but other things fail, I would suggest to check the PATH environment variable.

what Fabian said :)

echo $PATH

BTW: I hated not having bash, after installing sensei I realized it also provided bash shell, I am happy now
https://www.signorini.ch
Protectli Pfsense Mi7500L6 Intel 7Th Gen Core I7 7500U 16Gb Ddr4 Ram
512Gb Msata Ssd
6 X Intel Gigabit Ethernet

Because typing

# pkg install bash

is so hard? :)


Cheers,
Franco

Quote from: franco on January 07, 2020, 02:59:18 PM
Because typing

# pkg install bash

is so hard? :)


LOL, I am quite new to opnsense/freebsd, I didn't realize it was available in the repositories, since I didn't see the option in the WUI, for installing new packages, I assumed there was some kind of restriction :)
https://www.signorini.ch
Protectli Pfsense Mi7500L6 Intel 7Th Gen Core I7 7500U 16Gb Ddr4 Ram
512Gb Msata Ssd
6 X Intel Gigabit Ethernet

For portability with BSD in general we do not want bash in core because it would encourage contributors to write bash scripts which won't run if something goes bad with the packages which bash is one of.

And besides bash itself and readily available binary packages you can also install other software from the ports tree as OPNsense provides compilers in the base system.

# opnsense-code tools ports
# cd /usr/ports/your/software
# make install


Cheers,
Franco