LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-11-2022, 12:25 PM   #1
Whalers1988
Member
 
Registered: Feb 2022
Posts: 30

Rep: Reputation: 0
Question Linux --help & man


What I noticed why trying to learning Linux command line commands, is that the lists provide on mainly all websites will give you commands that are not supported? I am a spreed sheet of every command that works and doesn't work on my three different bashes. Rasberry Pi 4,linux Mint, Apples bash.

Why hasn't anyone made a list of command specific to each system?
It's a nightmare to not know if the command is suppose to work or if it's something me the user is doing wrong.
Also is it the system I'm on?
or is it the commands themselves need to be installed on that system in order to use them like a utility or tool?

It get so confusing and leads me down so many paths, that I get side tracked from the main point of trying to learn one thing and instead I got 10 new things to learn just before I can learn the one thing I was working on. Ugh.

Good example: Trying to install Waterfox browser on Rasberry Pi 4

1. You can't just sudo apt install waterfox -y
and be done. program install is not on and repositories or is spelled different. No clue how to find.
even when I use apt search waterfox or apt list waterfox no return hits?

2. Then I use GUI and download as tz or zip file try to extract and then set permissions on files & folders. Create or not create alisa shortcuts or just go directly to where the executable program should be or run and nothing happens.

Leads me off into black hole. I never can just install at command line and be good to go. I thought this is where Linux power is? Seems to be great when it works, but searching for compatible software and installing it can become a real nightmare.

Any thoughts or help much appreciated if you can answer the above 2 questions. Thanks all..
 
Old 02-11-2022, 03:12 PM   #2
enigma9o7
Senior Member
 
Registered: Jul 2018
Location: Silicon Valley
Distribution: Bodhi Linux
Posts: 1,388

Rep: Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560
If a command doesn't work, its probably not a bash command, probably an external program. Not every linux distro includes the same software, that is why there are so many, because everyone feels different things should be included. Some people prefer starting with a minimal distro and only adding what they need when they need it. Some like a distro with tons of crap preinstalled.

1. APT only installs stuff from the sources provided (in /etc/apt/sources.list(.d)) Most linux distros offer packaged software, and with apt it is likely you are using debian or ubuntu repositories, and both of those have thousands of packages, but they don't include everything ever made. If waterfox was available in any of your repositories, apt search would find it, then you could install it with apt. But it's not.

2. Here is how I would install waterfox G4 manually for amd64 (Not rpi/arm!!!).
Code:
cd /tmp 
wget https://github.com/WaterfoxCo/Waterfox/releases/download/G4.0.7/waterfox-G4.0.7.en-US.linux-x86_64.tar.bz2
sudo tar xf waterfox-G4.0.7.en-US.linux-x86_64.tar.bz2 -C /opt
sudo ln -s /opt/waterfox/waterfox /usr/local/bin 
sudo chmod 755 /opt/waterfox # so it can update itself
sudo chmod 755 /opt/waterfox/waterfox
sudo cp /opt/waterfox/browser/chrome/icons/default/default128.png /usr/share/icons/hicolor/128x128/apps/waterfox.png
echo "[Desktop Entry]
Type=Application
Categories=Network;
Name=Waterfox G4
Exec=waterfox
Icon=waterfox" >waterfox-g4.desktop
sudo mv waterfox-64.desktop /usr/share/applications
If what I do there doesnt' seem self explanatory, feel free to ask. If you were to do similar for your rpi, you'd have to find an armv7/32-bit or aarch64/armv8/arm64 version, depending which OS you have installed. Since your distro doesn't provide it, if you can't find a prebuilt copy, you'd have to learn to build from source.

Probably best just to install a supported browser from official repositories for your RPI. I hear firefox works pretty well.

Last edited by enigma9o7; 02-11-2022 at 11:29 PM.
 
1 members found this post helpful.
Old 02-11-2022, 03:39 PM   #3
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-15.0 / slarm64-current
Posts: 780
Blog Entries: 1

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
The command to find out if any given command is installed on the system in question, is "which", fore example:

Code:
me@zshcli ==> which waterfox
waterfox not found
couldn't find it, because I don't have it installed.

Code:
me@zshcli ==> which which
which: shell built-in command
found which and told me it was built in to zsh, which is the shell I'm currently using.

Code:
me@zshcli ==> which ros
/usr/bin/ros
returns the path to ros, short for roswell, a third party package I installed manually.
 
1 members found this post helpful.
Old 02-11-2022, 05:17 PM   #4
Whalers1988
Member
 
Registered: Feb 2022
Posts: 30

Original Poster
Rep: Reputation: 0
Ok thank you all. I'll keep plugging away. Not giving up ever. Love the power of freedom & choice. I just need to understand much much more so I can perfect it for myself. Ha
 
