Quantcast
Channel: GoLinuxHub
Browsing all 392 articles
Browse latest View live

sed: perform search and replace only on specific lines (not globally)

By default when we perform search and replace action using sed, that is done globally within a file. Although if you have a line number you can perform the replace based on the line number but what if...

View Article


Understanding LVM snapshots (create, merge, remove, extend)

Below steps are tested on Red Hat Enterprise Linux 7.Being a system administrator we have to perform activities which leads to filesystem and data changes so it is always a good idea to keep a backup...

View Article


Do You Need A VPN When Running Linux?

Lately, internet users (read: everyone) are in a bit of a frenzy regarding online security. Antivirus and antimalware software is soaring in popularity. There are a million VPN apps for your smartphone...

View Article

Image may be NSFW.
Clik here to view.

Casino Gambling On Mobile vs Desktop Computers (Laptops)

The internet, phones, and gamingI remember distinctly having my first web enabled phone. With a screen that was probably no more than an inch or so big, it was still useful enough to bring up things...

View Article

How to compare floating point / decimal / version numbers using bash in Linux

I could not find any single utility in bash which can do such comparison for versions or decimals or floating point numbes unless it is an integer.Although if you want to do simple comparison i.e. if...

View Article


How to suppress stdout / stderr messages or redirect (save) output to a log...

Many times when working on a script we execute multiple commands which we do not want to be printed on STDOUT, and only the intended information be printed on the terminal.Also there are times when our...

View Article

How to find ethernet network card firmware and driver information in Linux

Based n the Linux Variant you use the commands and their output may differ. I have worked on Red hat Enterprise Linux and SuSE Enterprise Linux and below commands and method have been really very...

View Article

How to redirect specific log messages to separate log file using rsyslog in...

Starting from Red Hat Enterprise Linux 7 that have migrated to rsyslog from traditional syslog hence there are multiple syntax changes in terms how syslog works.Below steps have been validate on Red...

View Article


How to forcefully sync date and time using the NTP server in Linux

The commands and steps to initiate a forceful sync with NTP server may vary based on the distribution you are using.By default if NTP service is running it will automatically sync the client's date and...

View Article


How to print or grep only the matched string or text or word or pattern in...

By default when we use grep without any switch it prints the entire line which matches the string we tried to grep forFor egI would like search for "ModLoad" in my rsyslog.conf fileSo when attempted...

View Article

How to fix "Postponed keyboard-interactive for invalid user from port ssh2...

The other day I was unable to perform a passwordless (passphrase) based authentication for one of my user and for every attempt I was getting the below errorError:Postponed keyboard-interactive for...

View Article

sed: Ignore whitespace while matching a pattern

Suppose you have a set of words or line which want to match and perform some activity but you do not know the no of whitespace between each word or string.For eg I have a file /tmp/file with below...

View Article

sed: add or append character at beginning or end of line (row) of a file

You may have some requirement wherein you have to cut a row or get some output from a file and append it to another file as a prefix or suffix.or you know that you have to add some content as a prefix...

View Article


How to use iperf3 tool to monitor network bandwidth in Linux

I have already written an article to check the network bandwidth speed using netperf available at below linkHow to monitor network bandwidth in Linux using netperfIn this article I will guide you the...

View Article

Image may be NSFW.
Clik here to view.

Host gets stuck at certain percentage while entering maintenance mode in Full...

Problem Statement: Host stuck at a 68% (certain percentage) while entering vSAN Maintenance Mode.When you enter a vSAN Maintenance mode with option "Full data migration", its bound to take long time...

View Article


Image may be NSFW.
Clik here to view.

How do I set or change (default) runlevel using systemd in CentOS 7/RHEL 7

This article gives you an overview of transition from System V init scripts to Systemd.Some of the benefits of systemd over the traditional System V init facility include:systemd never loses initial...

View Article

Image may be NSFW.
Clik here to view.

Step by Step Linux boot process with GRUB2 and systemd in RHEL 7 / CentOS 7

Below table depicts the flow of the boot up process for RHEL 7 / Cent OS 7 with GRUB2 and systemdThe stages involved in Linux Booting Process are:BIOSBoot Loader    - MBR    -...

View Article


Image may be NSFW.
Clik here to view.

Tutorial / Cheatsheet: 11 examples to use systemctl to manage unit files and...

If you want to have a background of migration from sysvinit scripts which we were using RHEL 6 and earlier to systemd used in RHEL 7 then follow below linkEverything you must know before starting with...

View Article

Understanding syntax, arguments, aliases used in sudoers file with examples...

This article contains overview on the various syntax and aliases which are used in sudoers fileIMPORTANT POINT: It is strongly recommended to use "visudo" to edit the sudoers file rather than using...

View Article

Tutorial / Cheatsheet:12 practical examples for different sudo access based...

Below are some of the scenarios I can think of where sudoers file can be used, if you have any more questions for which you want any help of post us here in the comment section and I can try to update...

View Article
Browsing all 392 articles
Browse latest View live