Member-only story
6 Terminal Commands You Should Know
From switching your private keys to directory listings with hidden files

As a developer, there are two key things that are paramount to a productive setup: speed and efficiency.
The more time you take to accomplish simple tasks like searching for files or displaying their contents, the more is taken from critical development time. When working on the command-line, things like aliases and custom functions can speed things up and let you get back to developing more quickly.
If every time you need to perform basic tasks you have to make a trip to Stack Overflow or do some Googling that’s time you could have put towards more important things — like writing code!
Below is a list of helpful commands I’ve put together for accomplishing repetitive (sometimes annoying) tasks:
1. SSH Agent and Private Keys
alias addkey='eval $(ssh-agent) && ssh-add'
Have you ever finished working on a feature and tried to push your Git changes up to GitHub or access a remote server via SSH only to get an error or a password prompt? The most likely culprit is that you restarted your computer at some point and lost your SSH agent (along with any added keys).
One easy way to fix this is by restarting your agent and re-adding the SSH keys. You can add this alias to your bash profile — then all you have to do is type: addkey
to get back up and running. Feel free to change “addkey” to something more suited to your style.
Keep in mind that the ssh-add
command expects your key to be placed in ~/.ssh/id_rsa
in order for it to be added automatically. If you’ve renamed your key or have multiple keys you want to add you can specify the name using a path as an argument, like this:
ssh-add ~/.ssh/my_special_key
You can even add this to your bash profile so it gets executed every time you open a new terminal window! Here’s a great article by Adam Towers on customizing your profile.
Now you’ll never forget to add your keys again!
2. Network Discovery with Ping6
ping6 -I en0 ff02::1