question

vassilis-bourdakis avatar image
vassilis-bourdakis asked

VenusOS Large: ssh access: sh vs bash and configuring them...

hello,

trying to get some aliases running so that when I try to do something from ssh connection to my rpi I don't have to type all these long commands over and over again...

I can ssh fine, no issues there, so my problem is not getting into the machine.

However once in, it seems that the shell its running is bash although it says sh. Bit confusing:

echo "$SHELL"

returns

/bin/sh

which is in fact a symlink to /bin/bash.bash same as bash, go figure...

Anyway, I'm logging in as root, and there I have a .bash_history. Wrongly assumed I'm running bash, so tried .bashrc and .bash_alias with my alias to no avail.

However if I type:

bash

I'm greeted with:

BusyBox v1.31.0 (2021-03-07 19:57:11 UTC) multi-call binary.

Usage: who [-a]
This is BASH 5.0- DISPLAY on :0.0

Mon Mar 15 18:04:07 UTC 2021
[18:04 root@raspberrypi4 ~] >

(because i've added a 26kb worth of scripts/aliases/whatnot in .bashrc)

Now, I'm about to give up and just type bash every time I open a terminal window to the rpi, but it's not right, there's definitely something I'm missing (and I hope it's simple!)

any ideas?


cheers

V.

Venus OS
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

1 Answer
iv4n avatar image
iv4n answered ·

create a .sh file in /etc/profile.d for example:


/etc/profile.d/my_alias.sh:

alias l="ls -lha"

remember this file gets wiped on software updates, so handle that with your favorite method ;) such as /data/rc.local

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Related Resources