Old 02-11-2022, 05:54 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,730

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
While there is a lot of information that can be found on the internet determining what is relevant can be difficult. Many websites might contain old man pages for different versions or the version installed on your system isn't the latest.

First, there are many shells, Mac OS is based on BSD Unix and I believe its default shell is Z. Many commands are similar between Mac OS and linux but may not have the same options. Mac OS is POSIX compliant but linux is not. While the Pi, I assume you are running Pi OS is based on debian and should be very similar to Mint. Exact commands and their options may be different.

The Pi is an ARM CPU which is different then a regular PC so the programs and operating system are built just for its CPU. Programs built for a regular PC do not run on the Pi. With Waterfox you picked an extreme example because it is built specifically for the Intel CPU that requires the SSE4 instructions set which the Pi does not have. I think Odroids do but I digress.

Its possible to install programs from source but it does require the need to be aware of any dependencies and somewhat familiar with how programs compile.

The good thing about repositories i.e using apt is that all programs will automatically be installed with dependencies automatically being determined and should just work. The repositories contain lots of programs.
 
1 members found this post helpful.
Old 02-13-2022, 09:22 AM   #6
Whalers1988
Member
 
Registered: Feb 2022
Posts: 30

Original Poster
Rep: Reputation: 0
Is there a way to check every version of a Linux distro, including updates that may effect system OS, for a true list of commands that will work on them?

Or do I have to try each one at a time, like I'm doing now and documenting them?

Also why do some commands have --help or man and some only have one?
Does anyone every update complete these lists for all to use?

Thanks all.
 
Old 02-13-2022, 09:27 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,901

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
Quote:
Originally Posted by Whalers1988 View Post
Is there a way to check every version of a Linux distro, including updates that may effect system OS, for a true list of commands that will work on them?
No, that looks pointless. Everybody can extend that list any time with any command. A lot of things can be additionally installed.
Quote:
Originally Posted by Whalers1988 View Post
Or do I have to try each one at a time, like I'm doing now and documenting them?
More or less yes, but most of these commands work on any distro (or available, and can be installed)
Quote:
Originally Posted by Whalers1988 View Post
Also why do some commands have --help or man and some only have one?
This always depends on the maintainers/developers.
 
2 members found this post helpful.
Old 02-13-2022, 09:51 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,730

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
There are only recommendations and conventions as detailed by POSIX and the linux standards base that distributions and program developers should use but it isn't a "law". As stated versions of programs vary between distributions and operating systems.

I agree that trying to have an all encompassing list is pointless.
 
2 members found this post helpful.
Old 02-13-2022, 10:03 AM   #9
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Whalers1988 View Post
a true list of commands
What is that supposed to mean when you can install practically anything, have different commands at your disposal depending on user privileges or the shell your using, can make your own commands, etc. etc.?

You might want to figure out which shell you're using - assuming bash, you do
Code:
man bash
or simply
Code:
help
and look at the builtin commands.
Or you locate the package 'coreutils' and look at the binaries it provides:

