Stellarium is a free and open-source planetarium software package. It is licensed under the GNU General Public License, version 2. It is available for Linux, Windows, and macOS. A port of Stellarium called Stellarium Mobile is available for Android, iOS, and Symbian as a paid version. It was originally developed by Fabien Chéreau and is now maintained by the Stellarium team. The software renders the night sky in 3D, allowing users to see stars, constellations, planets, nebulae, and other astronomical objects in their correct positions relative to each other. Users can also set the time and date to see how the night sky changes. In addition to being a useful tool for astronomers and amateur stargazers alike, Stellarium is also used in educational settings, such as planetariums and science museums.
Recommended Steps Before Installation
Before proceeding with the tutorial, ensuring your system is up-to-date with all existing packages is good.
sudo apt update
Optionally, you can list the updates for users who require review or are curious.
sudo apt --list upgradable
Proceed to upgrade any outdated packages using the following command.
sudo apt upgrade
Import Stellarium LaunchPAD PPA
First, you will need to import the LaunchPAD PPA maintained by the “Stellarium” team. There are three branches, stable, beta, and daily. I suggest users install the stable release or the daily as the beta is the least updated and only sees changes before a major release on the stable branch.
The following dependencies will need to be installed. Most of these packages are already on your system, but running the command can help ensure they are installed.
sudo apt install dirmngr ca-certificates software-properties-common gnupg gnupg2 apt-transport-https -y
Next, import the GPG key needed for all the repositories.
If you have issues importing the GPG key, please see the end section on GPG troubleshooting at the end of the article.
sudo gpg --no-default-keyring --keyring /usr/share/keyrings/stellarium.gpg --keyserver keyserver.ubuntu.com --recv-keys 4283D01497ADF8D09CFA9B6C1932F485C68D72A5
Example output:
gpg: key 1932F485C68D72A5: public key "Launchpad Stellarium Test Builds" imported
gpg: Total number processed: 1
gpg: imported: 1
Now import using the following command. Again, I would suggest stable for most users and daily for those without potentially unstable software who want the latest bleeding-edge software.
I do not recommend the beta repository, as you may be waiting quite a while for updates on it, given its purpose.
Option 1. Import Stable Release (Recommended)
echo 'deb [signed-by=/usr/share/keyrings/stellarium.gpg] https://ppa.launchpadcontent.net/stellarium/stellarium-releases/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list.d/stellarium.list
Option 2. Import Daily Release (Development/Testing)
echo 'deb [signed-by=/usr/share/keyrings/stellarium.gpg] https://ppa.launchpadcontent.net/stellarium/daily/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list.d/stellarium.list
Now, update your repository list to reflect the new additions.
sudo apt update
With the setup complete, execute the installation command to install.
sudo apt install stellarium -y
How to Launch Stellarium
The best method is to use the following desktop path to launch Stellarium.
Activities > Show Applications > Stellarium
Example:
Once you open Stellarium, you will come across the default screen of a standard sky setup that you can begin to configure and set up.
Example:
From this point, I suggest going into the configuration menu in the top right-hand corner and customizing. For new users of this software, I highly suggest grabbing the user-guide PDF and perhaps joining the mailing list or discussions to collaborate with others.
How to Update/Upgrade Stellarium
Most users would often update when the desktop GUI notifies them, which is excellent. But I would always recommend updating using the command line terminal with CLI to ensure updates are getting processed.
sudo apt update && sudo apt upgrade
How to Remove/Uninstall Stellarium
The removal of the Stellarium is straightforward. Use the following command that matches your installation.
sudo apt autoremove stellarium --purge -y
Note that this will delete all data, including all database data added with the –purge flag. Do not use the purge end flag if you wish to keep the data.
I suggest that users who do not want to use the software again remove the PPA using the following command.
sudo rm /etc/apt/sources.list.d/stellarium.list
Just re-import the PPA and the GPG key in the future if you want to reinstall.
How to Fix Broken LaunchPAD PPA GPG Key Import
For users who have not previously imported a GPG key from the Ubuntu keyserver, the command line terminal will often have issues importing GPG keys from LaunchPAD PPAs because the directories are not created. This is an easy fix. Use the following command that will, in turn, generate the directories.
sudo gpg --list-keys
Example output:
As mentioned above, the necessary directories have been created. This can be skipped, and use the following GPG import command below. If you have any issues with directories missing for this and any other PPA GPG key in the future, just run the above command.