After default installation of Webmin I logged in as a user that is member of sudo group.
I tried running inxi command in the Command Shell but it is returning an error. Here is the output that may be relevant:
> whoami
root
> pwd
/root
> echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
> which inxi
/bin/inxi
> inxi
Undefined subroutine &main::get_cmdline called at /bin/inxi line 6382.
Here is the output of these commands in CLI of the server (bash shell):
No. Running Perl scripts in the Command Shell usually works just fine. There’s something about your script that isn’t happy in the very limited environment Command Shell can offer.
Try it in the Terminal instead. It’s a full terminal, while Command Shell can’t have an environment, deal well with subshells, or do anything that would require an interactive terminal or terminal control. The Terminal is much heavier, as it has to start up a backend websocket server to connect xterm.js to a login session, but it behaves pretty much like a regular terminal (like logging in via ssh or locally with a keyboard and monitor).
Ah, good. “Solved” then
just as @joe said. I have never found Webmin -> Tools -> Command shell of much use other than for very short scripts and this one was attempting to do too much