Not sure how to get started with the Terminal? In this Lightning Bits episode, William and Sebastian show you how to use it on a Mac and share 8 key Terminal commands that will make working on your Mac easier. Watch the video, or continue reading below.
The Terminal
The Terminal is a command line interface (CLI) for your computer’s operating system (OS). Although you can access the Terminal through an application, it’s mostly used only by network administrators and technical users who want to minimize the impact on their computer’s resources, or who want to initiate an action that is not generally supported by the graphical user interface (GUI).
Opening the Terminal App
If you are on a Mac, you can find the Terminal in the Applications/Utilities folder:
On a Mac you can also open the App using Spotlight search. Our favorite shortcut to open the Terminal.app is to press Command+Space and type terminal into Spotlight:
8 Key Commands
Here is a summary of the Terminal commands we cover in this episode:
ls
: shows the contents of the current directorymkdir NewDirectory
: creates a new directory calledNewDirectory
cd NewDirectory
: navigates into a directory calledNewDirectory
open .
: opens the current directory in the macOS Finder appclear
: clears the terminaltouch some_file.py
: creates a new, empty file calledsome_file.py
mv some_file.py main.py
: renames thesome_file.py
file tomain.py
rm main.py
: removes (deletes) the filemain.py
rm -r SomeDirectory
: removes a folder calledSomeDirectory
Watch the video for more details on each command!
Useful Links
- iTerm2: https://iterm2.com
- Wiliam’s open source work: https://github.com/williamFalcon
- Sebastian’s open source work: https://github.com/rasbt
Stay tuned for future episodes of Lightning Bits! Also, if you have any questions, please don’t hesitate to reach out on Slack!