Mac Ventura 13 is set to start executing a Shell script at boot

1. Write a Shell startup script

1. Open Mac Focus Search, search for "automatic actions" and open

2. Create a new “Application”

3. Run the Shell script and drag it to the right

 4. After changing the Shell type to /bin/sh, enter the script below and click on the upper right corner to run the test.

        If the command requires password input, you can use the following command:

        echo "password" | sudo or any command that requires a password

2. Set startup items

1. Open "System Settings" - "General" - "Login Items" and select the entered script to add login items.

 

 

 

Guess you like

Origin blog.csdn.net/sunnyfirefox/article/details/131257061