Listado de la etiqueta: CentOS


Occasionally, installing fresh packages daily may be necessary when working in a Linux environment. To install new software, you must determine how much RAM is available. Therefore, you should be able to examine the RAM or memory installed and available on your system.

This post will examine a few key commands for CentOS 8 that help determine how much memory or RAM is available.

Prerequisites

To check the memory usage, you should have sudo privileges.

How To Check Memory Usage Details Using GUI on CentOS 8

You can easily carry out the following action if you wish to check memory usage details using the graphical user interface (GUI). In the search box for the application, enter “system preceptor”.

You can quickly check the RAM usage by selecting the “Resources” tab.

Linux Commands Used To Check the Memory Usage Details on CentOS 8

The five different methods available can help determine how much memory is in use. These methods are listed:

  1. Free command
  2. Cat command
  3. vmstat command
  4. Htop command
  5. Top command

Check Memory Usage Details Using the Free Command

The previous image displayed contains several concepts, each of which we will define individually.

  • Used memory may be calculated using the formula used memory = total – free – buffer/cache.
  • The total reflects the total memory installed on your machine.
  • Free displays the memory that is not in use.
  • Shared displays the amount of memory that is shared by various programs.
  • Buffers the memory that the OS kernel has set aside. When a process demands additional memory, this memory is allocated as buffers.
  • Cached memory is used to store recently accessed files in RAM.
  • buff/cache Memory cache + buffers
  • Available displays memory that can be used to begin new processes without swapping.

The information displayed in the previous screenshot, such as that under the words used, available, and swap memory, is in kilobytes.

You may examine the complete description and all the options of the free command by using the following command:

Check Memory Usage Details Using the “cat” Command

First, open the terminal window and type “cat /proc/meminfo”. This command displays the total memory usage and available memory information from a file “/proc/meminfo”.

This command displays the real-time details of memory usage and the information about shared memory, which is used by the buffers and kernel.

Check Memory Statistics Using the vmstat Command

To view comprehensive posible memory statistics, use the vmstat command.

The memory, system processes, CPU activity, paging, block IO, and traps are all exposed by this command.

Display Memory Usage Details Using the htop Command

Like the top command, the htop command displays information. The htop command offers a user-friendly interface and improved control options.

The htop command has an interactive interface and can scroll the page horizontally and vertically. It also uses colors to present its output and provides a complete command-line environment for all processes. To exit the current window, press “Ctrl+c”.

The following information will appear on your terminal:

  1. The information summary and visual text counts are in the top area.
  2. The comprehensive information for each procedure is shown in the middle part. It is simple to carry out the various tasks on each distinct process.
  3. You can rapidly configure and manipulate the processes without using any commands, thanks to the list of all shortcuts at the bottom of the displayed window.

The following command can be used to install the htop utility if it isn’t already on your CentOS 8 system:

Check Memory Usage Details Using the top Command

The command-line tool top helps look at how much memory and CPU each process uses. It presents details about items, such as Uptime, media load, tasks running, user logged-in information, CPU utilization, swap and memory usage, and system processes.

The top command automatically updates the information on the terminal, allowing you to track the processes’ use of RAM in real-time.

Conclusion

This article has shown us how to preceptor the memory usage details on the CentOS 8 system. Additionally, we have run other commands to display the memory information, including cat, free, vmstat, top, and htop. You may quickly find out information about your system’s RAM and CPU by using these instructions.



Source link


“If you have installed CentOS Stream 9 on your computer and have an NVIDIA GPU installed on your computer, installing the NVIDIA GPU drivers on CentOS Stream 9 is the first thing you want to do.

In this article, I will show you how to install NVIDIA GPU drivers on CentOS Stream 9. So, let’s get started.”

Table of Contents

  1. Checking if the System Has Any NVIDIA GPU Installed
  2. Disable Secure Boot from the BIOS
  3. Enabling the EPEL Repository on CentOS Stream 9
  4. Installing the Required Dependencies and Build Tools for Compiling NVIDIA Kernel Modules
  5. Adding the Official NVIDIA CUDA Package Repository on CentOS Stream 9
  6. Installing the Latest NVIDIA GPU Drivers on CentOS Stream 9
  7. Checking If NVIDIA Drivers are Installed Properly
  8. Conclusion
  9. References

