Logs, Cron and Package Commands

Table of contents

I am here coming up with a new interesting blog. we are discussing Logs, rpm, yum, APT, and cron.
1)Logs:- 1)Linux logs provide a timeline of events for the Linux operating system, applications, and system and are a valuable troubleshooting tool when you encounter issues.
2)When issues arise, analyzing log files is the first thing an administrator needs to do. To understand better, let’s see how Linux logs can be of help.
3)When issues arise, analyzing log files is the first thing an administrator needs to do. To understand better, let’s see how Linux logs can be of help.
Syntax:-
$ sudo cat /var/log/<log_file>
2)Rsyslog:- 1)Rsyslog is an open-source software utility used on UNIX and Unix-like computer systems for forwarding log messages in an IP network.
2)It implements the basic syslog protocol and extends it with content-based filtering, rich filtering capabilities, and queued operations to handle offline outputs.
3)Support for different modules outputs flexible configuration options and adds features such as using TCP for transport.
3)Syslog:- 1)Syslog is the general standard for logging system and program messages in the Linux environment.
2)This service constitutes the system log daemon, where any program can do its logging (debug, security, normal operation) in addition to the Linux kernel messages.
3) It is a daemon that listens for logs and writes them to a specific location. The location(s) is defined in the configuration file for the daemon. rsyslog
is the Syslog daemon shipped with most of the distros.
4)RPM:- 1)RPM is a command-line utility for managing packages on Unix/Linux systems.
2) It allows you to install, query, update, verify and remove RPM packages. It is the default package manager for Red Hat-based systems and only works with the .rpm format.
3)You can install such packages using the rpm or the yum command.
4)RPM was intended primarily for Linux distributions; the file format is the baseline package format of the Linux Standard Base Although it was created for use in Red Hat Linux.
5) RPM is now used in many Linux distributions such as PCLinuxOS, AlmaLinux, CentOS, openSUSE, OpenMandriva and Oracle Linux.
RPM Commands :-
rpm -ivh (packagename) -[install ]
rpm -gpr (packagename) -[package search]
rpm -ivh –nodeps (packagename)
rpm -q (packagename) -[search]
rpm -qa -last -[last install]
rpm -qa -[total list]
rpm -uvh (packagename) -[update]
rpm – evv (packagename) -[remove]
5)YUM:- 1)The Yellowdog Updater Modified (YUM) is a free and open-source command-line package-management utility for computers running the Linux operating system using the RPM Package Manager.
2)Though YUM has a command-line interface, several other tools provide graphical user interfaces to YUM functionality.
yum
is the primary tool for getting, installing, deleting, querying, and managing Red Hat Enterprise Linux RPM software packages from official Red Hat software repositories, as well as other third-party repositories.
yum
is used in Red Hat Enterprise Linux versions 5 and later. Versions of Red Hat Enterprise Linux 4 and earlier used up to date.
YUM commands :-
yum install (packagename) –y
yum remark (packagename) -y
yum update (packagename)
yum list (packagename)
yum search (packagename)
yum info (packagename) )
yum update -y (packagename)
6)APT:- 1) Apt stands for “Advanced Packaging Tool”. It is a package manager that is used for managing the installation, updating, and removal of software packages in a Debian-based Linux system.
2)A Debian-based Linux system uses dpkg packaging system. Dpkg is responsible for packing the software in an easy-to-install package. Apt-get acts as a user-friendly tool that interacts with this packaging system.
APT Commands:-
apt -get update -y
apt -get check (packagename)
apt -get upgrade (packagename)
apt -get install (packagename)=(versionNo)
apt -get install (pkg1) (pkg2)
apt -get install – download -only(packagename)
7)Cron:- 1)The crontab is used to automate all types of tasks on Linux systems. This is an especially important skill for aspiring system administrators to learn.
2)It can be somewhat challenging to get started if you’re a beginner. The syntax is different than most other commands.
3)For this reason, this lesson will include a little more background information before I show you some of the uses.
That is all about day-5 of the Linux workshop. Thank you for reading my blog......
Subscribe to my newsletter
Read articles from Om Kadam directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
