this post was submitted on 22 Dec 2023
448 points (95.3% liked)
Technology
60052 readers
2853 users here now
This is a most excellent place for technology news and articles.
Our Rules
- Follow the lemmy.world rules.
- Only tech related content.
- Be excellent to each another!
- Mod approved content bots can post up to 10 articles per day.
- Threads asking for personal tech support may be deleted.
- Politics threads may be removed.
- No memes allowed as posts, OK to post as comments.
- Only approved bots from the list below, to ask if your bot can be added please contact us.
- Check for duplicates before posting, duplicates may be removed
Approved Bots
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Yes and no, kinda. So the most popular shell by far is Bash, which includes its own built in functions, and can also be extended with custom functions which certain distros may include in your bash config file by default. But generally, Bash and the GNU coreutils are standard, although some more "hip" distros will include other shell prompts such as zsh or fish by default, but even those tend to come with bash for script compatibility or easy switching for user preference. Some distros may include programs by default, but most of the time those are easily available in other distros through the package manager.
compgen -c
(orcompgen -c | more
for a scrollable list (pressq
to exit)) should do the trick, but that is a built-in bash command that may not be available on other shells, but generally you can find all the programs able to be called from shell inside the/bin
/sbin
/usr/bin
and
/usr/sbin
directories. All these directories are added to a variable called $PATH, and when you type a command into your shell, these are the places that get searched for a matching program to run. You can use
echo $PATH
to see all the directories on your machine which are searched, or even add your own directory containing custom scripts or utilities so you can use them anywhere like an installed program.