Code:
/usr/bin/[
/usr/bin/b2sum
/usr/bin/base32
/usr/bin/base64
/usr/bin/basename
/usr/bin/basenc
/usr/bin/cat
/usr/bin/chcon
/usr/bin/chgrp
/usr/bin/chmod
/usr/bin/chown
/usr/bin/chroot
/usr/bin/cksum
/usr/bin/comm
/usr/bin/cp
/usr/bin/csplit
/usr/bin/cut
/usr/bin/date
/usr/bin/dd
/usr/bin/df
/usr/bin/dir
/usr/bin/dircolors
/usr/bin/dirname
/usr/bin/du
/usr/bin/echo
/usr/bin/env
/usr/bin/expand
/usr/bin/expr
/usr/bin/factor
/usr/bin/false
/usr/bin/fmt
/usr/bin/fold
/usr/bin/head
/usr/bin/hostid
/usr/bin/id
/usr/bin/install
/usr/bin/join
/usr/bin/link
/usr/bin/ln
/usr/bin/logname
/usr/bin/ls
/usr/bin/md5sum
/usr/bin/mkdir
/usr/bin/mkfifo
/usr/bin/mknod
/usr/bin/mktemp
/usr/bin/mv
/usr/bin/nice
/usr/bin/nl
/usr/bin/nohup
/usr/bin/nproc
/usr/bin/numfmt
/usr/bin/od
/usr/bin/paste
/usr/bin/pathchk
/usr/bin/pinky
/usr/bin/pr
/usr/bin/printenv
/usr/bin/printf
/usr/bin/ptx
/usr/bin/pwd
/usr/bin/readlink
/usr/bin/realpath
/usr/bin/rm
/usr/bin/rmdir
/usr/bin/runcon
/usr/bin/seq
/usr/bin/sha1sum
/usr/bin/sha224sum
/usr/bin/sha256sum
/usr/bin/sha384sum
/usr/bin/sha512sum
/usr/bin/shred
/usr/bin/shuf
/usr/bin/sleep
/usr/bin/sort
/usr/bin/split
/usr/bin/stat
/usr/bin/stdbuf
/usr/bin/stty
/usr/bin/sum
/usr/bin/sync
/usr/bin/tac
/usr/bin/tail
/usr/bin/tee
/usr/bin/test
/usr/bin/timeout
/usr/bin/touch
/usr/bin/tr
/usr/bin/true
/usr/bin/truncate
/usr/bin/tsort
/usr/bin/tty
/usr/bin/uname
/usr/bin/unexpand
/usr/bin/uniq
/usr/bin/unlink
/usr/bin/users
/usr/bin/vdir
/usr/bin/wc
/usr/bin/who
/usr/bin/whoami
/usr/bin/yes
I guess that's a s close as you'll get to that "true list".

On my distro, there's also binutils, diffutils, findutils, iputils ...
 
2 members found this post helpful.
Old 02-13-2022, 10:33 AM   #10
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Just to add to what was said above.
If you are using zsh there are certain commands (and their usage and syntax) that are different from similar commands in bash. The same applies to the generic sh environ, as well as csh, as well as every different flavor of a shell you will encounter.

Pick a shell you are comfortable with and learn its intricacies on the distro you are using so you can be familiar with how to function. You also need to be aware that most systems use sh for the system environment so that system commands by default are standardized across the board, but user shells are up to the user.
 
2 members found this post helpful.
Old 02-13-2022, 10:55 AM   #11
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,832
Blog Entries: 17

Rep: Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638
Quote:
Originally Posted by Whalers1988 View Post
What I noticed why trying to learning Linux command line commands, is that the lists provide on mainly all websites will give you commands that are not supported? I am a spreed sheet of every command that works and doesn't work on my three different bashes. Rasberry Pi 4,linux Mint, Apples bash.
Well, that's not a good approach, because, take my system, I have over 6000 available commands, and that's without counting options and arguments.
Have a brief look at this: (it's not exactly on topic, but related)
https://www.linuxquestions.org/quest...etc-etc-38387/
https://www.linuxquestions.org/quest...-advice-38644/

You don't need to know all the commands that are supported, because you can look them up. Just press the tab button in bash twice, and it will show you ALL your commands. You can do this for each letter as well, type "a" in bash and then the tab button twice, it will show all commands starting with a.

So, what is a command? It's actually a program in a way, and in a sense the same as clicking an icon on a GUI, but it's not the same, because it's a way more powerful way. Each command comes with MANY variables, not just the command. Those variables are OPTIONS and arguments, which means each command can do ALOT of different things, but in essence it is just a program. A "command" is "installed" when you install the program.

It might be confusing, because in GNU/Linux there are non-gui programs and gui-programs (gui=graphical user interface). And some "packages" like GNU Coreutils comes with many commands/programs. Most of the "core" "linux" commands are actually GNU Coreutils and util-linux packages, a collection of programs so to say. Most of them (or all) have no gui and cannot be executed without a variable (options/arguments), so you can argue they a command line tools instead. But you can also invoke gui programs with commands, and most often they have options and arguments too, just like non-gui ones.

So, when you double press tab in bash, you will basically see EVERYTHING that is installed. And yes, one program may have several or many different commands (not just options and arguments). mkfs(double tab) is a good example of just that. It has different commands for each file system, although, they could be options instead perhaps.

Firefox is a gui program, but you can start it from bash and it also has lots of options and arguments. You can see this by typing:
Code:
firefox --help
or execute firefox
Code:
firefox
Every "command" you see in bash this way is in your PATH.

Last edited by zeebra; 02-13-2022 at 10:57 AM.
 
1 members found this post helpful.
Old 02-13-2022, 11:08 AM   #12
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
I used to write help documents for myself also.

It did not work too well. If you document too much, including the mundane and everyday commands, your help guide gets overloaded and useless.

I see that you've cited two or more systems: Apple, Pi, and also Linux Mint. Does this mean you're using three computers? If so, what's more important is the distribution. For instance you may be running Mint on the Pi, and learning the general commands which Mint supports is good. I don't know how or where you're running Apple Bash. I myself haven't used their stuff much, but I do know that they sort of go to the beat of their own choice.

You can look online to find general command line guides and pick your favorites, including one for Apple Bash. Their bash may be nearly identical to all others, I personally do not know.

The Pi can be limited, depending what distribution you run, or it can be very full featured.

Sorry to sound broadly confusing, but I get the sense that you're swapping between two or more different computers using the same number of different distributions, and that may be partly why some of this seems frustrating.

Maybe if you make a general wiki, plus system specific wikis and shape them over time to get rid of duplicated and non-needed references where you know certain commands well enough to not need a help document. While I still have some wikis, they mainly contain info that I rarely do, so I need reminding of those erstwhile things.
 
1 members found this post helpful.
Old 02-13-2022, 12:29 PM   #13
Whalers1988
Member
 
Registered: Feb 2022
Posts: 30

Original Poster
Rep: Reputation: 0
The main reason I asked is; because when learning it's a nightmare to know if this new command I am learning is going to work on they system I am using. If not, then when I try to install it doesn't work, it leads to to believe that am I doing something wrong or does it just not work on this distro or did the install not work, or is the install no longer available, or does the install even work with this distro.

I makes using Linux a nightmare. Sure just install what you want when you want, but with little to no or none documentation that is reliable, becomes a messy swap to play around in. I like my swap in order and not messy! I like to be proficient and fast.

I don't want to be a Linux research man for Linux my hole life, but it looks like that's the beatify of Liunx. Be happy when you figure it out, and don't change tools,os, unless experimenting. But knowing if a server still has distros and if they work or what os they work on or if you need certain criteria is a big guessing game. I think it's should be this hard.

Once again I'm not giving up every!!!! Thanks for the the info all...
 
Old 02-13-2022, 12:38 PM   #14
Whalers1988
Member
 
Registered: Feb 2022
Posts: 30

Original Poster
Rep: Reputation: 0
REP: Helped some!

Will do thanks! Help some!



QUOTE=computersavvy;6329053]Just to add to what was said above.
If you are using zsh there are certain commands (and their usage and syntax) that are different from similar commands in bash. The same applies to the generic sh environ, as well as csh, as well as every different flavor of a shell you will encounter.

Pick a shell you are comfortable with and learn its intricacies on the distro you are using so you can be familiar with how to function. You also need to be aware that most systems use sh for the system environment so that system commands by default are standardized across the board, but user shells are up to the user.[/QUOTE]
 
Old 02-13-2022, 12:38 PM   #15
Whalers1988
Member
 
Registered: Feb 2022
Posts: 30

Original Poster
Rep: Reputation: 0
REP: Did not help & But thank you.

DID NOT WORK! But thank you.



Quote:
Originally Posted by enigma9o7 View Post
If a command doesn't work, its probably not a bash command, probably an external program. Not every linux distro includes the same software, that is why there are so many, because everyone feels different things should be included. Some people prefer starting with a minimal distro and only adding what they need when they need it. Some like a distro with tons of crap preinstalled.

1. APT only installs stuff from the sources provided (in /etc/apt/sources.list(.d)) Most linux distros offer packaged software, and with apt it is likely you are using debian or ubuntu repositories, and both of those have thousands of packages, but they don't include everything ever made. If waterfox was available in any of your repositories, apt search would find it, then you could install it with apt. But it's not.

2. Here is how I would install waterfox G4 manually for amd64 (Not rpi/arm!!!).
Code:
cd /tmp 
wget https://github.com/WaterfoxCo/Waterfox/releases/download/G4.0.7/waterfox-G4.0.7.en-US.linux-x86_64.tar.bz2
sudo tar xf waterfox-G4.0.7.en-US.linux-x86_64.tar.bz2 -C /opt
sudo ln -s /opt/waterfox/waterfox /usr/local/bin 
sudo chmod 755 /opt/waterfox # so it can update itself
sudo chmod 755 /opt/waterfox/waterfox
sudo cp /opt/waterfox/browser/chrome/icons/default/default128.png /usr/share/icons/hicolor/128x128/apps/waterfox.png
echo "[Desktop Entry]
Type=Application
Categories=Network;
Name=Waterfox G4
Exec=waterfox
Icon=waterfox" >waterfox-g4.desktop
sudo mv waterfox-64.desktop /usr/share/applications
If what I do there doesnt' seem self explanatory, feel free to ask. If you were to do similar for your rpi, you'd have to find an armv7/32-bit or aarch64/armv8/arm64 version, depending which OS you have installed. Since your distro doesn't provide it, if you can't find a prebuilt copy, you'd have to learn to build from source.

Probably best just to install a supported browser from official repositories for your RPI. I hear firefox works pretty well.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: One man's trash is another man's Linux computer LXer Syndicated Linux News 0 01-05-2016 06:51 AM
AOL UK && BT Voyager 100 && Slackware 10.2 && RP-PPPoE pitt0071 Linux - Networking 3 01-17-2006 06:10 AM
Phục hồi dữ liệu bị mất???, cứ pollsite General 1 06-27-2005 12:39 PM
Gotta love those ٱٱٱٱٱٱٱ&# iLLuSionZ Linux - General 5 11-18-2003 07:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration