Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save wayum999/3c142d6f3f5ad25efcf4cb835a8e85a6 to your computer and use it in GitHub Desktop.
Save wayum999/3c142d6f3f5ad25efcf4cb835a8e85a6 to your computer and use it in GitHub Desktop.
Linux System Service for Cursor AI

System Service to Update Cursor AI IDE

To enable Cursor AI to update automatically in Linux, you can create a system service.

1. Use this script to install Cursor (much appreciated)

https://gist.github.com/Kinyugo/9845e18998744ff54b8f0cde3bb37182

Remember where you put the file that script downloads and runs.

2. Create a System Service

sudo nano /etc/systemd/system/cursor-update.service

Then copy and paste the cursor-update.service text and save changes.

Finally, enable and start the service:

sudo systemctl enable cursor-update
sudo systemctl start cursor-update

Cursor will now update on every boot.

3. (Optional) Set a time for Cursor to update.

nano ~/.config/systemd/user/cursor-update.timer

Copy and paste the text from cursor-update.timer, modifying the time as desired.

Enable and start the timer:

systemctl --user enable cursor-update.timer
systemctl --user start cursor-update.timer
[Unit]
Description=Update Cursor AI on Startup
After=network.target
[Service]
Type=oneshot
ExecStart=/bin/bash <---CHANGE THIS TO ABSOLUTE PATH TO THE SCRIPT FROM STEP 1--->
RemainAfterExit=yes
[Install]
WantedBy=default.target
[Unit]
Description=Run update_cursor.sh periodically
[Timer]
OnBootSec=5min
OnUnitActiveSec=6h
Unit=cursor-update.service
[Install]
WantedBy=timers.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment