OPNsense Forum

English Forums => General Discussion => Topic started by: martin.schaible on December 30, 2019, 09:09:06 pm

Title: bash: Command not found
Post by: martin.schaible on December 30, 2019, 09:09:06 pm
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
Title: Re: bash: Command not found
Post by: chemlud on December 30, 2019, 09:30:34 pm
Might be related to the user rights?

Crude hack: sudo su...
Title: Re: bash: Command not found
Post by: fabian on December 30, 2019, 10:54:05 pm
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.
Title: Re: bash: Command not found
Post by: siga75 on January 01, 2020, 10:34:40 am
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
Title: Re: bash: Command not found
Post by: franco on January 07, 2020, 02:59:18 pm
Because typing

# pkg install bash

is so hard? :)


Cheers,
Franco
Title: Re: bash: Command not found
Post by: siga75 on January 10, 2020, 08:15:33 am
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 :)
Title: Re: bash: Command not found
Post by: franco on January 10, 2020, 09:22:40 am
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