1. Nothing new under the sun
  2. RTF(L)M
  3. Shell Aliases
    1. How about bypassing aliases?
  4. Shell expansions
  5. Shell key bindings
  6. Use colors and vim formatting configurations
  7. Use tmux
    1. What does tmux look like?

The argument of GUI (graphical user interface) vs CLI (command line interface) is an ancient one. I would argue both have their benefits depending on the scale of the task being performed.

Typically, there's a high barrier to entry that needs to be surmounted before seeing real benefits to using the CLI.

For example, clicking "Build" button for a job in the Jenkins web interface. Depending on how much work that job is doing, that GUI input is probably not a bottleneck in the larger scheme of things.

Alternatively, someone trying to type out a curl command on CLI to execute the same job via API is no doubt even less efficient. The obvious answer is to throw the command into a script, or bash alias, and use that ad infinitum.

I find it much quicker to hammer something like "build-job" into the terminal than to change windows to the browser, find the right tab, browse to the right job, etc.

Nothing new under the sun

Use google. Keep googling, more often than not an unrelated problem will hint you in the right direction. This is relevant for most everything in modern life.
Check out the awesome interactive google shell here: https://goosh.org
Alternatively, a local version: https://github.com/jarun/googler


Always check for local documentation first. Most everything should provide a man page - however for some things, the documentation may be available elsewhere.

For example, shell constructs (some distros do provide these man pages):

$ man for  
No manual entry for for

$ help for
for: for NAME [in WORDS ... ] ; do COMMANDS; done
    Execute commands for each member in a list.

    The `for' loop executes a sequence of commands for each member in a
    list of items.  If `in WORDS ...;' is not present, then `in "[email protected]"' is
    assumed.  For each element in WORDS, NAME is set to that element, and
    the COMMANDS are executed.

    Exit Status:
    Returns the status of the last command executed.

Another useful resource is info - which even provides an interactive text-based tutorial mode.

Shell Aliases

Easily shortcut commonly ran commands. These can be placed in ~/.bashrc to become persistent.

$ alias myip='curl -4 ifconfig.co && curl -6 ifconfig.co'
$ myip

See all defined aliases by simply running:

$ alias
alias v='vim'

Read more: https://www.tldp.org/LDP/abs/html/aliases.html

How about bypassing aliases?

A lot of distributions ship with default aliases such as,

alias ls='/bin/ls -la --color=auto'
alias lsf='/bin/ls -1AU --color=none'

If you don't take this into consideration, particularly for scripts, they might cause issues.
You can ensure you aren't referencing any alias by prefixing a backslash:

$ ls
total 32
drwxrwxr-x 6 user group 4096 Oct 28 10:41 .
drwxrwxr-x 3 user group 4096 Oct 28 10:36 ..
drwxrwxr-x 2 user group 4096 Oct 28 10:39 bash
drwxrwxr-x 8 user group 4096 Oct 28 12:03 .git
-rw-rw-r-- 1 user group 1210 Oct 28 10:33 LICENSE
-rw-rw-r-- 1 user group   10 Oct 28 10:33 README.md
drwxrwxr-x 3 user group 4096 Oct 28 10:45 tmux
drwxrwxr-x 2 user group 4096 Oct 28 10:37 vim

$ \ls                           
bash  LICENSE  README.md  tmux  vim

Shell expansions

Just like using the shell keybindings (See below), these expansion constructs can become second nature and have proven to be quite useful in my experience.
Consider this:

$ echo test{1,2,3}
test1 test2 test3

Bash interprets the curly-brackets and performs expansion. This is done pre-execution of the command, so those are the parameters any command (ie.) mv would have seen.

A more practical example, copying some logs to backup:

$ cp -v access_log-{2017,2018}* /backup/logs

These can also be combined:

$ echo {access,error}_log-{2017,2018}*
access_log-2017* access_log-2018* error_log-2017* error_log-2018*

Read more: http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_04.html

Shell key bindings

My favorite is CTRL+r which performs an inline search on your history.
At the prompt, type something unique to the command you want. I will typically backspace/re-type the last character to go further backwards.

$ whoami
$  curl google.com >/dev/null
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   219  100   219    0     0   1095      0 --:--:-- --:--:-- --:--:--  1089
$ w
 10:13:45 up 60 days, 14:30,  0 users,  load average: 2.02, 2.27, 1.85
USER     TTY        [email protected]   IDLE   JCPU   PCPU WHAT
$ <Hit CTRL+r>
(reverse-i-search)`who': whoami <Enter>

There are many, many more default keybindings...
To see all keybindings directly in shell (redacted for simplicity):

$ bind -p
"\C-i": complete
"\e\e": complete
"\e!": complete-command
"\e/": complete-filename
"\[email protected]": complete-hostname
"\e{": complete-into-braces
"\e~": complete-username
"\e$": complete-variable
"\C-r": reverse-search-history
"\ef": forward-word
"\eb": backward-word 
"\ed": kill-word
"\eg": glob-complete-word

Sometimes you'll see \e and \M in documentation - both indicate modifier key, typically ALT. \C is CTRL.
These are combinations, as opposed to "prefixes" -ala- vim or tmux.

CTRL+i == TAB == ALT+SHIFT+1 complete executables in $PATH
ALT+/ completes filenames in pwd, and looks for dotfiles.
ALT+g ^ same, but does not look for dotfiles.
ALT+SHIFT+2 completes hostnames (only local /etc/hosts)
ALT+SHIFT+[ prints a expansion array of files in pwd
ALT+SHIFT+` (backtick) completes usernames
ALT+SHIFT+4 completes environment variables
ALT+f jumps the cursor forward by words
ALT+b ^ backwards
ALT+d deletes the word infront of the cursor

Read more: https://www.gnu.org/software/bash/manual/html_node/Bindable-Readline-Commands.html

Use colors and vim formatting configurations

Whenever possible, make sure your terminal has color support enabled.
Use colorschemes and formatting in editors, like vim - this requires little effort to setup and has a huge return on usability.
See my dotfiles

Use tmux

This is more advanced, but the sooner you start using tmux the better.
I spend alot of time working on server infrastructure, which is remote from my own location and is always online. Using tmux, running on a jumphost, I can maintain a persistent shell environment that is easily resumable at any point.

What does tmux look like?

This is highly dependant on your configuration. Below is a default and custom session for comparison (tmux config in my dotfiles listed above)

Default tmux, split vertically
Customized tmux with 3 panes