• 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

CentOS/RHEL

How to use perf tool for tracing similar to dtrace

by admin

Basics Perf is useful profiling tool which might be useful to trace kernel/application calls/functions and many more. For example to start perf as a live monitor tool similar to top execute: # perf top It will display performance counters in real time. Example output: PerfTop: 474 irqs/sec kernel:100.0% exact: 0.0% [4000Hz cpu-clock], (all, 6 CPUs) […]

Filed Under: CentOS/RHEL, Fedora, Linux

ldconfig Command Options

by admin

ldconfig command is used to tell the system about new locations of shared libraries, the ldconfig command uses information provided by the /etc/ld.so.conf file. The ldconfig command creates a cache database of all libraries based on the configura- tion file. This cache is normally stored in the /etc/ld.so.cache file. Here is the syntax of the […]

Filed Under: CentOS/RHEL, Fedora, Linux

“cannot install the best update candidate for package” – error on running dnf update

by admin

The Problem Running the ‘dnf update’ command fails with below error: # dnf update Error: Problem 1: package perl-4:5.26.3-419.el8.x86_64 requires perl-interpreter(x86-64) = 4:5.26.3-419.el8, but none of the providers can be installed – cannot install both perl-interpreter-4:5.26.3-419.el8_4.1.x86_64 and perl-interpreter-4:5.26.3-419.el8.x86_64 – cannot install the best update candidate for package perl-interpreter-4:5.26.3-419.el8.x86_64 – cannot install the best update candidate […]

Filed Under: CentOS/RHEL, CentOS/RHEL 7, CentOS/RHEL 8, Linux

ldd Command Options in Linux

by admin

You can see what shared libraries a specific command uses by using the ldd command. Here is the syntax of the ldd command: # ldd [options] FILE For example: # ldd /bin/cp linux-vdso.so.1 => (0x00007ffc35df9000) libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f93faa09000) libacl.so.1 => /lib64/libacl.so.1 (0x00007f93fa800000) libattr.so.1 => /lib64/libattr.so.1 (0x00007f93fa5fa000) libc.so.6 => /lib64/libc.so.6 (0x00007f93fa239000) libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f93f9fd8000) […]

Filed Under: CentOS/RHEL, Fedora, Linux

How To Configure sssd To Work With Multiple Active Directory Domains in Different Forests (CentOS/RHEL)

by admin

This post describes an approach to configuring sssd in order to interact with multiple Active Directory Domains located in different forests. This method involves altering /etc/krb5.conf and /etc/sssd/sssd.conf files. 1. Join the first domain (domain1.com) from the first forest. # realm join –verbose domain1.com -U LinuxAD@DOMAIN1.COM 2. Edit /etc/krb5.conf file and add the secondary domain […]

Filed Under: CentOS/RHEL, CentOS/RHEL 7, CentOS/RHEL 8, Linux

How to remove unwanted entries in /etc/shadow file

by admin

Question: How to remove all the unnecessary user entries in /etc/shadow file? 1. Create a backup copy of /etc/shadow file. # cp -p /etc/shadow /etc/shadow.backup 2. Ensure the user is not existing anymore in /etc/password file. # cat /etc/passwd | grep [userid] 3. Edit the /etc/shadow file, look for the line and remove the unnecessary […]

Filed Under: CentOS/RHEL, Linux

How to run ssh on multiple ports

by admin

Question: How to confgure ssh to run on 2 ports i.e. 22 and 2222. There may be requirements as such above in some environments to run ssh on multiple ports. Well this can be achieved by modifying the /etc/ssh/sshd_config configuration file. The stpes are outlined as below: 1. Edit the sshd configuration file /etc/ssh/sshd_config # […]

Filed Under: CentOS/RHEL, CentOS/RHEL 5, CentOS/RHEL 6, Linux

Bind to port 22 on 0.0.0.0 failed: address already in use – error while starting sshd service CentOS/RHEL

by admin

The Problem Following messages are logged when restarting sshd service in a CentOS/RHEL 5/6 system. Dec 14 00:15:19 geeklab sshd[9182]: Received signal 15; terminating. Dec 14 00:15:19 geeklab sshd[9274]: Server listening on :: port 22. Dec 14 00:15:19 geeklab sshd[9274]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use. The Solution When […]

Filed Under: CentOS/RHEL, CentOS/RHEL 5, CentOS/RHEL 6, Linux

“error: Bind to port 2222 on 0.0.0.0 failed: Permission denied” – error while starting sshd service on CentOS/RHEL

by admin

The Problem On CentOS/RHEL, the OpenSSH SSH Daemon (sshd) utilizes port 22 for incoming connection requests from remote OpenSSH SSH (ssh) and Secure File Transfer (sftp) clients. In some cases, however, System Administrators prefer to utilize separate ports to service ssh and sftp activity. In One such case, system administrator is facing below error while […]

Filed Under: CentOS/RHEL, CentOS/RHEL 5, CentOS/RHEL 6, CentOS/RHEL 7, CentOS/RHEL 8, Linux

Shell Script to Find Network Interface Link Status and Speed (CentOS/RHEL)

by admin

This post provides a sample script detecting which interfaces are configured on the system, and in them, which ones do have their links up and at which speed they are operating. Note, that the reported speed within virtual machines may not be correct. A virtualized network adapter has to pretend to have a “speed” because […]

Filed Under: CentOS/RHEL, Linux

« Previous Page
Next Page »

Primary Sidebar

Recent Posts

  • grpck command – Remove corrupt or duplicate entries in the /etc/group and /etc/gshadow files.
  • xxd command – Expressed in hexadecimal form
  • sesearch: command not found
  • macof: command not found

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright