0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

🍎 macOSコマンド早見表(設定ツール&管理者向け)

Posted at

(๑•̀ㅂ•́)و✧ Spotlight検索(⌘+Space)や
ターミナルから直接起動できる 便利コマンド&システムユーティリティ をまとめました!


👤 ユーザー・アカウント関連

コマンド 説明
System Settings macOS Ventura以降の「設定」アプリ(旧:システム環境設定)
Users & Groups ユーザーとグループ設定画面を開く
loginwindow ログインオプション(自動ログインやログイン項目)を開く
sudo dscl . -list /Users 登録されているユーザー一覧を表示
whoami 現在ログインしているユーザー名を表示

💻 システム情報・バージョン確認

コマンド 説明
sw_vers macOSバージョンを表示
system_profiler SPHardwareDataType ハードウェア情報(CPU・メモリなど)
system_profiler SPSoftwareDataType OS情報
about This Mac 「このMacについて」ウィンドウを開く(Spotlightで検索)
uname -a カーネル・ビルド情報を表示

⚙️ ハードウェア・デバイス管理

コマンド 説明
diskutil list ディスクとボリューム一覧
diskutil info / システムディスク情報
diskutil verifyDisk /dev/disk0 ディスク検証
diskutil repairDisk /dev/disk0 ディスク修復
ioreg -l デバイスツリー情報
sudo spindump パフォーマンスダンプ生成

🌐 ネットワーク関連

コマンド 説明
ifconfig ネットワークインターフェース情報
networksetup -listallhardwareports ネットワークデバイス一覧
ping 8.8.8.8 通信確認
netstat -an 接続ポートと状態一覧
lsof -i 使用中のポート確認
sudo killall -HUP mDNSResponder DNSキャッシュクリア(macOS共通)
open /System/Library/PreferencePanes/Network.prefPane ネットワーク設定を直接開く

🧱 ディスク・ストレージ関連

コマンド 説明
diskutil list ディスク一覧
df -h ストレージ使用量確認
du -sh ~/Downloads フォルダ容量確認
open /System/Library/CoreServices/DiskUtility.app ディスクユーティリティ起動
tmutil listbackups Time Machineバックアップ確認

🧩 アプリ・プロセス管理

コマンド 説明
Activity Monitor アクティビティモニタを開く(Spotlightから)
top CPU・メモリ使用状況を表示
ps aux 実行中プロセス一覧
kill PID プロセス強制終了
open -a "App Name" 任意のアプリを起動(例:open -a Safari

🧭 システム設定パネル(旧macOS向け)

機能 コマンド
一般設定 open /System/Library/PreferencePanes/General.prefPane
ディスプレイ open /System/Library/PreferencePanes/Displays.prefPane
サウンド open /System/Library/PreferencePanes/Sound.prefPane
Bluetooth open /System/Library/PreferencePanes/Bluetooth.prefPane
ネットワーク open /System/Library/PreferencePanes/Network.prefPane
セキュリティ open /System/Library/PreferencePanes/Security.prefPane
共有 open /System/Library/PreferencePanes/Sharing.prefPane
ユーザーとグループ open /System/Library/PreferencePanes/Accounts.prefPane
日付と時刻 open /System/Library/PreferencePanes/DateAndTime.prefPane

🔐 セキュリティ・管理者向け

コマンド 説明
sudo passwd 管理者パスワード変更
sudo shutdown -r now 即時再起動
sudo shutdown -h now 即時シャットダウン
csrutil status SIP(System Integrity Protection)の状態確認(リカバリーモード限定)
sudo fdesetup status FileVault暗号化の状態確認
sudo fdesetup enable FileVault有効化
sudo scutil --set ComputerName "MyMac" コンピュータ名変更

📊 ログ・モニタリング

コマンド 説明
log show --predicate 'eventMessage contains "error"' --last 1d 過去1日のエラーログ
tail -f /var/log/system.log リアルタイムでシステムログ確認
pmset -g log スリープ・電源関連ログ
sudo fs_usage ファイルアクセス監視

🎨 ディスプレイ・表示関連

コマンド 説明
open -a "System Settings" --args Displays ディスプレイ設定を開く
defaults write -g ApplePressAndHoldEnabled -bool false キー長押しで連打入力に変更
open /System/Library/CoreServices/ScreenSaverEngine.app スクリーンセーバーを即実行

🧰 開発者・管理者向け(上級)

コマンド 説明
xcode-select --install Xcodeコマンドラインツールをインストール
sudo spctl --status Gatekeeper状態確認
sudo spctl --master-disable Gatekeeper無効化(※慎重に)
sudo softwareupdate -l 利用可能なアップデート一覧
sudo softwareupdate -ia すべてのアップデートを自動適用

🔎 Spotlight/Finder関連

コマンド 説明
mdfind Spotlight検索をコマンドラインから実行
mdutil -E / Spotlightインデックス再構築
open . カレントフォルダをFinderで開く
open ~/Library ライブラリフォルダを開く
defaults write com.apple.finder AppleShowAllFiles YES 隠しファイルを表示
killall Finder Finder再起動(設定反映)

🆕 macOS便利ショートカット(GUI向け)

操作 ショートカット
Spotlight検索 ⌘ + Space
Finderで新しいウィンドウ ⌘ + N
スクリーンショット全画面 ⇧ + ⌘ + 3
スクリーンショット範囲指定 ⇧ + ⌘ + 4
Dockを隠す/表示 ⌘ + ⌥ + D
フォース終了ウィンドウ ⌘ + ⌥ + Esc

💡まとめ

🍏 覚えておくと便利な定番3つ!

  • sw_vers … macOSバージョン確認
  • diskutil list … ディスク一覧
  • sudo killall -HUP mDNSResponder … DNSキャッシュクリア

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?