Daftar Lengkap Perintah Terminal macOS

🍏 Daftar Lengkap Perintah Terminal macOS​


Terminal macOS berbasis Unix seperti Linux, jadi banyak perintahnya identik. Namun, beberapa fitur khas macOS dan integrasi GUI dibahas juga.


macos.png





📁 1. Manajemen File & Folder​


TujuanPerintah
Lihat isi folderls
Buat foldermkdir NamaFolder
Hapus filerm file.txt
Hapus folderrm -r Folder
Pindah filemv file.txt /path/tujuan/
Salin filecp file.txt file_copy.txt
Ganti direktoricd /path/folder/
Lokasi saat inipwd
Tampilkan file tersembunyils -a
Ubah nama file/foldermv namaLama namaBaru




📝 2. Membuat & Mengedit File​


TujuanPerintah
Buat file kosongtouch file.txt
Tambah teks ke fileecho "halo" > file.txt
Tambah baris ke fileecho "baris tambahan" >> file.txt
Lihat isi filecat file.txt
Edit file (CLI)nano file.txt
Edit file (GUI)open -a TextEdit file.txt




🧠 3. Informasi Sistem​


TujuanPerintah
Info sistem lengkapsystem_profiler
Info hardwaresystem_profiler SPHardwareDataType
Info memorivm_stat
Info OS & versisw_vers
Info diskdf -h
Info CPUsysctl -n machdep.cpu.brand_string
Uptimeuptime




📡 4. Jaringan​


TujuanPerintah
Cek IPipconfig getifaddr en0 (Wi-Fi)
Pingping google.com
DNS lookupnslookup google.com
Traceroutetraceroute google.com
Info WiFisystem_profiler SPAirPortDataType
IP publikcurl ifconfig.me




🔒 5. User & Permission​


TujuanPerintah
Lihat user aktifwhoami
Tambah user (GUI)via System Settings (CLI sulit di macOS)
Ganti passwordpasswd
Cek grup usergroups
Jalankan sebagai rootsudo perintah




🔁 6. Shutdown & Restart​


TujuanPerintah
Shutdownsudo shutdown -h now
Restartsudo shutdown -r now
Sleeppmset sleepnow
Logoutosascript -e 'tell application "System Events" to log out'




⚙️ 7. Process & Services​


TujuanPerintah
Lihat prosestop atau ps aux
Hentikan proseskill PID
Paksa stop aplikasi GUIkillall NamaApp
Jalankan aplikasi GUIopen -a "AppName"
Lihat service launchdlaunchctl list




🧰 8. Disk & System Tools​


TujuanPerintah
Cek penggunaan diskdf -h
Cek permission filels -l
Repair permission (lama, Catalina ke bawah)diskutil repairPermissions /
Mount/Unmount diskdiskutil mount / unmount
List semua diskdiskutil list




📜 9. Skrip & Otomatisasi​


TujuanPerintah
Jalankan skrip Bashbash script.sh
Jalankan skrip Zsh (default macOS)zsh script.zsh
Buat skrip barunano script.sh lalu isi:


Bash:
#!/bin/bash
echo "Halo dunia!"




| Buat skrip Automator (GUI) | Gunakan app "Automator" |
| Cron job (penjadwalan) | crontab -e |
| Alternatif modern | launchctl atau launchd |




🔍 10. Pencarian​


TujuanPerintah
Cari filefind . -name "file.txt"
Cari dalam isi filegrep "kata" file.txt
Spotlight search (GUI)mdfind "keyword"
Index ulang Spotlightsudo mdutil -E /




🛠️ 11. Miscellaneous​


TujuanPerintah
Bersihkan terminalclear
Cek waktudate
Buka folder di Finderopen .
Buka file dengan app defaultopen file.pdf
Screenshot via terminalscreencapture ~/Desktop/screen.jpg
Cek log sistemlog show




⚡ Shortcut Keyboard macOS Terminal​


TujuanShortcut
Clear terminalCmd + K
Break prosesControl + C
Auto-completeTab
Buka tab baruCmd + T
Tutup tabCmd + W
Navigasi antar tabCmd + Shift + [ dan ]




🧯 Troubleshooting Umum macOS via Terminal​


MasalahSolusi
Tidak bisa instal brew/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Tidak ada command ifconfigGunakan networksetup atau ipconfig getifaddr en0
File permission errorsudo chmod 755 file dan sudo chown $USER file
Aplikasi tidak bisa dibukaxattr -d com.apple.quarantine Aplikasi.app




💡 Tips Tambahan​


  • Terminal macOS berbasis Zsh (sejak macOS Catalina). Bash masih bisa digunakan: chsh -s /bin/bash.
  • Instalasi tools tambahan via Homebrew:
    brew install nama_package
  • GUI + CLI bisa dikombinasikan (misal open -a "Safari").
About author
Administrator
ISE
ISE

Facebook Comment

Comments

There are no comments to display.

macOS information

Author
ISE
Article read time
3 min read
Views
110
Last update

More in macOS

More from ISE

Search Google Web Search Google Images Search Google Voice Search Google Videos Search Maps Translate Word
🔍
GE
Google Experiment
Visit Google Experiment
⋮
CS
Code Saya
Visit Code Saya
⋮
SK
Sekolah Koding
Visit Sekolah Koding
⋮
HF
Huggingface
Visit Huggingface
⋮
SL
Sololearn
Visit Sololearn
⋮
LM
Learnx
Visit Learnxinmyminutes
⋮
w3s
W3schools
Visit w3schools
⋮
CW
Codewars
Visit Codewars
⋮
GG
Geeksforgeeks
Visit Geeksforgeeks
⋮
EXC
Exercism
Visit Exercism
⋮
EDX
EDX
Visit EDX
⋮
Add Shortcut
WhatsApp

Customer Service

CS 1

Mr.Ibnu

Loading jadwal...

Hubungi via WhatsApp
CS 2

Mr.Husein

Loading jadwal...

Hubungi via WhatsApp
CS 3

Mr.Hasan

Loading jadwal...

Hubungi via WhatsApp
Top Bottom

Translate Website

Upload Custom Icon

coding Coding
programmer Programmer
webmaster Webmaster
banners.png Banners
Home
What's New Resources Media Gallery
Record your forum activity and save it as MP4
> INITIALIZING ISE CONNECTION...
> BYPASSING SECURITY PROTOCOLS...
> ESTABLISHING WORMHOLE LINK...
> Starting XenForo engine... [DONE]
> Calibrating singularity Hosting parameters... [DONE]
> Establishing Forum Style... [DONE]
> The Programmer Community ready in 3... 2... 1.