JustToThePoint English Website Version
JustToThePoint en español
JustToThePoint in Thai

How to get help on the shell/terminal

If you are a Windows user, press the keys Windows-R simultaneously to open the Run window, then you can use the help command to get some information on any command, e.g., help taskkill, help dir, or help date. The forward slash (/) is used to execute a command option or perform a switch, the question mark (?) is for the help switch in particular, e.g., ipconfig /?, systeminfo /? or attrib /?  

Other ways to get some help and find solutions to problems in Windows are: Microsoft Support. The Get Help app: Just type Get Help on the taskbar and then type your doubt or problem in the search box. Use Windows Troubleshooters: Settings, System, Troubleshoot, Other troubleshooters.

Help on the shell/terminal

Help on the shell/terminal

 

If you are a macOS or GNU/Linux user:

  1. Use the command options -h or -help.
    [username@hostname cwd]$ paccache -h
    paccache v1.5.3
    
    A flexible pacman cache cleaning utility.
    
    Usage: paccache  [options] [targets...]
    
      Operations:
        -d, --dryrun          perform a dry run, only finding candidate packages.
        -m, --move       move candidate packages to "dir".
        -r, --remove          remove candidate packages.
    
      Options:
        --min-atime     --min-mtime                           than the time given, even if this means keeping more
                              than specified through the '--keep' option. Accepts
                              arguments according to 'info "Date input formats"',
                              e.g. '30 days ago'.
        -a, --arch      scan for "arch" (default: all architectures).
        [...]
    
  2. Sometimes, you don’t know the exact name of a command, then you can make use of tab completion. Just type the beginning of the command and then press tab.
  3. If you want a quick way of knowing the purpose and use of a command without going through the whole manual, whatis displays one-line manual page descriptions:
    [username@hostname cwd]$ whatis ps
    ps (1)               - report a snapshot of the current processes.
    [username@hostname cwd]$ whatis surfraw
    surfraw (1)          - a fast unix command line interface to WWW services
    
  4. The command man is the general help. Some examples are: man ps, man fdisk.

    When you are reading a man page, remember: / search_string, find matches to “search_string”; n go to the next match; and type q to quit or exit.

  5. tldr (aka “Too Long Didn’t Read") are simplified and community-driven man pages with practical examples. Installation: brew install tldr (macOS), sudo pacman -S tldr (Arch), sudo apt install tldr (Ubuntu). Update offline cache of tldr pages: tldr ‐‐update. Use: tldr grep.  
  6. You could get access to the best community driven cheat sheets by typing: curl https://cht.sh/ps, curl https://cht.sh/fdisk. You may also want to check: Cheat Sheet.
  7. apropos helps you when you don’t remember the exact command but a keyword related to it, e.g. apropos firewall.
  8. And last, but not least, cheat allows you to create, edit, and view interactive cheatsheets on the command-line.
    Installation: sudo snap install cheat
    Use: cheat tail
    The first time you launch it, it will ask you two questions: A config file was not found. Would you like to create one now? Y Would you like to download the community cheatsheets? Y.
    To edit a cheatsheet: cheat -e tail.
Bitcoin donation

JustToThePoint Copyright © 2011 - 2024 Anawim. ALL RIGHTS RESERVED. Bilingual e-books, articles, and videos to help your child and your entire family succeed, develop a healthy lifestyle, and have a lot of fun.

This website uses cookies to improve your navigation experience.
By continuing, you are consenting to our use of cookies, in accordance with our Cookies Policy and Website Terms and Conditions of use.