≡ Menu

CentOS

How to install wget on RHEL/CentOS 7 using yum

I am trying to download a file using ‘wget http://url’ syntax, but I am getting an error:
bash: wget: command not found

How do I fix this problem? How can I install wget on a CentOS/RHEL 7 or 6 server using yum command?
[click to continue…]

Sysadmin because even developers need heroes!!!

How to add to bash $PATH permanently on Linux

I am a new Linux and bash shell user. How do I permanently set $PATH on Linux? How can I permanently add a directory to shell PATH on Linux?
[click to continue…]

How to check if port is in use on Linux or Unix

How do I determine if a port is in use under Linux or Unix-like system? How can I verify which ports are listening on Linux server?
[click to continue…]

How to run commands on Linux Container (LXD) instance at provision launch time

I would like to perform common automated configuration tasks and run commands/scripts after the LXD instance starts. How to use cloud-init to run commands on my Linux Container (LXD) instance at launch time?
[click to continue…]

How to delete KVM VM guest using virsh command

I am a new Linux and KVM user. How do I delete a VM guest with virsh command line on Linux operating system? How do I delete a virtual machine called vps42 on Ubuntu or CentOS Linux server?
[click to continue…]

A very serious security problem has been found in the Linux kernel. A 0-day local privilege escalation vulnerability has existed for eleven years since 2005. This bug affects all sort of of Android or Linux kernel to escalate privileges. Any user can become root in less than 5 seconds. The bug has existed since Linux kernel version 2.6.22+. How do I fix this problem?
[click to continue…]

How to create snapshot in Linux KVM VM/Domain

Before upgrading my virtual machine, I would like to make a snapshot. I want to revert a domain/VM to a snapshot if something goes wrong with my upgrade. Is there a command to create a snapshot of virtual machine (VM) while it is running? Does qemu-kvm support live snapshot creation?
[click to continue…]

cron Error: bad username; while reading /etc/cron.d file on Linux

I am getting the following error in my cron job log file /var/log/cron.log:
       Aug 22 01:59:01 server2 cron[7510]: Error: bad username; while reading /etc/cron.d/backups
I have job entry as follows to run a job at 00:50 every day for root user:
       50 0 * * * /etc/cron.d/backups
How do I fix this problem on Linux or Unix-like system?
[click to continue…]

How to make disk image with dd on Linux or Unix

How do I create disk image using dd command? How do I perform disk cloning from a live Linux cd for backup or recovery purpose?
[click to continue…]

How to configure a static IP address on CentOS 7 / RHEL 7

I am a new sysadmin and CentOS user. My system is configured to use DHCP. How can I switch from DHCP to static IP address configuration in a CentOS 7 desktop system? How do I setup a static TCP/IP address on my CentOS Linux 7 or Red Hat Enterprise Linux 7 server using command line option?
[click to continue…]