069 - Working The Command Line
14 May, 2018
The command line is a basic necessity for any developer and I’ve gotten fairly comfortable with it since I started learning how to code. Not sure what I’m talking about? Think back to any movie/tv show with a hacker hacking away into that black computer screen, typing green text. They are most likely using the command line (for good or evil, depending on the context!).
But more to the point, the command line is how you can have direct access to your machine to carry out any system-level actions, from moving files around to executing programs, to communicating with other computers over a network. As a developer there are many use cases for working in the command line:
- Accessing servers (remote or local) and their logs
- Managing versions of code, like using git
- Tracing errors, crashes
- You can even write code in the command line
- …and the list goes on from there!
Here are some of my favorite tips about getting comfortable working in the command line:
- Learn each aspect as it’s needed. Start with the basics, then learn more commands depending on the work that needs to get done.
- Once there’s a basic comfort level, skim the documentation for whatever command line interface (CLI) you’re using. Maybe you’ll find some good options to use in the future to improve your workflow!
- For commands that get repeated a lot, create aliases by editing the
.bash_profilefiles on my computer (see article). This is especially helpful for chained events and for accessing deeply-nested folders that you use a lot.
- Take notes or bookmark sites where you learn how to use the commands that aren’t used as often. Maybe they don’t warrant a shortcut, but at least you won’t have to start from scratch if you need to look up that command again in the future.
- Lifehacker - Become a Command Line Ninja With These Time-Saving Shortcuts
- Lifehacker - A Command Line Primer for Beginners