Delete Set public Set private Add tags Delete tags
  Add tag   Cancel
  Delete tag   Cancel
  • • DevOps notes •
  •  
  • AI
  • Tags
  • Login
1 result tagged environment

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

  • RHCSA
  • systeminfo
  • root
  • recovery
  • environment
  • variables
  • RHCSA
  • systeminfo
  • root
  • recovery
  • environment
  • variables

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 e → edit boot params
  3. Add rd.break at end of kernel line
  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

2 weeks ago Permalink
cluster icon
  • User management : Essential Commands: useradd, groupadd, userdel, groupdel, usermod Modify 3 files: /etc/passwd, /etc/group, /etc/shadow Create User with Custom O...
  • Process monitoring : ps Command ps → Current shell process status ps -E → All running processes ps aux → All in BSD style with details ps -EF → Running process with detai...
  • Linux File Ownership, ACLs, and I/O Redirects : File Ownership chown → Change ownership chgrp → Change group Access Control List (ACL) setfacl → Set file ACL getfacl → Get file ACL Add Permissi...
  • Disk usage, logging, shutdown, hostname : Disk and Memory Info df → disk partition info df -h → human-readable format du → size of file/directory free → memory info cat /proc/cpuinfo → CPU in...
  • Navigating File System / Linux filetypes : ls -l → List pwd → Print working directory dr-xr-xr-x | directories -rw-r--r-- | file Linux File Types Symbol Type - Regular file d Dire...


(14)
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