Terminal Essentials for Developers

Augusto Monteiro
2 min readNov 21, 2019

One of the things that most developers are looking for are ways to become more productive. Knowing how to use the terminal, how to create new functions, aliases and even installing a different shell can help you a lot with that.

When we start coding usually we just use plain shell what is a good way to learn the commands, but after you know how to do it you need to learn how to do it faster and that’s what I can help you with.

Oh My Zsh

It is a different shell with a lot of aliases, functions and a better usability, for example you can autocomplete case ignoring, you can install plugins for languages and install themes. Click here to know more -> https://ohmyz.sh

Custom Aliases

Aliases are one of the best ways I know to improve you productivity for example:
Let’s say that everyday you need to connect to a remote machine using ssh combined with a private key, usually you would go to the folder that has the key and…

$ ssh -i private.pem ubuntu@192.168.0.1

But if you know how to use aliases you can do edit your .bashrc (bash configuration) with

$ alias connect-vm="ssh -i /$absolutepath/private.pem ubuntu@192.168.0.1"

now if you want to connect you just type

$ connect-vm

(Remember to source your bash configuration file using the source command or just restart your terminal)
to connect to the machine. yeah it is awesome as it sounds : D

Default Aliases

That’s another thing you should watch for if you use any kind of customized shell, most of them have a lot of predefined aliases, for example if you use ohmyzsh you have things like:

$ gst # for git status
$ ggpull # for pulling on the current branch
$ ggpush # for pushing to the current branch

and many others you should spend sometime look at the documentation.

Functions

Oh yeah, If you know a little bit of bash you can even write you own functions to help you do stuff like pushing your git files then curl-ing an api to update a machine and much more complex stuff.

Reverse Search

Yeah the name sounds cool and describes it perfectly.
Have you ever forget what arguments to pass on a command you just used? well you can just press Ctrl+R and search for that.

Thank you & Stay Curious

If you have any feedback let me know : D

--

--

Augusto Monteiro

Artist! Geek! Nerd! Scientist! Learn Forever! #toinfinityandbeyond