Useful+Commands

Useful Terminal Commands
Current directory server being used – sudo lsof -l | grep ":ldap"

Current time server being used – systemsetup -getnetworktimeserver

Disable ARD reverse lookup – defaults write com.apple.RemoteDesktop DisableReverseIPLookup -bool yes

List all running processes – ps aux | less

List required Software Updates – softwareupdate -l

Force silent Software Update – sudo softwareupdate -i -a

List DNS cache – scutil --dns

Get hardware UUID – ioreg -rd1 -c IOPlatformExpertDevice | grep IOPlatformUUID

Refresh MCX – sudo mcxrefresh –n or sudo mcxrefresh –u

Restart ARD – sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent

Change local user password – sudo dscl. -passwd /Users/  

Open internet connections – lsof -i

Repair disk permissions on the main volume – diskutil repairPermissions /

List all network services – <span style="font-family: 'Courier New',Courier,monospace;">sudo networksetup -listallnetworkservices