Checking if the System has any NVIDIA GPU Installed

You can check whether your computer has an NVIDIA GPU installed with the following command:

As you can see, I have an NVIDIA GeForce GTX 1050 Ti GPU installed on my computer. You may have a different NVIDIA GPU installed.

By default, the open-source Nouveau GPU drivers are used1 instead of the proprietary NVIDIA GPU drivers2 on CentOS Stream 9. Merienda you install the proprietary NVIDIA GPU drivers, you will see that they are used instead of the open-source Nouveau GPU drivers.

$ lsmod | grep nouveau
$ lsmod | grep nvidia

Disable Secure Boot From the BIOS

For NVIDIA GPU drivers to work on CentOS Stream 9, you must disable secure boot from the BIOS of your motherboard if it uses the UEFI firmware for booting operating systems.

The process of disabling secure boot from the BIOS of UEFI-capable motherboards is vendor-specific (different for each motherboard vendor like ASUS, MSI, Gigabyte, AsRock, etc.). So, it’s best to check the user manual of your motherboard to find out how to disable secure boot on your motherboard.

For older BIOS-based motherboards, you don’t need to do anything for the NVIDIA GPU drivers to work on CentOS Stream 9.

Enabling the EPEL Repository on CentOS Stream 9

To install the NVIDIA GPU drivers on CentOS Stream 9, you will have to install the required build tools and the required dependency libraries for compiling the NVIDIA kernel modules. Some of these are available in the CentOS Stream 9 EPEL repository. In this section, I am going to show you how to enable the EPEL repository on CentOS Stream 9.

First, update the DNF package repository cache with the following command:

Enable the official CentOS Stream 9 CRB package repository with the following command:

$ sudo dnf config-manager –set-enabled crb

Install the epel-release and epel-next-release packages with the following command:

$ sudo dnf install epel-release epel-next-release

To confirm the installation, press Y and then press <Enter>.

To confirm the GPG key, press Y and then press <Enter>.

The epel-release and the epel-next-release packages should be installed, and the EPEL repository should be enabled.

For the changes to take effect, update the DNF package repository cache with the following command:

Installing the Required Dependencies and Build Tools for Compiling NVIDIA Kernel Modules

To install the required build tools and the required dependency libraries for compiling the NVIDIA kernel modules, run the following command:

$ sudo dnf install kernel-headers-$(uname -r) kernel-devel-$(uname -r) tar bzip2 make automake gcc gcc-c++ pciutils elfutils-libelf-devel libglvnd-opengl libglvnd-glx libglvnd-devel acpid pkgconfig dkms

To confirm the installation, press Y and then press <Enter>.

The required packages are being downloaded from the internet. It will take a while to complete.

Merienda the packages are downloaded, you will be asked to confirm the GPG key of the CentOS official package repository.

To confirm the GPG key, press Y and then press <Enter>.

To confirm the GPG key of the EPEL repository, press Y and then press <Enter>.

The installation should continue.

At this point, the required dependency libraries and build tools for compiling the NVIDIA kernel module should be installed.

Adding the Official NVIDIA CUDA Package Repository on CentOS Stream 9

To add the official NVIDIA CUDA package repository on CentOS Stream 9, run the following command:

$ sudo dnf config-manager –add-repo http://developer.download.nvidia.com/compute/cuda/repos/rhel9/$(uname -i)/cuda-rhel9.repo

For the changes to take effect, update the DNF package repository cache with the following command:

Installing the Latest NVIDIA GPU Drivers on CentOS Stream 9

To install the latest version of the NVIDIA GPU drivers on CentOS Stream 9, run the following command:

$ sudo dnf module install nvidia-driver:latest-dkms

To confirm the installation, press Y and then press <Enter>.

All the NVIDIA GPU drivers packages and the required dependency packages are being downloaded from the internet. It will take a while to complete.

Merienda the packages are downloaded, you will be asked to confirm the GPG key of the official NVIDIA package repository. Press Y and then press <Enter> to confirm the GPG key.

The installation should continue. It will take a while to complete.

The installation should continue. It will take a while to complete.

