This is a guideline and script for installing or updating Cursor on Ubuntu 22.04.
Note: For Ubuntu 24.04 installation, please switch to the
Cursor-ubuntu24.04branch or visit: Link
Add figlet Library for User-Friendly Terminal Display:
To enhance the user experience, the script now uses the figlet library to display banners and ASCII art in the terminal. This makes the installation and update process more visually friendly and engaging.
- The script will automatically check and install
figletif it is not already present on your system. - Banners such as "Cursor AI IDE" and a cat ASCII art will be shown at the start of the script for a more welcoming interface.
Example output:
______ ____ ____ ________ ______
/ ____/_ ________________ _____ / | / _/ / _/ __ \/ ____/
/ / / / / / ___/ ___/ __ \/ ___/ / /| | / / / // / / / __/
/ /___/ /_/ / / (__ ) /_/ / / / ___ |_/ / _/ // /_/ / /___
\____/\__,_/_/ /____/\____/_/ /_/ |_/___/ /___/_____/_____/
For Ubuntu 22.04
-------------------------------------------------
/\_/\
( o.o )
> ^ <
------------------------
1. Install Cursor
2. Update Cursor
Note: If the menu reappears after choosing 1 or 2, please check the notification above for any issues.
------------------------
This helps users quickly recognize the script's purpose and provides a more pleasant terminal experience.
- Ubuntu Version Check: The script now checks if your system is running Ubuntu 22.04. If not, it will prompt you to use the appropriate installer for your Ubuntu version (e.g., Ubuntu 24.04).
- Automatic libfuse2 Installation: The script will automatically check for and install
libfuse2if it is missing, ensuring AppImage compatibility on Ubuntu 22.04. Since the Ubuntu Version Check is already implemented above, this automatic installation is safe and will not cause issues on other Ubuntu versions.
- Automatic Download: Script can auto-fetch and download the latest Cursor AppImage from the official website.
- Manual Path Option: Option to specify a local AppImage file path if preferred or if auto-download fails.
- Icon Selection: User can choose the application icon during setup.
- Easy Update: The same options are available for updating Cursor to the latest version.
- Improved User Prompts: Clear error messages and fallback options for a smoother experience.
- Basic installation and update of Cursor AppImage via manual file path only.
- Icon selection during installation.
- Creation of desktop entry for easy launching.
- 🐧 Ubuntu 22.04 or a compatible Linux distribution
- 🌐 Internet connection
- 🔑
sudoprivileges - 📦
curl(the script will attempt to install it if missing) - 📦
libfuse2(the script will attempt to install it automatically if missing)
- 🚀 Automatic Download: The script can automatically fetch and download the latest Cursor AppImage from the official website with a single selection.
- 📁 Manual Path Option: If you prefer, or if auto-download fails, you can specify the path to a Cursor AppImage file you have already downloaded.
- 🎨 Icon Selection: Choose your preferred icon for the application during setup.
- 🔄 Easy Update: The same options are available for updating Cursor to the latest version.
This repository includes two icon options for Cursor:
cursor-icon.png– Standard Cursor logo with blue background
cursor-black-icon.png– Cursor logo with dark/black background
You will be prompted to choose one of these icons during installation.
- If you are using Ubuntu 22.04, the script will check for and install
libfuse2automatically if needed to run AppImage files. - Do NOT install
libfuse2on Ubuntu 24.04 or newer! Installing this package on Ubuntu 24.04 can cause system graphical issues and is not supported. AppImage support on Ubuntu 24.04 may require different steps. - Make sure to download the Cursor AppImage file before running the script.
- For the best experience, restart your computer after installation.
- The script requires sudo privileges to create files in system directories.
- If you encounter any issues, see the Troubleshooting section below.
-
Download the Management Script
- Clone this repository or download the
manage_cursor.shfile from thescriptsdirectory. - Make the script executable:
chmod +x scripts/manage_cursor.sh
- Clone this repository or download the
-
Follow Prompts:
- For Installation/Update:
- You will be asked how to provide the Cursor AppImage:
- Option 1 (Recommended): Auto-download the latest Cursor AppImage from the official website. The script will attempt to fetch and download the newest version automatically.
- If auto-download fails, you will see a clear error message and be prompted to enter the local file path manually.
- Option 2: Specify the local file path to a previously downloaded Cursor AppImage on your computer.
- Option 1 (Recommended): Auto-download the latest Cursor AppImage from the official website. The script will attempt to fetch and download the newest version automatically.
- You will also be prompted to enter the icon filename (e.g.,
cursor-icon.pngorcursor-black-icon.png).
- You will be asked how to provide the Cursor AppImage:
- For Installation/Update:
-
Run the Script
- Run the script:
./scripts/manage_cursor.sh
- The script will present a menu:
- Choose '1' to Install Cursor.
- Choose '2' to Update Cursor.
- Run the script:
-
Launch Cursor
- After restarting, you should find "Cursor AI IDE" in your application menu.
- Alternatively, you can launch it from the terminal:
/opt/Cursor/cursor.AppImage --no-sandbox
⚠️ It's recommended to restart your computer after installation for the best experience.
The script will:
- Offer to install or update Cursor.
- During Installation:
- Check for and install
curlif missing. - Check for and install
libfuse2if missing (important for running AppImages). - Move the specified Cursor AppImage to
/opt/Cursor/cursor.AppImage. - Make the AppImage executable.
- Download a chosen icon to
/opt/Cursor/cursor-icon.png. - Create a desktop entry (
/usr/share/applications/cursor.desktop) for easy access.
- Check for and install
- During Update:
- Download the new Cursor AppImage, replacing the old one in
/opt/Cursor/. - Ensure the new AppImage is executable.
- Download the new Cursor AppImage, replacing the old one in
If you encounter any issues:
- Ensure you have
sudoprivileges and an active internet connection. - Verify that the AppImage download path you provided is correct and accessible.
- Confirm the icon filename exists in the
imagesdirectory of thehieutt192/Cursor-ubuntuGitHub repository. - If Cursor fails to start after installation, ensure
libfuse2was installed correctly. The script attempts this, but you can manually check/install withsudo apt update && sudo apt install libfuse2. - Check script permissions (
chmod +x your_script_name.sh).
To uninstall Cursor:
- Remove the application files:
sudo rm -rf /opt/Cursor
- Remove the desktop entry:
sudo rm -f /usr/share/applications/cursor.desktop