Updated News Around the World

macOS 101: Intro to the terminal window

macOS includes a very Linux-like terminal application. Jack Wallen takes you through your first step with this powerful tool.

macosterminal-hero.jpg

Image: B&H Photo

You might not know this, but macOS and Linux have a lot in common. Sounds crazy, I know, but it’s true. 

It all starts at the terminal window. The macOS and Linux terminals share quite a bit. And although macOS defaults to the zsh shell, you can even switch it to use the tried-and-true, Linux favorite, bash shell. But let’s not get ahead of ourselves. 

SEE: The best programming languages to learn–and the worst (TechRepublic Premium)

First, you might want to know why you’d want to use this and how to take your first steps with the macOS terminal. Before doing that, understand that the terminal window is where you run commands, so the only GUI involved is the window that allows you to run those commands. 

Why would you want to use the terminal window? Because it’s a very fast way to take care of certain things. The terminal also gives you much more power for certain tasks (such as file and directory permissions). 

With that said, let’s get to work. 

To open the terminal window, click on the Launchpad, type terminal, and hit Enter on your keyboard. When the terminal window opens, you’re ready to run your first command. 

Let’s find out which directory we’re in. To do that, type pwd and hit Enter on your keyboard. What you should then see is the current working directory, which will probably be /Users/USERNAME (where USERNAME is your macOS username). 

SEE: Apple’s October 18 event: What to expect and how to watch (TechRepublic) 

But what’s to be found in that directory? Type ls and hit Enter on your keyboard and you’ll see a listing of all of the files and sub-directories. 

Let’s say you want to change into the Documents directory. For that, type cd Documents and hit Enter on your keyboard. Now type pwd and hit Enter on your keyboard, and you should see that you’re now in the Documents directory. If you look closely at the terminal prompt, you’ll see that it lists the current directory after USERNAME@HOSTNAME (Where USERNAME is your macOS username and HOSTNAME is the name of your computer). 

Finally, let’s create a file, named TechRepublic.txt, in the Documents directory. This is done with the command touch TechRepublic.txt

And there you go, you’ve taken your first steps with the macOS terminal. We’ll revisit this topic soon, so you can keep learning how to get the most out of this powerful tool.

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.

Also see

For all the latest Technology News Click Here 

 For the latest news and updates, follow us on Google News

Read original article here

Denial of responsibility! NewsUpdate is an automatic aggregator around the global media. All the content are available free on Internet. We have just arranged it in one platform for educational purpose only. In each content, the hyperlink to the primary source is specified. All trademarks belong to their rightful owners, all materials to their authors. If you are the owner of the content and do not want us to publish your materials on our website, please contact us by email – [email protected]. The content will be deleted within 24 hours.