上次登录情况:last login
wtmp begins Thu Jun 18 11:34
过去登录情况:last
示例:略
查看cup情况:system_profiler | grep Processor
Apple: AUDynamicsProcessor:
Apple: AUVoiceProcessor:
Processor Name: Intel Core i5
Processor Speed: 2.7 GHz
Number of Processors: 1
查看机器连续运行时间:uptime
14:08 up 5:48, 2 users, load averages: 1.39 1.35 1.34
清空屏幕: clear 或者
cammand+k
示例:略
查看网络地址和参数:ifconfig
示例:略
显示系统隐藏文件:
defaults write com.apple.finder AppleShowAllFiles -bool true
或者
defaults write com.apple.finder AppleShowAllFiles YES
隐藏系统隐藏文件:
defaults write com.apple.finder AppleShowAllFiles -bool false或者
defaults write com.apple.finder AppleShowAllFiles NO
上面的两种命令都需要退出终端,再重启Finder才可以的。
修改host:sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/hosts