Find the answer to your Linux question:
Results 1 to 10 of 10
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Where Can I get a List of Linux Commands?

    Where can I get a list of Linux Commands and what they do?

  2. #2

  3. #3
    Administrator jayd512's Avatar
    Join Date
    Feb 2008

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  4. $spacer_open
  5. #4

  6. #5
    I refuse to let fear and fear of others rule my life. It puts my humanity at risk.
    Accepting Death is the only way to stay alive.

  7. #6
    Quote Originally Posted by gregoryshock View Post
    Where can I get a list of Linux Commands and what they do?
    you'll find the vast majority of commands on your system using this command:

    ls -l /bin /usr/bin
    also, some admin-related commands:
    ls -l /sbin /usr/sbin
    for any command you find there, see if a man page for it exists, e.g.:
    man grep
    there is also some more (or less) formal documentation for some packages (no rhyme or reason here) in /usr/share/doc.

    some commands also have info pages, e.g.:
    info grep
    also, often you can get some usage about a program by executing it with the --help switch, e.g.:

    grep --help

  8. #7
    Linux User
    Join Date
    Nov 2008
    Tokyo, Japan
    Linux lets you do a keyword search for commands using the "man -k <keywords> | less" command. Notice the "less" command after the pipe character there, "less" is a text reading program it lets your read text from commands that output too much information for one screen. To quit "less" and go back to the command line, press "q". To search for text, press "/" then type the word to search for. To scroll down press "d", to scroll up, press "u". You can also use "j" and "k" to step down or up one line.

    When you find a command that you want to know more about, quit the current "less" program, then type "man <command>". The "man" program will find the manual page and then run "less" for you so you can read the manual.

    When you use the Linux command line, you are actually using a program called "Bash." Bash is a simple scripting language and programming language that is designed to allow you to work with files and launch programs with as little typing as possible.

    When you use bash, you have two kinds of commands: built-in commands, which are keywords in the Bash programming language (for example "cd" and "echo"), and then you have actual software commands. A software command looks like a command, but when you type it, it actually launches a software. All software commands are installed in the system directories: /usr/bin, /usr/sbin, /bin, and /sbin.

    To learn more about Bash built-in commands, read the Bash manual (the command "man bash" will display the manual), and also search Google for Bash scripting tutorials.

    Every other "command" in Linux is actually a program that was installed for you. Things like "grep" and "find" are programs that are installed on nearly every Linux systems. But other usefull programs, like "vim" or "avplay" or "firefox" may or may not exist depending on your Linux distribution. And you can install software easily (for example the "apt-get" or "yum" programs install software), and this will provide new commands for you.

    If you want to run a program that is not in /usr/bin, /usr/sbin, /bin, or /sbin, type the full path of the program. For example, if your program file is in /home/username/bin/some-program, simply type in "/home/username/bin/some-program" to run it. Or you can "cd /home/username/bin" then type "./some-program" -- the ./ is a shortcut for the current directory.

  9. #8
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    3rd rock from sun - Often seen near moon
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    FOSS India Award winning ext3fs Undelete tool Online Linux Terminal

  10. #9
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris

    Here is a script that goes through the directory where the man pages for (default) section 1 -- user commands -- are kept. It then massages the data and generates a list of lines that describe the program (or information file).

    I've tried this on a number of GNU/Linux distributions as well as others like FreeBSD. ReHat/CentOS seems to store some junk in the directory, but others come out well.
    #!/usr/bin/env bash
    # @(#) lamp	list-all-man-pages: commands based on contents of man pages.
    # $Id: lamp,v 1.6 2013/05/10 14:06:45 drl Exp drl $
    # Utility functions: print-as-echo, print-line-with-visual-space, debug.
    # export PATH="/usr/local/bin:/usr/bin:/bin"
    pe() { for _i;do printf "%s" "$_i";done; printf "\n"; }
    pl() { pe;pe "-----" ;pe "$*"; }
    db() { ( printf " db, ";for _i;do printf "%s" "$_i";done;printf "\n" ) >&2 ; }
    db() { : ; }
    # C=$HOME/bin/context && [ -f $C ] && $C
    db ""
    db " Section of man pages:"
    db pe $SECTION
    db " Results:"
    ls -1 /usr/share/man/man${SECTION} |
    cut -f1 -d. |
    xargs apropos |
    sed -n "/($SECTION)/s/($SECTION) *- */	/p" | # use /TAB/p
    sort -u |
    expand -20
    exit 0
    for a command using a local summarizer on my workstation:
    % ./lamp | specimen 5:5:5
    Edges: 5:5:5 of 2229 lines in file "-"
    2csv                convert xml documents in a flat format
    2html               convert xml documents in a flat format
    2xml                convert xml documents in a flat format
    411toppm            convert Sony Mavica .411 image to ppm
    7z                  A file archiver with highest compression ratio
    mysqlaccess         client for checking access privileges
    mysqladmin          client for administering a MySQL server
    mysqlbinlog         utility for processing binary log files
    mysqlbug            MySQL bug reporting tool.
    mysqlcheck          a table maintenance and repair program
    zshzle              zsh command line editor
    zsoelim             satisfy .so requests in roff input
    zssh                interactive file transfer wrapper for ssh
    ztelnet             interactive file transfer wrapper for ssh
    zxpdf               Portable Document Format (PDF) file viewer for X (vers...
    In place of the summarizer, you can use less or other pager.

    Best wishes ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  11. #10
    If you want a hard copy reference with additional sections on using vi, emacs, tcl, sed, etc. I would get O'Reilly's Linux in a Nutshell. I keep a copy for those infrequent used commands.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts