📌 How to Install Applications in Ubuntu Using Commands
Ubuntu provides multiple ways to install applications using the terminal. In this blog, we will cover two efficient methods:
- Using Snap Package Manager (Recommended for most users)
- Using AppImage with WLGI (For portable applications)
🚀 1. Installing Applications via Snap Package Manager
✅ What is Snap?
Snap is a universal package manager developed by Canonical that allows you to install software across different Linux distributions. It ensures applications are always updated and sandboxed for security.
🔹 Installing Snap (If Not Installed)
Ubuntu comes with Snap pre-installed. If not, install it using:
sudo apt update
sudo apt install snapd -y
🔹 Enable Snap Service
After installation, enable the Snap daemon:
sudo systemctl enable --now snapd.socket
🔹 Install an Application Using Snap
To install an app, use:
sudo snap install
For example, to install VS Code:
sudo snap install code --classic
🔹 Launching the Installed Application
Once installed, open the application by running:
For example:
code
🔹 Creating a Desktop Shortcut for Snap Apps
Snap applications automatically create shortcuts, but if missing:
- Open terminal and create a
.desktop
file:
nano ~/.local/share/applications/code.desktop
- Add the following content:
[Desktop Entry]
Name=Visual Studio Code
Exec=/snap/bin/code
Icon=/snap/code/current/meta/gui/code.png
Terminal=false
Type=Application
Categories=Development;
- Save and close (
CTRL + X
,Y
,ENTER
). - Make it executable:
chmod +x ~/.local/share/applications/code.desktop
- Find the app in your application menu! 🎉
🔥 2. Installing Applications Using AppImage with WLGI
✅ What is AppImage?
AppImage is a portable package format that allows running applications without installation. To integrate them with the desktop environment, we use WLGI (AppImage Launcher).
🔹 Downloading an AppImage
You can download AppImage files from the official website of the application.
For example, to download Cursor (AI-Powered Code Editor):
wget -O ~/Downloads/cursor.AppImage "https://download.cursor.sh/latest-linux"
🔹 Making the AppImage Executable
Navigate to the directory where the AppImage is downloaded and run:
chmod +x ~/Downloads/cursor.AppImage
🔹 Running the AppImage
Execute the application by running:
~/Downloads/cursor.AppImage
🔹 Setting Up a Desktop Shortcut for AppImage (Using WLGI)
To make AppImages feel like installed applications, install WLGI (AppImage Launcher):
sudo add-apt-repository ppa:appimagelauncher-team/stable -y
sudo apt update
sudo apt install appimagelauncher -y
Once installed, follow these steps:
- Move the AppImage to Applications Folder
mv ~/Downloads/cursor.AppImage ~/Applications/
- Launch it via AppImage Launcher (This integrates it with your system.)
appimagelauncher integrate ~/Applications/cursor.AppImage
- Now, Cursor Editor will appear in the application menu!
🔹 Manually Creating a Desktop Shortcut for AppImage
If the app doesn’t show up in your menu, create a .desktop
file manually:
- Open terminal and create a shortcut file:
nano ~/.local/share/applications/cursor.desktop
- Add the following content:
[Desktop Entry]
Name=Cursor Editor
Exec=/home/$USER/Applications/cursor.AppImage
Icon=/home/$USER/Applications/cursor.png
Terminal=false
Type=Application
Categories=Development;
- Save and exit (
CTRL + X
,Y
,ENTER
). - Make it executable:
chmod +x ~/.local/share/applications/cursor.desktop
- You should now see Cursor Editor in the application menu. 🎉
Enjoy your Ubuntu experience with easy app installations! 🚀