Hi, Can I access standard Linux Commands whilst running DietPi (headless) and, if so, how?
I am at the start of my Linux knowledge journey (like just about every other aspect of software development) and have decided to give DietPi a go. I’ve managed to install and get started - headless from my MacBook Air.
Now I want explore things like switching the user account (e.g. from DietPi to Root) and how to shutdown the system gracefully. I was hoping to be able to enter standard Linus Commands through SSH from my Mac terminal. But I’ve not found a way of achieving this.
many thanks for your message. Yes it’s simple like this. Just get a SSH client, connect to your system, login and complete initial setup. Below you can find link to our installation as well as user guide.
You are trying to use the man command which is not available on a fresh DietPi images. If you want to check, if a command is available, you could do:
which ls
or
command -v ls
or simply execute it :
If you need to see the man pages, I personally prefer to do that on a desktop browser where additional resources are shown:
If you really need to see the man pages on console, install the related package. Generally to find packages required to gain a certain command, the online man page site helps with this as well: https://manpages.debian.org/man
Note at the top: / buster / man-db / man(1)
Means the man command on Buster is available via man-db package. Hence do:
MichaIng , many thanks for your very helpful reply. With that information some pieces of a ‘newbie’s’ puzzle slotted into place. I subsequently went on a learning journey that has made me more comfortable getting around the directory structure using ssh. The
which
command is very helpful. And I also proceeded to encounter:
–help
which seems to give a slightly lighter weight version of a Man page, for available commands
\
<br>
* This GNU resource: https://www.gnu.org/software/coreutils/ and its online manual (in addition to the debian one you have pointed me to.
All in all a great learning experience. I am grateful for the responsiveness and helpfulness of this forum. About 72 hrs after jumping in with DietPi I feel really quite comfortable with the base setup.
:slight_smile:
Great to hear . Yes --help or -h works in very most cases. Also when you start entering a command and hit the character, bash (the console shell) will show you available commands starting with what you just typed character(s), or if there is only one result, will auto-complete.
The same works when you have entered a command (completely, or used auto-complete), a space, and hit , for most commands available sub-commands are shown, if not supported, then at least the files+dirs of the current directory, which you may anyway wanted to select (for cd, nano or such). When you type one or two dashes and , you’ll see available command options in most cases.
This is thanks to bash-completion (and a bit basic bash features) which may save a lot of time, searching, copy&paste .