For the changes to take effect, restart your computer with the following command:

Checking if NVIDIA Drivers are Installed Properly

Merienda your computer boots, you should see that the proprietary NVIDIA GPU drivers are used1 instead of the open-source Nouveau GPU drivers2.

$ lsmod | grep nvidia
$ lsmod | grep nouveau

You should also find the NVIDIA X Server Settings app in the Application Menu of CentOS Stream 9. Click on it.

The NVIDIA X Server Settings app should run without any errors, and it should show a lot of information related to your installed NVIDIA GPU.

You should also be able to run the NVIDIA command-line programs like nvidia-smi.

Conclusion

In this article, I have shown you how to add the official NVIDIA CUDA repository on CentOS Stream 9. I have also shown you how to install the latest version of the proprietary NVIDIA GPU drivers on CentOS Stream 9.

References

  1. Extra Packages for Enterprise Linux (EPEL) :: Fedora Docs (fedoraproject.org)
  2. NVIDIA Driver Installation Quickstart Guide :: NVIDIA Tesla Documentation



Source link


In today’s tutorial, we will discuss how to disable and enable automatic updates on CentOS 7 using the PackageKit. The tutorial is divided into two parts. In the first part, we will demonstrate how to disable coche updates on CentOS 7. In the second part, we will show you how to enable coche updates. We will use the CentOS command line to perform the tasks. The commands are very easy to follow.

What is PackageKit?

PackageKit is a system developed to make the installation and updating of the software on your computer easier. The primary design goal is to unify all the software graphical tools used in different distributions and to use some of the latest technology like PolicyKit. It is the graphical software updater in the RedHat-based Linux distributions.

To learn more about PackageKit, visit the following page:

https://www.freedesktop.org/software/PackageKit/

Let’s get started with the tutorial!

How to Disable PackageKit on CentOS 7?

Following are the steps involved in disabling PackageKit on CentOS 7:

Step 1: Check the PackageKit Status

Before you begin to disable the automatic updates on CentOS 7, check the status of the PackageKit. It will be active as displayed below. To check the status, execute the following command:

1

systemctl status packagekit

You will see the output like this on your terminal:

Step 2: Stop PackageKit

Before disabling the PackageKit, we first need to stop it as we saw in the previous step that the service is in an active state. This means that it is running. To stop it, run the following command:

1

systemctl stop packagekit

Step 3: Mask PackageKit

In this step, we will mask the Packagekit service. Masking a service prevents the service from being started manually or automatically. To mask the service, run the following command:

1

systemctl mask packagekit

This command will create a symlink from /etc/systemd/system/packagekit.service to /dev/null.

Step 4: Remove PackageKit Software Updater

Now that the PackageKit is completely stopped and disabled, we will now remove it from our system. To do that, issue the following command:

PackageKit will be instantly removed from our system.

How to Enable PackageKit on CentOS 7

Let’s also have a look at how to enable the PackageKit back. The following are the steps involved in enabling the PackageKit on CentOS 7:

Step 1: Reinstall PackageKit

To disable automatic updates, we had to remove the PackageKit. To enable automatic updates, we need to have it in our system again. With the help of the following command, we will install PackageKit back in our system:

1

yum install gnome-packagekit PackageKit-yum

Step 2: Unmask PackageKit

In this step, we will unmask the service. In part 1, we masked it to disable automatic updates. To unmask PackageKit, issue the following command:

1

systemctl unmask packagekit

Step 3: Start PackageKit

Now that the service is unmasked, let’s start it. To start PackageKit, we will run the following command:

1

systemctl start packagekit

Step 4: Verify PackageKit Status

Merienda the service is started, it is in an active state. Let’s verify it. To do that, run the following command to check the status of PackageKit:

1

systemctl status packagekit

The output will tell you that the service is running (active).

Step 5: Enable PackageKIt

Let’s now enable PackageKit. To do that, execute this command:

1

systemctl enable packagekit

Now, your system is back to the old settings. Automatic updates are now enabled on your CentOS 7 machine.

Conclusion

In this guide, we explored how to disable automatic updates on CentOS 7 with the help of PackageKit. We also explored how to enable automatic updates again. CentOS command line was used to disable and enable updates.



Source link