I forgot the terminal command for viewing the disk space. So I began with the resources for terminal commands like pdf and webpages.
Aren't those terminal commands stored somewhere in the file syster?
In that case where are they stored and how can I see the terminal commands?
PS: It will be like a single command which lists and displays all the rest of command that are stored in the system.

- 197,895
- 55
- 485
- 740

- 7,110
2 Answers
You could try using the apropos
command to find a command knowing a basic idea of the command. For e.g, if you need to find a command for handling disk
functions try: apropos disk
. Advantage of using apropos
is that it gives a short description of the command.
e.g:
$ apropos disk
arm_sync_file_range (2) - sync a file segment with disk
baobab (1) - A graphical tool to analyze disk usage
cfdisk (8) - display or manipulate disk partition table
cgdisk (8) - Curses-based GUID partition table (GPT) manipulator
df (1) - report file system disk space usage
dvd+rw-booktype (1) - format DVD+-RW/-RAM disk with a logical format
dvd+rw-format (1) - format DVD+-RW/-RAM disk
dvd+rw-mediainfo (1) - display information about dvd drive and disk
fdformat (8) - low-level format a floppy disk
fdisk (8) - manipulate disk partition table
gdisk (8) - Interactive GUID partition table (GPT) manipulator
git-count-objects (1) - Count unpacked number of objects and their disk consumption
git-credential-store (1) - Helper to store credentials on disk
gnome-disk-image-mounter (1) - Attach and mount disk images
gnome-disks (1) - the GNOME Disks application
grub-mkstandalone (1) - make a memdisk-based GRUB image
grub-render-label (1) - generate a .disk_label for Apple Macs.
hd (4) - MFM/IDE hard disk devices
initrd (4) - boot loader initialized RAM disk
mbadblocks (1) - tests a floppy disk, and marks the bad blocks in the FAT
mcat (1) - dump raw disk image
mcheck (1) - verify all files on an MS-DOS formatted disk
memdiskfind (1) - utility to search for a MEMDISK instance
mformat (1) - add an MSDOS filesystem to a low-level formatted floppy disk
mkdiskimage (1) - Create a blank MS-DOS formatted hard disk image
mmount (1) - mount an MSDOS disk
mpartition (1) - partition an MSDOS hard disk
mtools (1) - utilities to access DOS disks in Unix.
mxtar (1) - Wrapper for using GNU tar directly from a floppy disk
mzip (1) - change protection mode and eject disk on Zip/Jaz drive
netscsid (1) - write data to optical disk media
partx (8) - tell the Linux kernel about the presence and numbering of on-disk partitions
quotactl (2) - manipulate disk quotas
ram (4) - ram disk device
sd (4) - driver for SCSI disk drives
sfdisk (8) - partition table manipulator for Linux
sgdisk (8) - Command-line GUID partition table (GPT) manipulator for Linux and Unix
sync (2) - commit buffer cache to disk
sync (8) - synchronize data on disk with memory
sync_file_range (2) - sync a file segment with disk
sync_file_range2 (2) - sync a file segment with disk
syncfs (2) - commit buffer cache to disk
udisks (8) - Disk Manager
udisksctl (1) - The udisks command line tool
udisksd (8) - The udisks system daemon
usb-creator-gtk (8) - Ubuntu startup disk creation tool for Gtk+
wodim (1) - write data to optical disk media
As for the location of the system commands, most command are stored in the following directories:
/bin/
/usr/bin
/usr/sbin
/sbin
You can use the ls
command to list the specific commands stored in each of these directories.
For further information:
Update:
You can use echo $PATH
, to find all the paths presently specified for executable:
e.g:
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
Then you can use ls
on each of the individual folders(each folder is separated by a :
) to find the executable commands present in that path.
PATH is an environment variable on Unix-like operating systems, DOS, OS/2, and Microsoft Windows, specifying a set of directories where executable programs are located. In general, each executing process or user session has its own PATH setting.
Courtesy: http://en.wikipedia.org/wiki/PATH_%28variable%29
The number in the brackets of the apropos
output refers to the man
section number. The man
pages have been categorized into various sections, namely:
Commands (Programs)
Those commands that can be executed by the user from within a shell.
System calls
Those functions which must be performed by the kernel.
Library calls
Most of the libc functions.
Special files (devices)
Files found in /dev.
File formats and conventions
The format for /etc/passwd and other human-readable files.
Games
Overview, conventions, and miscellaneous
Overviews of various topics, conventions and protocols, character set standards, and miscellaneous other things.
System management commands
Commands like mount(8), many of which only root can execute. System administration commands (usually only for root)
Kernel routines [Non standard]
Courtesy: http://manpages.ubuntu.com/manpages/trusty/man7/man-pages.7.html

- 12,007
-
2$echo $PATH that will tell your where all your commands are. you can take the output of the $PATH varaiable and do somethign like: $ls /bin /usr/local /usr/bin and get lists of all the things in your path. – j0h Mar 09 '15 at 14:42
-
-
Those are the sections of the manual. Typically, the on-line manual has different sections for e.g. user commands, system administrator commands, library functions, file formats, et al. See http://unix.stackexchange.com/questions/3586/what-do-the-numbers-in-a-man-page-mean – BRPocock Mar 09 '15 at 18:34
-
1@j0h, Thanks for the information, I have added it to the answer. I didn't think of using the PATH variable, that was pretty good thinking. :) – saji89 Mar 10 '15 at 05:18
-
1@Trengot, Those are
man
section numbers, I have added detailed information to the answer. – saji89 Mar 10 '15 at 05:28 -
heres a command to browse the available commands in the $PATH: y="$(echo $PATH | sed 's/:/ /g')" && ls $y | less – j0h Mar 10 '15 at 22:34
You can also use man -k <keyword>
to search for any command based on the particular keyword. apropos
mentioned in other answer actually uses the database generated by mandb
. So, both of the following will produce same output:
man -k disk
apropos disk
Both of the above provides regular expressions based pattern search by default.

- 91,753
alias
) and shell functions (similar to aliases) which are a bit like "user-defined built-ins". Then there are the programs in file system and found in currentPATH
, which are checked only after the previous ones don't apply. Then there are the programs in file system but not inPATH
, which need to be launched with path (most common case./program
). There's no single command to list them all. – hyde Mar 09 '15 at 19:32df
from your question), some are clearly not (likefirefox
), and some depend on what exactly you mean by "shell command" (likevim
ornano
). There's no good automatic way to do this classification, really. – hyde Mar 09 '15 at 19:36a2disconf a2dismod a2dissite a2enconf a2enmod a2ensite a2p a2query
– unhammer Mar 10 '15 at 07:41