Back to News

Posted 07.10.19

5 Tips & Tricks To Help You Navigate Terminal

So you’re here to find out 5 Tips & Tricks To Help You Navigate Terminal that little bit easier. Most users wont have ever needed to look at the Mac app Terminal and if they have they’ve quickly quit the app because it looks like, well ‘proper geeky computing’. The truth is that for most people they will never need to open up Terminal but if you manage and support Mac at all, its a useful tool to get familiar with.

Terminal is where you can get access to the macOS system without using clicking in windows and using menu. It means that you can quickly achieve things with a few words that might take 10’s of clicks in the GUI.

There will be times as a Mac support professional where you’ll only be able to achieve your goal by using the terminal counterpart of a Mac App. A good example is creating a bootable USB thumbstick containing macOS. This can only be done using terminal commands.

There’s no doubt however that its a scary place. There is no undo and you could easily delete all of your important work. We’ve all seen the extremely un-useful forum posts with “this command will fix all of your problems  sudo rm -rf /“ It deletes everything on your Mac by the way!

Not only do you need to remember the syntax of the command but navigating will quickly become a chore when you’ve misspelt things or need to type things over and over again.

Option Click to Move the Cursor

When you are 100 characters into a command and you suddenly find that the 3rd or 4th word has a typo or you missed something out completely. The first thing that you want to do it use the arrows to move all the way back. Instead press the Option key (your keyboard might just have alt) and then with the mouse click where you want to put the cursor! There are also a number of keyboards combos to skip back and forth a word at a time or to the start or end of a line.

Access Your Last Commands Using the Up Arrow

Often when you are in Terminal you will use the same command over and over as you make changes or troubleshoot. When the command is at least a line long you’ll lose a lot of time and there’s move chance for typos. Instead use the up arrow to list your previous command and just hit enter (or edit) the one that you need.

Bang Bang To Repeat

!! – often known as a bang bang is really useful when you forget you need to use sudo or you just want to use your last command again. Let say you typed in killall -HUP mDNSResponder to flush the cached DNS on your Mac. You’ll quickly realise that you need elevated permissions. You could write it all again with sudo in front. You could use the up arrow to find the command and then option click the start of the line. Instead type sudo !! – the !! Will add your last command after sudo so its like you’ve typed sudo killall -HUP mDNSResponder

Drop & Drag Files and Folders

Since the Terminal is command line based you have to navigate to files and folders like this /Users/Admin/Desktop/MyFile.txt. If the folder or file that you are working with is buried deep in the file system this can be hard work and is asking for typos. Instead save yourself the time and find the file or folder you want and simply drag it into the Terminal window. Terminal will fill out the correct file path for you

Control C

Sometimes you’ll type a command that just seems to hang, others it’ll be a command that never stops (like ping). It’s easy to panic at this point but instead just hit Control & C on the keyboard. This will stop the command.

This is just scratching the surface on navigating and using Terminal but are the things that I use day in and day out when supporting and managing Macs in Education and Business.

You’ve now read our 5 tips & tricks to help you navigate terminal, we hope you enjoy the new experience with your Mac.

Want to stay in Sync?

Sign up for all the latest news, events and updates from Sync.

  • This field is for validation purposes and should be left unchanged.