Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I was wondering if there is a command that will provide a list of available commands on my hosting server. The hosting provider does not seem to have a compiled list.
That will provide a list of all the executable files. So you can be sure that all the commands (except those are are shell builtins) will be on that list.
Most commands will reside on /bin or /usr/bin, but there can be as many locations as your admin wanted to setup. There's no comprehensive list unless your admin has made one, and it all depends on the packages and tools that the admin has installed.
Thanks for the reply. I didn't think there was a way to get all of the commands but I was hopeful. I guess it's just going to be trial and error.
Well, if you let us know what exactly do you want to do we might be able to suggest some possible tools. Then the list of binaries to check will be much smaller.
There was nothing in particular. I just found it quite annoying that the man command wasn't available on the server and wanted to determine what commands I actually did or did not have access to.
If the shell is bash and autocompletion is configured, then pressing TAB twice should give you a list of all the available commands. However it usually won't be a small list. It all depends on how the $PATH is configured. I don't know about other shells.
Unix has grown enormously. This seems both good and bad. I personally would recommend you start out by looking at the classic unix shell commands. There are only a couple hundred of them. At first they seem puzzling. "Why would anyone want to do THAT?!?!" When you are more familiar with them and start using them in pipes (|) they are almost a language, and an astonishingly powerful one. One classic book mentioned a spell checker as an example. It was simple and frill-free, but usable, and was coded as a command line maybe 40 CHARACTERS long.
Remember too that unix was born back when 64 K Bytes of memory was all you could address in small (affordable) machines. Something big like a C compiler was split in steps, stages, passes or whatever, and they were glued together in a pipe. (The stages in a pipe can work concurrently, each stage able to consume input as soon as its predecessor produces its output. Each TASK might view at most 64K, but the hardware might have a whole megabyte, and the little tasks in the pipeline could, together, use a BIG chunk of memory.)
Finally, remember that these core commands have been around in use for over THIRTY YEARS. The idiom "tried and true" comes to mind. These tools may look quaint or even antiquated, but they were conceived by a small group (Bell Labs) of some of the most gifted programmers in the world. I can think of no better way to learn the essentials of programming than by looking at this brilliant and seminal work.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.