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

下次开机这个服务应该就不再随机启动啦

发布了13 篇原创文章 · 获赞 6 · 访问量 735

猜你喜欢

转载自blog.csdn.net/jiakai82/article/details/103407293
今日推荐