Delete Set public Set private Add tags Delete tags
  Add tag   Cancel
  Delete tag   Cancel
  • • DevOps notes •
  •  
  • AI
  • Tags
  • Login

System information, root recovery, environment variables, shortcuts/shaare/Smd9Aw

  • linux
  • linux

Finding System Information

  • cat /etc/redhat-release → Red Hat version
  • uname -a → Linux hostname, kernel, architecture
  • dmidecode → hardware, BIOS, system info
  • arch → x86_64 or i386/32-bit

Common Keyboard Shortcuts

  • Ctrl + U → erase command line
  • Ctrl + C → stop/kill current command
  • Ctrl + Z → suspend command
  • Ctrl + D → exit interactive session

Record Terminal Session

  • script mylog.log → record shell session

    • Use exit to stop recording

Root Password Recovery

  1. Reboot → enter GRUB menu
  2. Press i → edit boot params in grub, go to line with ro
  3. Add rd.break at end of kernel line (after quiet)
  4. Ctrl + X to boot
  5. Mount root with chroot /sysroot
  6. passwd root → change password
  7. touch /.autorelabel → SELinux relabeling on reboot

View Environment Variables

  • printenv, echo $PATH, echo $SHELL

Set Environment Variables

  • Temporary: export TEST=1, echo $TEST
  • Permanent:

    vi ~/.bashrc
    TEST=123
    export TEST

Global → vi /etc/profile or /etc/bashrc

8 months ago Permalink
cluster icon
  • Podman and Docker : Containers → Podman Podman → manage pods and container images Buildah → building/pushing/signing container images Skopeo → copy/inspect/delete/signin...
  • Linux File Links and Permissions : Links Soft Link (Symbolic Link) ln -s Link will be removed if the original file is removed or renamed. Hard Link ln Deleting, renaming, or moving t...
  • Logical Volume Management (LVM) : LVM (Logical Volume Management) Combine disk together by software Add new HDD on the fly to extend disk space Set LVM in Linux install Desired...
  • Filesystem check and disk cloning : fsck & xfs_repair → filesystem check fsck → ext2, ext3, ext4 xfs_repair → xfs only Made each boot & fix it df -T → check Unmount before fsck ...
  • Networking : Interface configuration files: /etc/nsswitch.conf → where resolve hostname to IP address /etc/hosts → add new IP to resolve /etc/resolv.conf → r...


(97)
Filter untagged links
Fold Fold all Expand Expand all Are you sure you want to delete this link? Are you sure you want to delete this tag? The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community