Posts

installing rhel8

Image

repo creation and epel repo creation

what is repository A software repository, or “repo” for short, is a storage location for software packages. Often a table of contents is stored, as well as metadata. Repositories group packages. what is sudo? a sudo is having full execution permission as root user has. That means the user specifically having sudo means that user can do what ever root can do almost all services. [bala@balatest ~]$ sudo mount /dev/sr0 /mnt We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:     #1) Respect the privacy of others.     #2) Think before you type.     #3) With great power comes great responsibility. [sudo] password for bala: mount: /mnt: WARNING: device write-protected, mounted read-only. [bala@balatest ~]$ sudo cp /mnt/media.repo /etc/yum.repos.d/rhel8.repo [root@balatest bala]# vi /etc/yum.repos.d/rhel8.repo [InstallMedia-BaseOS] name=Red Hat Enter...

crontab editing

crontab Cron (aka Crontab) is a task scheduler in Linux that helps to execute a task on a scheduled time, and it is very similar to Windows Task Schedulers. With crontab, we can schedule repetitive tasks as well as one-time tasks using @ utility. Crontab is mostly used for executing backup scripts for taking the system backups and also sometimes to start and stop applications. Crontab Install Crontab The package name of crontab in CentOS / RHEL is cronie and cron in Ubuntu / Debian. You can install crontab using the below command. ### CentOS / RHEL ### yum -y install cronie ### Debian / Ubuntu ### apt-get install cron Start Crontab If the crontab is not running, then start it using the following command. service crond start Edit crontab To add or edit crontab jobs of a current logged in user, use the below command. The command will open a file editor where you can update the jobs. crontab -e To edit other users crontab jobs, use the below command...

Crontab Examples

Image
20 Useful Crontab Examples Let us start with very basic crontab example. 1. Schedule a crontab at particular time (at 1 am) This cron will be useful for you to do some cleanup activities on servers when there is a less usage. 0 1 * * * /path/to/script.sh This job runs every day 1 AM. 2. Schedule a cron to run twice a day Do you have a script that is required to be run twice a day? Use the below cron job example. 0 10,22 * * * /path/to/script.sh Above cron runs twice a day at 10 AM and 10 PM. 3. Schedule a cron to run every Sunday 1 AM You may need to schedule a cron to do weekend activities like taking full backup or configuration backup. 0 1 * * sun /path/to/script.sh OR 0 1 * * 0 /path/to/script.sh OR 0 1 * * 7 /path/to/script.sh 0 or 7 means Sunday. 4. Schedule a crontab every minute This one may be funny; sometimes you may require run cron for every minute. * * * * * /path/to/script.sh 5. Schedule a crontab every 5 minutes ...

History Commands

    1  yum repolist     2  rm k     3  rm /root/k     4  cd /root/k     5  cd /root     6  ll     7  cd /etc/yum.repos.d/     8  ll     9  rm root_k.repo    10  yum repolist    11  yum update --security    12  yum repolist    13  ps ax    14  ps aux    15  ps ax|grep emacs    16  top    17  gnome-system-monitor    18  systemctl enable --now cockpit.socket    19  hostname    20  free    21  free -m    22  lsblk    23  blk    24  blkid    25  lsblk -l    26  blkid sda1    27  blkid sda2    28  blkid /dev/sda2    29  blkid -po ude...