Mac下禁用開機自啓軟件

有軟件的開機啓動項放在/Library/LaunchDaemons

ls /Library/LaunchDaemons

com.apple.installer.osmessagetracing.plist     com.microsoft.office.licensingV2.helper.plist
com.arraynetworks.vpnd.plist                   com.microsoft.teams.TeamsUpdaterDaemon.plist
com.bjango.istatmenus.daemon.plist             com.ruijie.sslvpnd.plist
com.bjango.istatmenus.fans.plist               com.sangfor.EasyMonitor.plist
com.bjango.istatmenus.installerhelper.plist    net.pulsesecure.AccessService.plist
com.feingeist.shimo.helper.plist               net.pulsesecure.UninstallPulse.plist
com.google.keystone.daemon.plist               org.macosforge.xquartz.privileged_startx.plist
com.microsoft.OneDriveUpdaterDaemon.plist      org.macports.rsyncd.plist
com.microsoft.autoupdate.helper.plist

系統中可能放plist的地方

~/Library/Preferences/ – (當前用戶設置的進程)
~/Library/LaunchAgents/ – (當前用戶的守護進程)
/Library/LaunchAgents/ – (管理員設置的用戶進程)
/Library/LaunchDaemons/ – (管理員提供的系統守護進程)
/System/Library/LaunchAgents/ – (Mac操作系統提供的用戶進程)
/System/Library/LaunchDaemons/ – (Mac操作系統提供的系統守護進程)

也可以這樣查找

#簡單粗暴的查找方法
sudo find / | grep plist | grep xxx

使用

# 查看服務名
#sudo launchctl list | grep xxx
# 停止服務
#sudo launchctl stop xxxx 
#移除服務
sudo launchctl unload /Library/LaunchDaemons/xxx.plist

可以去掉某個軟件的開機自啓

重新加入自啓動可以運行 

sudo launchctl load /Library/LaunchDaemons/xxx.plist

EasyMonitor服務存在內存泄漏很快佔用1G內存,運行

sudo launchctl unload /Library/LaunchDaemons/com.sangfor.EasyMonitor.plist

移除服務。

 

有些服務非常流氓頑固,存在多個地方

1、在用戶和羣組裏刪除

2、更改plist裏面的屬性信息

打開相應的plist文件,修改裏面兩個屬性的值

KeepAlive後面的屬性值改成false

RunAtLoad後面的屬性值改成false

3、命令行下移除服務

# 移除服務
sudo launchctl unload xxxx

下次開機這個服務應該就不再隨機啓動啦

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章