The Linux / Unix operating systems come with many commands that the user can enter into the computer from the keyboard and use to interact with the computer. There are two kinds of commands that come with a Linux / Unix operating system: Shell Commands and Linux/Unix Commands. Here is a comparison of the two:
Built-in Shell Commands:
- What are they?
They are part of a shell. In other words, each shell (e.g., C Shell, Bourne Shell and Korn Shell) has a set of commands built into its program.
- Are the shell commands always the same on every computer?
Though shell commands may vary from one shell to another, the commands within each shell stay the same across Linux / Unix distributions and variants.
- Where do I enter shell commands?
The user types shell commands at the shell prompt, the default of which is % for the C Shell, and $ for the Bourne Shell and the Korn Shell.
- What are some of the common shell commands in Linux / Unix?
See a list here.
- How do I find out how to use a shell command?
Use the man command. The man page of a shell command will tell you how it is used in the currently active shell on your computer. For general reference, you can also take a look at the Shell Command Library on this site.
- Are these also part of the shells?
No. Each Linux / Unix command is a separate executable program. They are written in C, or less likely, in other programming languages.
- Where are they stored?
They are located in special directories for binary files, such as /user/bin. Directories that contain these Linux / Unix commands are listed in the search path, which the shells use to find them.
- Are Linux / Unix commands the same on every computer?
Commands may vary from one Linux distribution to another and one Unix flavor to another. You use these commands (original or added) the same way independent of the shell you are currently in.
- How many Linux / Unix commands are there?
In general, each Linux / Unix operating system comes with a somewhat different set of commands. Users can add more by writing their own commands. You can find a list of Linux commands here.
- How do I use a shell command?
Because Linux / Unix commands may vary in syntax and usage from one operating system variant to another, use the man command to find out for sure how a command works on your particular platform. The Linux Command Library can also be used for general reference.