Learning Commands¶
Command Manuals¶
Linux has two ways that we can learn more about a command within the terminal. The first is using manual pages, man. These contain all of the information that you will need to effectively use any command.
Text Only
% man vim
VIM(1) General Commands Manual VIM(1)
NAME
vim - Vi IMproved, a programmer's text editor
SYNOPSIS
vim [options] [file ..]
vim [options] -
vim [options] -t tag
vim [options] -q [errorfile]
ex
view
gvim gview evim eview
rvim rview rgvim rgview
DESCRIPTION
Vim is a text editor that is upwards compatible to Vi. It can be used to edit all
kinds of plain text. It is especially useful for editing programs.
There are a lot of enhancements above Vi: multi level undo, multi windows and
buffers, syntax highlighting, command line editing, filename completion, on-line
help, visual selection, etc.. See ":help vi_diff.txt" for a summary of the
differences between Vim and Vi.
While running Vim a lot of help can be obtained from the on-line help system, with
the ":help" command. See the ON-LINE HELP section below.
...
The other method is to use the --help flag after the command.
Text Only
% vim --help
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Feb 12 2022 04:26:50)
Usage: vim [arguments] [file ..] edit specified file(s)
or: vim [arguments] - read text from stdin
or: vim [arguments] -t tag edit file where tag is defined
or: vim [arguments] -q [errorfile] edit file with first error
Arguments:
-- Only file names after this
-v Vi mode (like "vi")
-e Ex mode (like "ex")
-E Improved Ex mode
-s Silent (batch) mode (only for "ex")
-d Diff mode (like "vimdiff")
-y Easy mode (like "evim", modeless)
-R Readonly mode (like "view")
...
Useful Commands Not Discussed In These Guidelines¶
| Command | Use |
|---|---|
| rsync | Copy files and directories between machines using ssh |
| ps | List processes running |
| kill | Stop process running |
| head | Display top x lines of file, 10 by default |
| tail | Display bottom x lines of file |
| where | List the path to command's location |
| whichis | If multiple versions, list all their paths |
| apropos | Searches man pages by keyword, useful to find new commands |