LoginSignup
1
2

More than 5 years have passed since last update.

system_profilerによるMacのシリアル番号取得

Posted at

OS XではMacのシリアル番号をコマンドラインから取得することもできます。

h12o@Exegesis:~$ system_profiler 2> /dev/null | grep 'Serial Number (system)'
      Serial Number (system): C02JXXXXXXXX
h12o@Exegesis:~$ system_profiler 2> /dev/null | grep 'Serial Number (system)' | awk -F ': ' '{print $2}'
C02JXXXXXXXX
h12o@Exegesis:~$ 

切り出し方はもっといい方法がありそうですが、ひとまずはこのような方法があると紹介しておきます。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2