Skip to content

Instantly share code, notes, and snippets.

@sanae10001
Created August 21, 2017 07:22
Show Gist options
  • Save sanae10001/8c95021fa1f985da7eca78789a822428 to your computer and use it in GitHub Desktop.
Save sanae10001/8c95021fa1f985da7eca78789a822428 to your computer and use it in GitHub Desktop.
Get computer name via command line
macos:
1. networksetup -getcomputername
2. scutil --get ComputerName
windows:
1. echo %ComputerName%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment