Jump to content

Welcome to CodeNameJessica

Welcome to CodeNameJessica!

💻 Where tech meets community.

Hello, Guest! 👋
You're just a few clicks away from joining an exclusive space for tech enthusiasts, problem-solvers, and lifelong learners like you.

🔐 Why Join?
By becoming a member of CodeNameJessica, you’ll get access to:
In-depth discussions on Linux, Security, Server Administration, Programming, and more
Exclusive resources, tools, and scripts for IT professionals
A supportive community of like-minded individuals to share ideas, solve problems, and learn together
Project showcases, guides, and tutorials from our members
Personalized profiles and direct messaging to collaborate with other techies

🌐 Sign Up Now and Unlock Full Access!
As a guest, you're seeing just a glimpse of what we offer. Don't miss out on the complete experience! Create a free account today and start exploring everything CodeNameJessica has to offer.

  • Entries

    42
  • Comments

    0
  • Views

    299

Even on Linux, you can enjoy gaming and interact with fellow gamers via Steam. As a Linux gamer, Steam is a handy game distribution platform that allows you to install different games, including purchased ones. Moreover, with Steam, you can connect with other games and play multiplayer titles.Steam is a cross-platform game distribution platform that offers games the option of purchasing and installing games on any device through a Steam account. This post gives different options for installing Steam on Ubuntu 24.04.

Different Methods of Installing Steam on Ubuntu 24.04

No matter the Ubuntu version that you use, there are three easy ways of installing Steam. For our guide, we are working on Ubuntu 24.04, and we’ve detailed the steps to follow for each method. Take a look!

Method 1: Install Steam via Ubuntu Repository

On your Ubuntu, Steam can be installed through the multiverse repository by following the steps below.
Step 1: Add the Multiverse Repository
The multiverse repository isn’t added on Ubuntu by default but executing the following command will add it.

$ sudo add-apt-multiverse

steam-1.png

Step 2: Refresh the Package Index
After adding the new repository, we must refresh the package index before we can install Steam.

$ sudo apt update

steam-2.png

Step 3: Install Steam
Lastly, install Steam from the repository by running the APT command below.

$ sudo apt install steam

steam-3.png

Method 2: Install Steam as a Snap

Steam is available as a snap package and you can install it by accessing the Ubuntu 24.04 App Center or by installing via command-line.
To install it via GUI, use the below steps.

Step 1: Search for Steam on App Center

On your Ubuntu, open the App Center and search for “Steam” in the search box. Different results will open and the first one is what we want to install.

steam-5.png

Step 2: Install Steam

On the search results page, click on Steam to open a window showing a summary of its information. Locate the green Install button and click on it.

steam-6.png

You will get prompted to enter your password before the installation can begin.

steam-7.png

Once you do so, a window showing the progress bar of the installation process will appear. Once the process completes, you will have Steam installed and ready for use on your Ubuntu 24.04.

Alternatively, if you prefer using the command-line option to install Steam from App Center, you can do so using the snap command. Specify the package when running your command as shown below.

$ sudo snap install steam

steam-8.png

On the output, the download and installation progress will be shown and once it completes, Steam will be available from your applications. You can open it and set it up for your gaming.

Method 3: Download and Install the Steam Package

Steam releases a .deb package for Linux and by downloading it, you can use it to install Steam. Unlike the previous methods, this method requires downloading the Steam package from its website using command line utilities such as wget or curl.

Step 1: Install wget

To download the Steam .deb package, we will use wget. You can skip this step if you already have it installed. Otherwise, execute the below command.

$ sudo apt install wget

steam-9.png

Step 2: Download the Steam Package

With wget installed, run the following command to download the Steam .deb package.

$ wget https://steamcdn-a.akamaihd.net/client/installer/steam.deb

steam-10.png

Step 3: Install Steam

To install the .deb package, we will use the dpkg command below.

$ sudo dpkg -i steam.deb

steam-11.png

Once Steam completes installing, verify that you can access it by searching for it on your Ubuntu 24.04.

steam-12.png

With that, you now have Steam installed on Ubuntu.

Conclusion

Steam is handy tool for any gamer and its cross-platform nature means you can install it on Ubuntu 24.04. we’ve given three installation methods you can use depending on your preference. Once you’ve installed Steam, configure it and create your account to start utilizing it. Happy gaming!

