DEV Community

Mayank Tamrkar
Mayank Tamrkar

Posted on

How to download application in ubantu/linux using command line

πŸ“Œ 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:

  1. Using Snap Package Manager (Recommended for most users)
  2. 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
Enter fullscreen mode Exit fullscreen mode

πŸ”Ή Enable Snap Service

After installation, enable the Snap daemon:

sudo systemctl enable --now snapd.socket
Enter fullscreen mode Exit fullscreen mode

πŸ”Ή Install an Application Using Snap

To install an app, use:

sudo snap install <app-name>
Enter fullscreen mode Exit fullscreen mode

For example, to install VS Code:

sudo snap install code --classic
Enter fullscreen mode Exit fullscreen mode

πŸ”Ή Launching the Installed Application

Once installed, open the application by running:

<app-name>
Enter fullscreen mode Exit fullscreen mode

For example:

code
Enter fullscreen mode Exit fullscreen mode

πŸ”Ή Creating a Desktop Shortcut for Snap Apps

Snap applications automatically create shortcuts, but if missing:

  1. Open terminal and create a .desktop file:
   nano ~/.local/share/applications/code.desktop
Enter fullscreen mode Exit fullscreen mode
  1. 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;
Enter fullscreen mode Exit fullscreen mode
  1. Save and close (CTRL + X, Y, ENTER).
  2. Make it executable:
   chmod +x ~/.local/share/applications/code.desktop
Enter fullscreen mode Exit fullscreen mode
  1. 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"
Enter fullscreen mode Exit fullscreen mode

πŸ”Ή Making the AppImage Executable

Navigate to the directory where the AppImage is downloaded and run:

chmod +x ~/Downloads/cursor.AppImage
Enter fullscreen mode Exit fullscreen mode

πŸ”Ή Running the AppImage

Execute the application by running:

~/Downloads/cursor.AppImage
Enter fullscreen mode Exit fullscreen mode

πŸ”Ή 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
Enter fullscreen mode Exit fullscreen mode

Once installed, follow these steps:

  1. Move the AppImage to Applications Folder
   mv ~/Downloads/cursor.AppImage ~/Applications/
Enter fullscreen mode Exit fullscreen mode
  1. Launch it via AppImage Launcher (This integrates it with your system.)
   appimagelauncher integrate ~/Applications/cursor.AppImage
Enter fullscreen mode Exit fullscreen mode
  1. 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:

  1. Open terminal and create a shortcut file:
   nano ~/.local/share/applications/cursor.desktop
Enter fullscreen mode Exit fullscreen mode
  1. 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;
Enter fullscreen mode Exit fullscreen mode
  1. Save and exit (CTRL + X, Y, ENTER).
  2. Make it executable:
   chmod +x ~/.local/share/applications/cursor.desktop
Enter fullscreen mode Exit fullscreen mode
  1. You should now see Cursor Editor in the application menu. πŸŽ‰

Enjoy your Ubuntu experience with easy app installations! πŸš€

Playwright CLI Flags Tutorial

5 Playwright CLI Flags That Will Transform Your Testing Workflow

  • 0:56 --last-failed
  • 2:34 --only-changed
  • 4:27 --repeat-each
  • 5:15 --forbid-only
  • 5:51 --ui --headed --workers 1

Learn how these powerful command-line options can save you time, strengthen your test suite, and streamline your Playwright testing experience. Click on any timestamp above to jump directly to that section in the tutorial!

Watch Full Video πŸ“ΉοΈ

Top comments (0)

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

πŸ‘‹ Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay