``` ____ _ _ / ___|___ _ __ ___ _ __ _ __ ___| |__ ___ _ __ ___(_)_ _____ | | / _ \| '_ ` _ \| '_ \| '__/ _ \ '_ \ / _ \ '_ \/ __| \ \ / / _ \ | |__| (_) | | | | | | |_) | | | __/ | | | __/ | | \__ \ |\ V / __/ \____\___/|_| |_| |_| .__/|_| \___|_| |_|\___|_| |_|___/_| \_/ \___| |_| _ _ ____ _ _ _ _ | | (_)_ __ _ ___ __ / ___| |__ ___ __ _| |_ ___| |__ ___ ___| |_ | | | | '_ \| | | \ \/ / | | | '_ \ / _ \/ _` | __/ __| '_ \ / _ \/ _ \ __| | |___| | | | | |_| |> < | |___| | | | __/ (_| | |_\__ \ | | | __/ __/ |_ |_____|_|_| |_|\__,_/_/\_\ \____|_| |_|\___|\__,_|\__|___/_| |_|\___|\___|\__| ``` ########### ## GNOME ## ########### Ctrl+Alt T — Terminal Ctrl+Alt F — Firefox Ctrl+Alt H — Home Ctrl+Alt G — Gedit Alt F12 — Run command Alt F1 — Minimize window Alt F2 — Toggle maximize window Alt F3 — Toggle full screen Ctrl+Alt D — Minimize all windows Ctrl+Alt F1-F6 — Terminals (tty-s) Ctrl+Alt F7-F12 — Xwindows Ctrl+Alt Bksp — Restart X Ctrl+Alt Del — Log out Ctrl+Alt End — Shutdown Super PgUp/PgDn — Switch workspace Middle mouse button — Paste selected text NAUTILUS/NEMO: Ctrl L — Location, show path Ctrl+Shift N — New folder Ctrl H — Show hidden files GEDIT: Ctrl G — Find next Ctrl+Shift G — Find previous Ctrl+Shift K — Clear highlights TERMINAL: Ctrl+Shift C — Copy Ctrl+Shift V — Paste Ctrl+Shift T — New tab Ctrl+Shift W — Close tab Ctrl PgUp/PgDn — Switch tab Ctrl +/- — Zoom Ctrl D — Close terminal Ctrl S — Scroll lock BASH: Keys when in emacs mode. You can switch to `vi` mode with `set -o vi` command. Ctrl C — Interrupt, erase line Ctrl A — Go to beginning of line Ctrl E — End of line Ctrl U — Copy line Ctrl Y — Paste line Alt . — Last argument Ctrl R — Search trough history Alt * — Show all matches for regular expression Ctrl+Alt E — Show current line passed through alias, history and shell expansion Ctrl X, Ctrl E — Edit command in editor Ctrl P — Show last command (same as up arrow) ############################### ## AWESOME TERMINAL COMMANDS ## ############################### ======== PACKAGES: ======== dpkg — Low level package manager for Debian. -l — Lists installed packages. -i (sudo) — Installs package from a package file. apt-get — Advanced Package Tool built on top of `dpkg`. New command called simply `apt` is also available. It merges the functionalities of `apt-get` and `apt-cache`. update — Updates local list of existing packages. -u dist-upgrade — Upgrades by intelligently handling changing dependencies with new versions of packages. To regularly update put this line in `crontab`: `apt-get update && apt-get -u dist-upgrade`. upgrade — Same as dist-upgrade, but will not remove installed packages or install new ones. install — Also updates single package. remove — Removes package but leaves its configurations. remove apt-listchanges — Useful when Debian can't find a package. purge — Removes package and its configurations. Run `apt-get autoremove` after to remove all dependencies that are not needed anymore. autoremove — Removes unneeded packages. source — Downloads code. build-dep — Installs the build dependencies. --yes — Answers with 'yes' to most questions (Except the ones that can have potentially harmful consequences). --force-yes — Answers 'yes' to all questions (Not recommended). apt-cache — Queries the APT's internal database. search — Searches packages like `apropos`, but globally. show — Shows package info like version, dependencies, etc. showpkg — Similar, but also shows the packages that depend on the searched package (reverse dependencies). policy — Shows installed and remote version. apt-file — APT package searching utility. search — Search in which package a file is included. update — Updates local list of package contents. aptitude — Enables package browsing (skin for apt-get). search '~i!~M' — Lists installed packages that were not installed as a dependency, with short description of each. search — Package search. winetricks — Installs wine applications. update-alternatives — Maintains symbolic links determining default commands. unattended-upgrade — Automatic installation of security upgrades. COMMANDS: apropos — Searches the manual page names and descriptions (use quotes for phrases). -a — Matches all keywords. whatis — Displays one-line manual page description. whereis — Locates the binary, source, and manual page files for a command. which — Locates only the binary of a command. wtf — Translates acronyms and filename suffixes. INSTALL MANTRA: ``` ./configure --help ./configure make sudo make install ``` ======= GENERAL: ======= su — Switches user. - — Switches to user. - — Switches to root. man — Help on commands.
— Section numbers: 1. Programs, 2. System calls, 3. Library calls, 4. Special files, 5. File formats, 7. Miscellaneous, 8. System administration commands echo — Prints passed text. -n — Does not add newline at the end. -e — Enables interpretation of backslashed letters. xargs — Passes output from one command to arguments of another: `echo -a | xargs ls` -t — Echoes the command before executing it. -p — Echoes command and asks for confirmation before execution. -0 — Input items are separated by null character instead of space. tee — Sends output of a program to specified file and to standard output: ` | tee out_1.txt | ` /dev/tty — Sends output to terminal and to standard output expr — Evaluates passed expression. 1 + 1 — Prints `2`. bc — Evaluates input. It's basically a calculator, but also provides some control commands. echo 1 + 1 | bc — Prints `2`. echo "scale=5;3/4" | bc — Prints `.75000`. sh — Runs command interpreter (shell). Can run a script even if not executable. -c '' — Starts new non-interactive shell and reads commands from arguments instead of `stdin`. To append lines to system configuration file run: `sudo sh -c 'echo "" >> '` bash — Runs bash command interpreter (shell). -c — Reads commands from arguments instead of `stdin`. -n