Category: Linux

CentOS 7 df command hangs

The df command is useful in reporting disk space usage.  However, recently encountered a system that would hang after issuing the df command.  A CTL-C or CTL-Z would not escape this annoyance.  The issue was quickly resolved by reinstalling stystemd. yum -y reinstall systemd After reinstalling systemd, the df command was reissued and was quite responsive. Source

Read More »

The cd command in CentOS 7

I have been working in a CLI environment for many years, so the cd “change directory” command is nothing new to me; however, an accidental typo presented an unexpected result.  Instead of typing “cd ..” which would transverse back one directory, a user typed only “cd” with the intention of pasting from the clipboard the rest of the path.  The…

Read More »

VIM: Preserve File Date with Touch

I had a single file I needed to modify but didn’t want to modify the date of the file.  It was a minor change to the file, so I wanted to maintain the file date for posterity.  In any case, I learned the vim does not provide this functionality, but touch would and quite easily.  With that said, I am…

Read More »

Determine which processes are using swap in Linux

Some servers may have several applications, each running in their own allocated piece of RAM and SWAP.  It seems easy enough to use `top` to determine memory usage, but it wasn’t so obvious (to me) as to how to determine swap usage.  A nifty little command called smem to the rescue. So what is smem?  It is a “Report memory…

Read More »

ssh logins using keys

I have wanted to experiment and expand upon different ways of ssh’ing into one linux box from another using the ssh-keygen.  This article demonstrates several different methods that I have tested and used throughout the years. Actually what has happened, is that over time, scripting evolved and always seem to make tweaks along the way. Another variation. A more lengthy…

Read More »

Spacewalk Certificate expiration warning [Resolved] 2018

I’m not going to go into detail as to what spacewalk is and what this message is all about, you are here for a reason.  You may have received an auto-generated email from Spacewalk to “inform you that your Spacewalk Certificate has expired on your [fqdn] server. After 4 day(s) the systems management services provided by your Spacewalk Server will…

Read More »

How to change user name in CentOS

A username needed to be changed on a local install of a CentOS Linux box.  Here are the steps taken to resolve the issue. usermod -l new old mv /home/old/ /home/new/ groupmod -n new old chown new:new /home/new/ chown new:new /home/new/ -R passwd new

Read More »

How to add desktop icons on CentOS 7

For the most part, I prefer to work using the terminal on a minimal install of Linux; however, there are those occasional times where the GUI is necessary.  Recently faced with having to add a few desktop shortcuts to the Desktop posed a bit of a problem for me. Basically, wanted to achieve two things, a Desktop icon to launch…

Read More »

VIM: Join Lines

I had a document where I wanted to join every other line.  I tried several approaches on a Windows box using Cygwin but only one worked with a couple variations.  Using the vim editor.  This is a new trick to me, and wanted to jot it down before I forget about. The file looked something like this. One approach was…

Read More »

Linux: How to logout a user

A user was logged in via XRDP and the screen locked.  Each attempt to logon also resulted in a locked screen.  Rebooting is not an option.  There needed to be a way to identify the user and forcibly log them off, and there is. Logged on as root and typing the who command lists users and logons.  A great working…

Read More »

Use htop to determine which processor a process is loaded

Running Linux on virtual machines makes life so much easier when it comes to adding virtual hardware to a vm.  In one case, I added 4 CPUs to a virtual machine, and wondered if I needed to restart the applications to utilize the newly added CPUs. htop is an interactive system-monitor process-viewer and process-manager. It is designed as an alternative…

Read More »
VMWare Logo

VMware Expand Hard Drive Size and Extend in CentOS 7 Linux

One approach to adding space to an existing Linux hard drive that is using Linux LVM is to add space to the drive. This can easily be accomplished in VMware. This has been tested using VMware vSphere Client for Windows with CentOS 7.5 (minimal install). To demonstrate a before and after, here are a few commands that can be used…

Read More »

Apache httpd log rotation does not compress the logs

A CentOS 7 installation with a simple yum install of httpd also creates a logrotation script.  The script does log rotate files, however, there is no compression.  A quick look at the script indicates that some compression settings are put into place, but as experience indicates, not enough to do the job. By default, this is the logroation script as…

Read More »

Install certbot-auto on CentOS 6 with Python 3.6.x

This is a simplified process for installing and running certbot-auto on CentOS 6 with Python 3.6.x. I have tried several different approaches to this and this method took the least amount of effort. yum install -y centos-release-SCL yum install -y epel-release yum clean all yum install -y rh-python36 curl -o /usr/local/bin/certbot-auto http://dl.eff.org/certbot-auto chmod +x /usr/local/bin/certbot-auto scl enable rh-python36 bash certbot-auto…

Read More »

Memory Utilization High in Linux VM

Utilities such as htop, top, and the command free -mh all report a high usage of memory.  The thing is nothing was running.  It turns out to be explainable. Using the following commands, it was determined that VMware virtual server has enabled the vmw_balloon. VMware Tools Balloon Defined The VMware Tools balloon driver is among the utilities installed in the…

Read More »

Install LXC on Ubuntu

Linux Containers (“LXC”) is an operating-system-level virtualization method for running multiple isolated Linux systems on a control host using a single Linux kernel. LXC is the well known set of tools, templates, library and language bindings. It’s pretty low level, very flexible and covers just about every containment feature supported by the upstream kernel. LXC is production ready with LXC…

Read More »

VMware Workstation loses bridged network

VMware Workstation loses bridged network and it does not want to come back following the usual methodologies.  I restarted the VMware Workstation services, used the Network Manager, and reboot the computer all to no avail.  In the end, it was something that wasn’t a problem before. On a Windows 10 workstation running VMware Workstation 12 for many months without issue,…

Read More »