Cron is a time-based job scheduler that lets you schedule tasks and run scripts periodically at a fixed time, date, or interval. Moreover, these tasks are called cron jobs. With cron jobs, you can efficiently perform repetitive tasks like clearing cache, synchronizing data, system backup and maintenance, etc.

These cron jobs also have other features like command automation, which can significantly reduce the chances of human errors. However, many Linux users face multiple issues while setting up a cron job. So, this article provides examples of how to set up a cron job in Linux.

How To Set up a Cron Job

Firstly, you must know about the crontab file to set up a cron job in Linux. You can access this file to view information about existing cron jobs and edit it to introduce new ones. Before directly opening the crontab file, use the below command to check that your system has the cron utility:

sudo apt list cron

showing-the-list-of-currently-active-crons

If it does not provide an output as shown in the given image, install cron using:

sudo apt-get install cron -y

Now, verify that the cron service is active by using the command as follows:

service cron status

checking-the-cron-service-status

Once you are done, edit the crontab to start a new cron job:

crontab -e

The system will ask you to select a particular text editor. For example, we use the nano editor by entering ‘1’ as input. However, you can choose any of the editors because the factor affecting a cron job is its format, which we’ll explain in the next steps.

After choosing an editor, the crontab file will open in a new window with basic instructions displayed at the top.

instructions-of-cron-jobs

Finally, append the following crontab expression in the file:

* * * * * /path/script

Here, each respective asterisk (*) indicates minutes, hours, daily, weekly, and monthly. This defines every aspect of time so that the cron job can execute smoothly at the scheduled time. Moreover, replace the terms path and script with the path containing the target script and the script’s name, respectively.

Time Format to Schedule Cron Jobs

As the time format discussed in the above command can be confusing, let’s discuss its format in brief:

  1. In the Minutes field, you can enter values in the range 0-59, where 0 and 59 represent the minutes visible on a clock. For an input number, like 9, the job will run at the 9th minute every hour.

  2. For Hours, you can input values ranging from 0 to 23. For instance, the value for 2 PM would be ’14.’

  3. The Day of the Month can be anywhere between 1 and 31, where 1 and 31 again indicate the first and last Day of the Month. For value 17, the cron job will run on the 17th Day of every Month.

  4. In place of Month, you can enter the range 1 to 12, where 1 means January and 12 means December. The task will be executed only during the Month you specify here.

Note: The value ‘*’ means every acceptable value. For example, if ‘*’ is used in place of the minutes’ field, the task will run every minute of the specified hour.

For example, below is the expression to schedule a cron job for 9:30 AM every Tuesday:

30 9 * * 2 /path/script

For example, to set up a cron job for 5 PM on weekends in April:

0 17 * 4 0,6-7 /path/script

As the above command demonstrates, you can use a comma and a dash to provide multiple values in a field. So, the upcoming section will explain the use of various operators in a crontab expression.

Arithmetic Operators for Cron Jobs

Regardless of your experience in Linux, you’ll often need to automate jobs to run twice a year, thrice a month, and more. In this case, you can use operators to modify a single cron job to run at different times.

  1. Dash (-): You can specify a range of values using a dash. For instance, to set up a cron job from 12 AM to 12 PM, you can enter * 0-12 * * * /path/script.

  2. Forward Slash (/): A slash helps you divide a field’s acceptable values into multiple values. For example, to make a cron job run quarterly, you’ll enter * * * /3 * /path/script.

  3. Comma (,): A comma separates two different values in a single input field. For example, the cron expression for a task to be executed on Mondays and Wednesdays is * * * * 1,3 /path/script.

  4. Asterisk (*): As discussed above, the asterisk represents all values the input field accepts. It means an asterisk in place of the Month’s field will schedule a cron job for every Month.

Commands to Manage a Cron Job

Managing the cron jobs is also an essential aspect. Hence, here are a few commands you can use to list, edit, and delete a cron job:

  1. The l option is used to display the list of cron jobs.

  2. The r option removes all cron jobs.

  3. The e option edits the crontab file.

All the users of your system get their separate crontab files. However, you can also perform the above operations on their files by adding their username between the commands– crontab -u username [options].

A Quick Wrap-up

Executing repetitive tasks is a time-intensive process that reduces your efficiency as an administrator. Cron jobs let you automate tasks like running a script or commands at a specific time, reducing redundant workload. Hence, this article comprehensively explains how to create a cron job in Linux. Furthermore, we briefed the proper usage of the time format and the arithmetic operators using appropriate examples.

Important Information

Terms of Use Privacy Policy Guidelines We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.