Main Menu
- Home
- Kubernetes
- Containerization Stack (DevOps)
- Oracle Cloud Native Environment (OCNE)
- Linux
- Linux "FIND" Command related Articles
- Linux "YUM" Command related Articles
- Linux "PS" Command related Articles
- "AWK" Command related Articles
- Linux "RPM" Command related Articles
- "PING" Command related Articles
- "NTP" related Articles
- Linux Network related Articles and Commands
- Linux Security related Articles
- Linux Troubleshooting Articles
- Linux FILESYSTEM related Articles
- Linux INFINIBAND Network related Articles
- Linux "MOUNT" Command related Articles
- Linux Shell Script Articles
- "BIOS" related Linux Articles
- "NFS" related Articles
- "GREP" Commands related Articles
- Linux "CPU" & "Memory" related Articles
- "SED" Command related Articles
- "SYSTEMCTL" Commands related Articles
- Logical Volumes related Articles
- "TCPDUMPS" related Articles
- GitHub Repositories (tarbots)
- About tarbots
Search
LINUX: Conntrack Commands Cheatsheet (Conntrack to Track Network Connections)
LINUX: DMESG Command To Check the Disk IO Timeout Errors On Hard Drive / Attached Storage Devices
Below command can be used to Check the Disk IO Timeout Errors On Hard Drive / Attached Storage Devices
dmesg -T | egrep -i 'sda|blk_update|I/O error|timed out|reset|pvscsi'
In above command replace sda with the device name you want to check the Disk IO timeout errors.
Note: You can check the devices using "lsblk" command.
Keywords:
timeout time out timing out io ioerror error input output network issue issues disconnect disconnected disconnecting latency slow slowness speed slowly device devices harddrive drive drives attached attaching lun luns iscsi
LINUX: How To Backup and Restore The Data Inside XFS Filesystem on the Linux Hosts?
LINUX: firewall-cmd Command To Add NFS Storage Services To Firewalld Rules
sudo firewall-cmd --reload
LINUX: How to Check If Secure Boot Is Enabled On Linux Host?
mokutil --sb-state
Keywords
secureboot booting secure kernel linux host hosts enable enabled enabling
LINUX: How to Generate Hashed / Encrypted Passwords Using OpenSSL?
LINUX: Chpasswd One Line Command To Update Password Without Prompt To Enter Password (Passwd)
Below chpasswd command can be used. Change username with the username to which you want to change password and password with the desired password you want to test.
echo "username:password" | chpasswd
For e.g. to change admin user password to testpwd, your command will look as follows
echo "admin:testpwd" | chpasswd
Keywords:
passwords changing modify modifying update updating oneline single
LINUX: How To Check All The Supported Filesystem On the Operating System / Kernel?
LINUX: Command To Check Maximum Kernel Threads On OS (How To Docs)
PODMAN: Curl Command To List Container Images And Their Tags From Podman Private Registry Running On Remote Host
LINUX: Command To List All the Sudo Users and Their Sudo Permissions
Redhat Enterprise Linux 8: Kickstart Installation File For Installing RHEL8
Rocky Linux 8: Kickstart File For Installing Rocky Linux 8 (Github)
LINUX: How to Create Two or More Custom Partitions From Single Attached Disk (FDISK)
LINUX: How To Add User to Sudoers With NOPASSWD Without Editing /etc/sudoers File?
echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$USER
echo "appuser ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/appuser
LINUX: How To Enable Debug Logging In Linux For Sudo (Sudoers, Sudo Users)?
Debug sudo /var/log/sudo_debug.log all@debug
Debug sudoers.so /var/log/sudo_debug.log all@debug
Defaults log_input, log_output
Mar 8 16:03:54 sudo[6337] <- sudo_new_key_val_v1 @ ./key_val.c:55 := user=olcne
Mar 8 16:03:54 sudo[6337] user_info: user=olcne
Mar 8 16:03:54 sudo[6337] sudo_getpwnam: user olcne [] -> uid 975 [] (cached)
Mar 8 16:03:54 sudo[6337] sudo_get_gidlist: looking up group-IDs for olcne
Mar 8 16:03:54 sudo[6337] sudo_get_gidlist: user olcne has supplementary gid 974
Mar 8 16:03:54 sudo[6337] /etc/sudoers.d/olcne:3: CMNDALIAS ALIAS = COMMAND
Mar 8 16:03:54 sudo[6337] /etc/sudoers.d/olcne:4: WORD(6) ALL = ( WORD(6) : ALL ) NOPASSWD ALIAS
Mar 8 16:03:54 sudo[6337] user olcne matches sudoers user olcne: true @ userpw_matches() ./match.c:498
Mar 8 16:03:54 sudo[6337] user command "/etc/olcne/scripts/olcne-image-exists container-registry.oracl
e.com/olcne/kube-scheduler:v1.29.14" matches sudoers command "/etc/olcne/scripts/": true @ command_matc
hes() ./match_command.c:672
Mar 8 16:03:54 sudo[6337] userspec matched @ /etc/sudoers.d/olcne:4:49: allowed @ sudoers_lookup_check
() ./parse.c:170
Mar 8 16:03:54 sudo[6337] keep USER=olcne: NO
Mar 8 16:03:54 sudo[6337] keep HOME=/home/olcne: NO
Mar 8 16:03:54 sudo[6337] keep LOGNAME=olcne: NO
Mar 8 16:03:54 sudo[6337] sudo_putenv:
Key Words:
LINUX: XFS Command To Check the Label of the XFS Mount / Partition
# xfs_admin -l /dev/nbd0p1
# xfs_admin -l /dev/nbd0p1label = "test-label"
LINUX: How to Write Linux ISO To USB Drive In Macbook Using "DD" Command?
/dev/disk4 (external, physical):#: TYPE NAME SIZE IDENTIFIER0: FDisk_partition_scheme *31.0 GB disk41: Apple_HFS Untitled 31.0 GB disk4s1
# sudo diskutil unmount /dev/disk4s1Below is console snippet.
# sudo diskutil unmount /dev/disk4s1Volume Untitled on disk4s1 unmounted
# sudo dd if=Linux.iso of=/dev/disk4s1 conv=fsync oflag=direct status=progress
# sudo dd if=Rocky-8.10-x86_64-dvd1.iso of=/dev/disk4s1 conv=fsync oflag=direct status=progress
88080896 bytes (88 MB, 84 MiB) transferred 26.003s, 3387 kB/s
# sudo dd if=Linux9.iso of=/dev/disk4s1 conv=fsync oflag=direct status=progress
14211072512 bytes (14 GB, 13 GiB) transferred 3620.013s, 3926 kB/s 27761408+0 records in27761408+0 records out14213840896 bytes transferred in 3620.559391 secs (3925869 bytes/sec)
# diskutil eject /dev/disk4s1Disk /dev/disk4s1 ejected
ORACLE LINUX 8: How to Uninstall UEK Kernel and Make Redhat Compatible Kernel (RHCK) Default Boot Kernel?
Following are steps to Uninstall UEK Kernel and Make Redhat Compatible Kernel (RHCK) Default Boot Kernel in Oracle Linux 8 (OL8)
1) List the currently installed kernels using "rpm -qa" command as shown below.
As we can see we have both Oracle UEK7 kernel 5.15.x and RHCK kernel 4.18.x installed.
# rpm -qa | egrep -i kernel
kernel-tools-libs-4.18.0-553.34.1.el8_10.x86_64
kernel-core-4.18.0-553.34.1.el8_10.x86_64
kernel-uek-core-5.15.0-304.171.4.el8uek.x86_64
kernel-headers-4.18.0-553.34.1.el8_10.x86_64
kernel-tools-4.18.0-553.34.1.el8_10.x86_64
kernel-uek-5.15.0-304.171.4.el8uek.x86_64
kernel-uek-modules-5.15.0-304.171.4.el8uek.x86_64
kernel-modules-4.18.0-553.34.1.el8_10.x86_64
kernel-devel-4.18.0-553.34.1.el8_10.x86_64
kernel-uek-devel-5.15.0-304.171.4.el8uek.x86_64
kernel-4.18.0-553.34.1.el8_10.x86_64
2) List the grub order of the Kernels using grubby command as shown below. In below command it will show the ordering of the kernel, starting line with 0 and then increment. As you can see in below output boot order 0 is for UEK kernel 5.15.x and boot order 1 is for RHCK kernel 4.18.x
#sudo grubby --info=ALL | grep title | nl -v 0
0 title="Oracle Linux Server (5.15.0-304.171.4.el8uek.x86_64 with Unbreakable Enterprise Kernel) 8.10"
1 title="Oracle Linux Server (4.18.0-553.34.1.el8_10.x86_64) 8.10"
title="Oracle Linux Server 8 (0-rescue-b5bf925c42f4075a28da8441ac55fcdf) "
3) List default bootup kernel using grubby command as follows. As you can see default bootup kernel is UEK7 kernel 5.15.
#sudo grubby --default-kernel
/boot/vmlinuz-5.15.0-304.171.4.el8uek.x86_64
4) Change the default kernel to RHCK kernel using grubby command and order number corresponding to RHCK kernel from above step (2). In this case RHCK kernel boot order is 1.
# sudo grub2-set-default 1
5) Verify that the default kernel changed to RHCK kernel.
# sudo grubby --default-kernel
/boot/vmlinuz-4.18.0-553.34.1.el8_10.x86_64
6) Now reboot the Node using reboot command.
#sudo reboot -n
7) After the reboot log back into the node and check the default kernel as follows. You should see default kernel as RHCK kernel.
#sudo grubby --default-kernel
/boot/vmlinuz-4.18.0-553.34.1.el8_10.x86_64
8) Check whether the currently active kernel is RHCK kernel using uname command as follows:
#uname -r
4.18.0-553.34.1.el8_10.x86_64
9) Now remove kernel-uek* packages to uninstall UEK kernel as follows:
#sudo dnf -y remove kernel-uek*
10) Backup /etc/sysconfig/kernel file. And update the file to change below DEFAULTKERNEL line
From
DEFAULTKERNEL=kernel-core
To
DEFAULTKERNEL=kernel
11) Reboot the VM again and log back in.
- - -
Keywords added for Search:
uninstallation
LINUX: How to Connect to Remote Host via Alias Name Using SSH Config File
Following steps for Connecting to Remote Host via Alias Name Using SSH Config File.
All below steps have to be executed on Linux host from which you want to connect to remote server using alias name
NOTE: Please note that below steps can also be applied on MacBook Mac OS terminal as well.
1) create config file inside .ssh folder of user home.
mkdir ~/.ssh/config
2) Edit the ~/.ssh/config file as follows:Host <alias name>
HostName <IP/hostname>
User <username>
ProxyCommand nc -X connect -x <proxy> %h %p
ServerAliveInterval <internal>
- <alias name> with the alias name you want to use to server you want to connect for e.g. testmachine
- <IP/hostname> with the hostname/ip of remote server for e.g. 10.10.10.10
- <Username> with the username of the remote server for e.g. appuser
- <proxy> replace it with the proxy details if any. If no proxy you can remove this line.
- <internal> with the ServerAliveInterval in seconds. You can skip this flag as well.
ssh <alias name>