How To: Get Computer Name Using the Terminal (MacOS)

Question

How do I get my computer name using the Terminal (MacOS)?

 

Answer

1. Open Spotlight Search by pressing Command + Space keys simultaneously.

Command plus Space keys.

 

 

2. In the search box, type in terminal.app

 

Spotlight with terminal.app typed

 

 

3. In Terminal window, type scutil --get ComputerName. Computer Name will be displayed.

 

Terminal window with scutil --get ComputerName

 

4. To copy Computer Name to Clipboardclick and drag mouse over Computer Name to highlight. 

Terminal window with computer name highlighted.

 

5. Copy highlighted Computer Name to Clipboard by pressing Command + C keys simultaneously.

Command plus C keys.

 

 

6. To close Terminal window, type exit.

 

Terminal window with computer name and exit.

 

Print Article

Related Articles (6)

Step-by-step process for accessing Software Center in Mac OS.
Step-by-step process for retrieving computer name from Software Center in Mac OS.
Step-by-step process for retrieving computer name from Software Center in Microsoft Windows.
Step-by-step process for retrieving computer name via Command Prompt in Microsoft Windows.
Step-by-step process to uninstall or remove self-service software from Software Center in Microsoft Windows.
Step-by-step self-service software installation using Software Center in Microsoft Windows.