A black screen. A blinking cursor. Words separated by
/. The command line can be an intimidating place for new developers. It feels like staring into a black hole. You can feel it taunting you, as if to say “You’re in way over your head; you have no idea where to start.” The command line is a place where we can type in commands and have the computer run those commands. When you see another developer is using it, they look like some kind of computer wizard or someone hacking into The Matrix.
I remember my first introduction to the command line during my freshman year of college. I was an engineering major at the time, and taking “Introduction to Engineering Analysis” (I think that was what it was called...). I remember having a homework assignment of writing down the correct commands for things like navigating between directories, listing their contents, etc. It just did not make sense to me. Fast forward 8 years later when I enrolled in Thinkful, an online coding bootcamp, because I had made the decision to completely change career paths.
One of the first things I had to learn was becoming comfortable in the command line. I remember sitting in a Starbucks at a Barnes and Noble and spending hours trying to wrap my head around all these different commands, what they did, etc. grep? cat?? What??? The command line is a harsh place at first, and at one time or another you will have the same rite of passage every developer has gone through; getting stuck in vim. Eventually, I had practiced enough using the command line to do the bare minimum with it: cd into my project directory, install packages, run scripts, and most importantly, for source control using git.
”A shell is your session and session environment...“ - MDN Command line crash course.
Another strange term that you will hear when developers are talking about the command line is “shell”. Bash is the most common shell used in Linux operating systems. Other commonly used shells are Zsh and Fish, which offer more customizable options. There is no “right” shell; many developers have their own opinions on which is best, but I found that trying them all out gave me an idea of what features I wanted in my environment.
Aliases. I love aliases. I remember when I first discovered aliases. Aliases are a magical way to create simple shortcuts for otherwise mind-numbingly long/complex commands. Have a workflow that you do everytime you turn on your computer (i.e. open iTerm, cd to the project directory, open your code editor, and run the app)?. Save some time and just create an alias. Enjoy those precious few seconds you save by having the computer do everything for you! Marvel at your genius as applications and terminals open at your single command!
Early on, I tried different git GUIs (Sourcetree, GitKraken, etc), but found them to be too noisy and have too many options. As my experience grew, I found myself becoming more and more comfortable in the command line. I fumbled quite often, and would have different “cheatsheets” up in case I could not remember the command for myself. After using these commands daily and watching others use them, I eventually found my fingers instantly typing the correct commands when I knew the action I wanted to take. I found what had initially scared me about the command line was now comforting. A black screen. A blinking cursor. Words separated by