macOS 101: Intro to the terminal window

3 years ago 252

macOS includes a precise Linux-like terminal application. Jack Wallen takes you done your archetypal measurement with this almighty tool.

macosterminal-hero.jpg

Image: B&H Photo

You mightiness not cognize this, but macOS and Linux person a batch successful common. Sounds crazy, I know, but it's true. 

It each starts astatine the terminal window. The macOS and Linux terminals stock rather a bit. And though macOS defaults to the zsh shell, you tin adjacent power it to usage the tried-and-true, Linux favorite, bash shell. But let's not get up of ourselves. 

SEE: The champion programming languages to learn--and the worst (TechRepublic Premium)

First, you mightiness privation to cognize wherefore you'd privation to usage this and however to instrumentality your archetypal steps with the macOS terminal. Before doing that, recognize that the terminal model is wherever you tally commands, truthful the lone GUI progressive is the model that allows you to tally those commands. 

Why would you privation to usage the terminal window? Because it's a precise accelerated mode to instrumentality attraction of definite things. The terminal besides gives you overmuch much powerfulness for definite tasks (such arsenic record and directory permissions). 

With that said, let's get to work. 

To unfastened the terminal window, click connected the Launchpad, benignant terminal, and deed Enter connected your keyboard. When the terminal model opens, you're acceptable to tally your archetypal command. 

Let's find retired which directory we're in. To bash that, benignant pwd and deed Enter connected your keyboard. What you should past spot is the existent moving directory, which volition astir apt beryllium /Users/USERNAME (where USERNAME is your macOS username). 

SEE: Apple's October 18 event: What to expect and however to watch (TechRepublic) 

But what's to beryllium recovered successful that directory? Type ls and deed Enter connected your keyboard and you'll spot a listing of each of the files and sub-directories. 

Let's accidental you privation to alteration into the Documents directory. For that, benignant cd Documents and deed Enter connected your keyboard. Now benignant pwd and deed Enter connected your keyboard, and you should spot that you're present successful the Documents directory. If you look intimately astatine the terminal prompt, you'll spot that it lists the existent directory aft USERNAME@HOSTNAME (Where USERNAME is your macOS username and HOSTNAME is the sanction of your computer). 

Finally, let's make a file, named TechRepublic.txt, successful the Documents directory. This is done with the bid touch TechRepublic.txt

And determination you go, you've taken your archetypal steps with the macOS terminal. We'll revisit this taxable soon, truthful you tin support learning however to get the astir retired of this almighty tool.

Subscribe to TechRepublic's How To Make Tech Work connected YouTube for each the latest tech proposal for concern pros from Jack Wallen.

Apple Weekly Newsletter

Whether you privation iPhone and Mac tips oregon the latest enterprise-specific Apple news, we've got you covered. Delivered Tuesdays

Sign up today

Also see

Read Entire Article