• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Archives for February 2017

CentOS / RHEL : How to find which user run a specific command?

by admin

Question: How can I tell which user ran a specific command ? or If the user clears their .bash_history can I still tell who ran a command? Answer: Using the process accounting tools, you can get basic information about who ran a specific command. Below are the steps to find out who run the command. […]

Filed Under: Linux

CentOS / RHEL 7 : How to open a port in the firewall with firewall-cmd?

by admin

Question: How to open a port in RHEL 7 using the firewall-cmd command? Solution: To begin with check the firewalld status using the systemctl command : # systemctl status firewalld ● firewalld.service – firewalld – dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2016-10-29 21:47:04 IST; 1 weeks […]

Filed Under: CentOS/RHEL 7

CentOS / RHEL 6 : How to force a NTP sync with the NTP server(s)

by admin

This post briefly outlines how one can force a ntp (Network Time Protocol) sync with the ntp servers defined in the /etc/ntp.conf configuration file. This will not work if there are no ntp servers defined in the /etc/ntp.conf, this can be verified using : # grep ^server /etc/ntp.conf This document is useful when the date […]

Filed Under: Linux

CentOS / RHEL : How to disable BASH shell history

by admin

Question: How to disable BASH shell history, so that it does not save users shell history? Solution: Add a line like the following to the end of /etc/profile or a new /etc/profile.d/*.sh file unset HISTFILE This will make each user’s bash shell to skip saving history files unless the users manually configure the HISTFILE variable. […]

Filed Under: Linux

CentOS / RHEL : How to add a null route in Linux

by admin

As Per the ip man page, there are three route types which will drop traffic in specific ways: Route types: unreachable – these destinations are unreachable. Packets are discarded and the ICMP message host unreachable is generated. The local senders get an EHOSTUNREACH error. blackhole – these destinations are unreachable. Packets are discarded silently. The […]

Filed Under: Linux

How to configure Kdump on SuSE Linux Enterprise System 10 and 11

by admin

The post describes how to setup kdump on SuSE Linux Enterprise System (SLES) 10 and 11 to capture core dumps from Kernel panics and crashes. Kdump (kernel dump) provides a memory dump into a file named vmcore when the kernel has critical issue. Vmcore is often required to investigate the issue. The crash dump is […]

Filed Under: SuSE Linux Enterprise

CentOS / RHEL : How to backup/restore configuration using authconfig

by admin

Steps 1. Backup the configuration files using authconfig utility. The general syntax for the command is : # authconfig –savebackup=[name] For example : # authconfig –savebackup=config_backup 2. Backup’s are saved at following location: # ll /var/lib/authconfig/backup-config_backup/ total 80 -rw-r–r– 1 root root 401 Oct 28 00:18 authconfig -rw-r–r– 1 root root 1 Oct 28 00:18 […]

Filed Under: Linux

CentOS / RHEL 7 : Never run the iptables service and FirewallD service at the same time!

by admin

By default, RHEL 7 uses the FirewallD service to provide network security. FirewallD must be stopped and disabled when using the iptables service: # systemctl stop firewalld.service # systemctl disable firewalld.service # systemctl enable iptables.service # systemctl start iptables.service The iptables service is now provided by a separate package called iptables-services: # yum info iptables-services […]

Filed Under: CentOS/RHEL 7

CentOS / RHEL 7 : Unable to start/enable iptables

by admin

Problem: When trying to start/enable the iptables daemon you receive the errors: # systemctl enable iptables Failed to issue method call: Access denied # systemctl start iptables Failed to start iptables.service: Unit iptables.service failed to load: No such file or directory. Solution: Starting with RHEL 7, firewalld is introduced and by default the iptables package […]

Filed Under: CentOS/RHEL 7

UNIX / Linux : Examples of bash history command to repeat last commands

by admin

One of the extensively used command in UNIX world is the history command. Every flavor of UNIX has the history command. The bash shell stores a history of commands entered, which can be used to repeat commands by using the history command. By default, it’ll show the previous 1000 commands that were used. Here’s a […]

Filed Under: Linux

« Previous Page
Next Page »

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright