How to change the Grub2 boot order?

How can I change the boot order in grub2? Here is a step by step guide,

In a terminal type,

# grep menuentry /boot/grub2/grub.cfg
menuentry 'CentOS Linux (4.6.4-1.el7.elrepo.x86_64) 7 (Core) with debugging' --class rhel fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-229.el7.x86_64-advanced-169f51f6-092c-43b8-bea9-bdc484dc66c6' { Continue reading How to change the Grub2 boot order? 

How to disable graphic interface in CentOS/RHEL 7?

When the graphic interface is installed, by default, we will enter graphic mode. How can we disable it?

Well, it’s kinda easy as below:

# mv /etc/systemd/system/ /etc/systemd/system/
# ln -sf /lib/systemd/system/ /etc/systemd/system/
# systemctl reboot

The first command creates a backup, and the second command sets command-line mode as default. Then reboot system to take effect.

The way to enable graphic interface is as simple as below:

# ln -sf /etc/systemd/system/ /etc/systemd/system/

How to check SSL certificate expiration Date from command line?

An SSL certificate contains such information as: validity dates, subject, issuer and other stuff. It is a quite common task to check if an SSL certificate is valid and when it expires. We can easily use  Linux command line tools to retrieve all the information from website’s SSL certificate.

Here we will show how to use the Linux command line to connect to a remote https website, decode SSL certificate and get its validity date.

Check an HTTPS certificate expires date from command line:

$ echo | openssl s_client -connect site:port 2>/dev/null | openssl x509 -noout -dates

Let’s check when the SSL certificate of expires:

$ echo | openssl s_client -connect 2>/dev/null | openssl x509 -noout -dates
notBefore=Apr 10 00:00:00 2015 GMT
notAfter=Dec 31 12:00:00 2015 GMT

Linux FAQs for System Administrators