Linux Commands: Editors, Terminals and Dev Tools¶
Text editors, terminal multiplexers and sessions, build tools, help pages, printing and media.
Part of the Linux commands cheat sheet.
Text Editors in Linux¶
nano — Nano's ANOther editor:
vi — Programmer's text editor:
vim — Vi IMproved:
ed — Line-oriented text editor:
emacs — GNU project Emacs editor:
Nano Shortcuts Commands¶
| Category | Shortcut | Description |
|---|---|---|
| File Operations | Ctrl + O |
Save (write) the current file |
Ctrl + X |
Exit Nano | |
Ctrl + R |
Read and insert another file | |
| Navigation | Ctrl + Y |
Scroll up one page |
Ctrl + V |
Scroll down one page | |
Alt + \ |
Go to a specific line number | |
Alt + , |
Move to the beginning of the current line | |
Alt + . |
Move to the end of the current line | |
| Editing | Ctrl + K |
Cut/delete text from the cursor to the end of the line (or marked block) |
Ctrl + U |
Uncut (paste) the last cut text | |
Ctrl + 6 |
Mark a block of text | |
Alt + 6 |
Copy the marked block | |
Ctrl + J |
Justify (format) the current paragraph | |
| Search/Replace | Ctrl + W |
Search for a string |
Alt + W |
Search and replace a string | |
Alt + R |
Repeat the last search |
VI/VIM Shortcuts Commands¶
| Mode/Category | Shortcut | Description |
|---|---|---|
| Insert & Replace | i |
Insert before cursor |
a |
Insert after cursor | |
A |
Insert at the end of the line | |
o |
Insert a new line below and switch to insert mode | |
R |
Replace mode | |
r |
Replace single character | |
s |
Substitute character | |
S |
Delete line and substitute | |
C |
Change to end of line | |
| Delete & Change | x |
Delete character |
dd |
Delete line | |
3dd |
Delete 3 lines | |
D |
Delete to end of line | |
dw |
Delete word | |
4dw |
Delete 4 words | |
cw |
Change word | |
| Undo & Restore | u |
Undo |
U |
Restore current line | |
~ |
Toggle case | |
Esc |
Exit mode | |
| Normal Mode | yy |
Copy (yank) current line |
p |
Paste | |
Ctrl + R |
Redo | |
| Command Mode | :w |
Save |
:q |
Quit | |
:q! |
Quit without saving | |
:wq or :x |
Save and quit | |
:set nu |
Show line numbers | |
:s/old/new/g |
Replace in file | |
| Visual Mode | v |
Select text |
y |
Copy selected | |
d |
Delete selected | |
p |
Paste |
Terminal and Session Management Commands¶
agetty — Alternative Linux getty:
chvt — Change foreground virtual terminal:
reset — Terminal initialization:
screen — Screen manager with VT100/ANSI terminal emulation:
showkey — Examine the codes sent by the keyboard:
stty — Change and print terminal line settings:
tty — Print the file name of the terminal connected to standard input:
xdg-open — Opens a file or URL in the user's preferred application:
Development and Build Automation Commands¶
aclocal — Create aclocal.m4 by scanning configure.ac:
addr2line — Convert addresses into file names and line numbers:
autoconf — Generate configuration scripts:
autoheader — Create a template header for configure:
automake — Automatically create Makefile.in's from Makefile.am's:
autoreconf — Update generated configuration files:
autoupdate — Update a configure.ac to a newer Autoconf:
bison — GNU parser generator:
cc — C compiler:
cpp — The C Preprocessor:
ctags — Generate tag files for source code:
g++ — GNU C++ compiler:
gcc — GNU C compiler:
gdb — The GNU Debugger:
ranlib — Generate index to archive:
readelf — Displays information about ELF files:
Help and Documentation Commands¶
apropos — Search the manual page names and descriptions:
help — Display information about builtin commands:
info — Read Info documents:
man — An interface to the system reference manuals:
whatis — Display one-line manual page descriptions:
which — Locate a command:
Printing and Media Commands¶
amixer — Command-line mixer for ALSA soundcard driver:
aplay — Command-line sound player for ALSA soundcard driver:
aplaymidi — Standard MIDI File player for ALSA sequencer:
cupsd — Common UNIX Printing System daemon:
eject — Eject removable media:
import — Saves any visible window on an X server and outputs it as an image file: