Boost Your Productivity with the Mac Terminal

by Mike Le, Founder / CEO

For a lot of developers, using the terminal is second nature. It feels like being a true power user of the computer when you understand and unlock the power of the MacOS terminal window. I’m writing today to share some creative approaches that exponentially increase productivity, streamline your workflow and get more done. It’s a bit wild too, so let’s get started.

1. The .rc file

Your terminal on Mac or Linux general comes with a .rc file, depending on what the shell is, it would be .zshrc for zshell or .bashrc for bash. This is where we can add simple alias with a simple line like this:

alias my-mail='open -a "Google Chrome" https://gmail.com'

So when you type into the terminal my-mail it will open Google Chrome and navigate to Gmail for you. Neat, right?

2. String the commands together in a batch

You can also batch a handful of these commands together into a single action. Like this

alias quick-open="cd $HOME/your-project/backend; code .; cd $HOME/your-project/frontend; code ."

And now you can open two of your code bases with just one command! Imagine you start your day by opening your productive playlist, your BI dashboard, favorite docs on Notion, Slack, etc. with just one command. Getting into flow is never as fast imo. And all of these powerful things are done with a simple open terminal command.

3. Put the commands in a script

Now it’s okay to keep stringing these commands together, but after a while it gets hard to read even for developers. We can simply put them into a .sh script file like this

#!/bin/zsh

echo "Let's get started"
cd $HOME/your-project/backend
code .

cd $HOME/your-project/frontend
code .
... more commands ...

Then add this in the .rc file alias quick-open="path-to-file/quick-open.sh"

This is a lot easier to maintain and manage. You can keep adding commands to the script and not just simple commands like open but any CLI tools you can get your hands on. But that topic is for another day.

We barely scratch the surface by leveraging the terminal to improve your workflow. As demonstrated, you can get a lot done with very simple lines of codes. The key is to identify opportunities where you can save time and turn them into scripts and aliases to help getting in the flow faster and easier.

More articles

Benefits of Offshore Development Centers in Vietnam

Understand why Vietnam is the top destination in building Offshore Development Centers.

Read more

The Upside of Offshore Development Centers (ODCs)

Explore why offshore development centers are a popular choice for many tech companies to build up their competitive advantage in shipping fast and quality products.

Read more

Tell us about your project

Our offices

  • Bay Area
    333 W San Carlos St, Ste 600
    San Jose, CA 95110, USA
  • Vietnam
    224A Bach Dang, 2nd Floor
    Binh Thanh Dist.
    Ho Chi Minh City, Vietnam