The catchphrase that Atom calls itself is the “hackable text editor for the 21st century”. Atom, compared to competitors, is more user-friendly, with plenty of options for extensions to add syntax highlighting for languages and formats, add dynamic linting, and integrate debuggers, runtime environments, and video and music player controls, and much more.
In the following tutorial, you will learn how to install the latest version of Atom Text Editor on your Ubuntu 20.04 operating system.
Table of Contents
- Recommended OS: Ubuntu 20.04 – optional (Ubuntu 21.04)
- User account: A user account with sudo or root access.
Updating Operating System
Update your Ubuntu 20.04 operating system to make sure all existing packages are up to date:
sudo apt update && sudo apt upgrade
Import GPG Key and Atom Source Repository
By default, Atom Text Editor is not available in the default Ubuntu 20.04 repository. To install Atom, you must add the source repository and the GPG key to verify the packages. On a good note, importing the source repository will mean you will always have the latest stable version of Atom.
First, import the GPG key with the following command:
wget https://packagecloud.io/AtomEditor/atom/gpgkey -O atom_gpgkey gpg --no-default-keyring --keyring ./atom_signing_key_temp.gpg --import ./atom_gpgkey gpg --no-default-keyring --keyring ./atom_signing_key_temp.gpg --export > ./atom_signing_key.gpg sudo mv atom_signing_key.gpg /etc/apt/trusted.gpg.d/
Example output if successfully:
gpg --import ./atom_gpgkey gpg: keybox './atom_signing_key_temp.gpg' created gpg: directory '/root/.gnupg' created gpg: /root/.gnupg/trustdb.gpg: trustdb created gpg: key B75442BBDE9E3B09: public key "https://packagecloud.io/AtomEditor/atom (https://packagecloud.io/docs#gpg_signing) <[email protected]>" imported gpg: Total number processed: 1 gpg: imported: 1
Next, import the source repository to your apt package manager sources list:
echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" | sudo tee /etc/apt/sources.list.d/atom.list
Install Atom Text Editor
With the source repository sorted, you must refresh your apt package manager sources list to reflect the new addition before the Atom installation. To do this, run the following command in your terminal:
sudo apt update
Now install Atom Text Editor with the following command:
sudo apt install atom
Type (Y), then press (ENTER KEY) to proceed with the installation.
To confirm the installation, you can use the verify version command as follows:
Atom : 1.58.0 Electron: 9.4.4 Chrome : 83.0.4103.122 Node : 12.14.1
Launch Atom Text Editor
With the installation complete, you can run Atom in a few different ways. First, while you are in your terminal, you can use the following command:
Alternatively, run the atom command in the background to free up the terminal:
However, this isn’t practical, and you would use the following path on your Ubuntu desktop to open with the path: Activities > Show Applications > Atom. If you cannot find it, use the search function in the Show Applications menu if you have many applications installed.
The first time you open Atom Text Editor, you will see the following window:
Congratulations, you have installed Atom Text Editor on Ubuntu 20.04.
Uninstall Atom Text Editor
To remove the Atom software from your Ubuntu system, run the following command in your terminal:
sudo apt autoremove atom -y
Then for complete removal, delete the repository and GPG key:
sudo rm /etc/apt/sources.list.d/atom.* sudo rm /etc/apt/trusted.gpg.d/atom_* sudo apt update
Comments and Conclusion
In the tutorial, you have learned how to import the source repository for Atom and install it using the apt package manager on your Ubuntu 20.04 operating system. Overall, Atom is considered more straightforward to use a WYSIWYG editor that is fast as any competitor such as Sublime Text editor and is customizable with plugins.
For more information, visit the official documentation.