Man and machine are two independent entities. When a man uses a machine, he must use some kind of interface to communicate with the machine. The interface of a desktop computer includes a monitor, keyboard, mouse, speaker, and microphone. Other hardware, such as cpus, memory, hard disks, CD/DVD-ROM drives, graphics cards, and network adapters, belong to hosts. Unix and Linux call this interface, through which humans and machines can interact, a terminal.

MacOS is a Unix-based operating system, much like Linux, but it’s not all command lines like Linux, and that’s because Apple built a gorgeous user interface on top of Unix, and when we use a MAC, In fact, it is still through the interface to interact with the underlying operating system.

Start the terminal

“Terminal”, you can click “Other” in the boot platform, find the terminal, click to start. You can also use focused search to quickly launch the terminal. Use the Comman+ space shortcut key to enter the terminal and press Enter.

Common Terminal Commands

1. Enter the CD directory

After the terminal is started, it is in the user directory by default. Run the CD command to enter the desired directory.

For example, enter CD ~/Desktop/ Enter to go to the Desktop directory.

The ~ symbol is a shortcut to the user directory. For example, if your user name is macos, the ~ symbol is /Users/macos.

If the directory is too deep, you can drag the directory or file directly to the terminal, the terminal will automatically help you *** the path.

Go to the upper directory CD.. /, of course you can enter.. /.. / Go to the upper directory

Enter the first letter of the folder and press Enter to automatically complete the directory name.

2. View the files in the current directory

Run the ls command to view files in the current directory

Ls-af can display all files, including hidden files and directories

Ls -l Displays information about files, such as permissions, file sizes, and working groups, except file names

Ls -r Displays the information in alphabetical order

Ls-t sort in chronological order

Three, quickly view the text file

You can run the cat command to quickly view the contents of a text file without opening it through an editor

Four, check network information

You can run the ifconfig command to view information about each network adapter on a MAC computer

Five, check the website network

You can run the ping command to check whether the website can be connected. For example, type ping mac.orsoon.com to check the connection between your computer and the web site. If the ping value is small, it indicates that the connection is good. If the ping value is large, it indicates that the delay is very high. If the ping value is lost, it indicates that packets are lost.

The above is about the “Mac most commonly used terminal command daquan” all content, I hope to help you! For more Mac related content, check out mac.orsoon.com!