RHEL


  1.  

  1. pwd → Show current directory

  2. ls → List files

  3. ls -l → Long listing

  4. ls -a → Show hidden files

  5. cd /home → Change directory

  6. cd .. → Go up one level

  7. mkdir test → Create directory

  8. rmdir test → Remove empty directory

  9. touch file.txt → Create empty file

  10. cp file1 file2 → Copy file

  11. mv file1 file2 → Move/rename file

  12. rm file.txt → Delete file

  13. rm -r dir → Delete directory recursively

  14. find / -name file.txt → Search file

  15. tree → Show directory tree

  16. whoami → Show current user

  17. id → Show user ID info

  18. who → Show logged-in users

  19. w → Show active users

  20. adduser user1 → Add user

  21. passwd user1 → Set password

  22. usermod -aG wheel user1 → Add user to group

  23. groups user1 → Show groups

  24. deluser user1 → Delete user

  25. su user1 → Switch user

    • Command: lsblk Notes: Lists block devices (disks, partitions).

    • Command: df -h Notes: Shows mounted filesystems and usage.

    • Command: sudo fdisk -l Notes: Lists disk partitions.

    • Command: du -sh /dir Notes: Shows total size of a directory.

    • Command: mount /dev/sdb1 /mnt Notes: Mounts a disk partition to a directory.

    • Command: umount /mnt Notes: Unmounts a mounted filesystem.

    • Command: blkid Notes: Displays UUIDs and filesystem types.

    • Command: parted /dev/sdb Notes: Partition management tool.

     CPU & Memory

    • Command: lscpu Notes: Shows CPU architecture and details.

    • Command: cat /proc/cpuinfo Notes: Detailed CPU info per core.

    • Command: free -h Notes: Displays memory usage in human-readable format.

    • Command: cat /proc/meminfo Notes: Detailed memory statistics.

    • Command: vmstat Notes: Shows CPU, memory, and I/O statistics.

     Networking

    • Command: ip addr Notes: Shows IP addresses of interfaces.

    • Command: ping google.com Notes: Tests connectivity.

    • Command: traceroute google.com Notes: Shows path packets take.

    • Command: netstat -tulnp Notes: Lists listening ports and processes.

    • Command: ss -tulnp Notes: Modern socket statistics.

    • Command: curl example.com Notes: Fetches webpage content.

    User & Permissions

    • Command: whoami Notes: Shows current logged-in user.

    • Command: id Notes: Displays UID/GID info.

    • Command: useradd student Notes: Creates a new user.

    • Command: passwd student Notes: Sets password for user.

    • Command: chmod 755 file.sh Notes: Changes file permissions.

    • Command: chown user:group file.txt Notes: Changes file owner and group.

     Services & Logs

    • Command: systemctl start httpd Notes: Starts Apache service.

    • Command: systemctl stop httpd Notes: Stops Apache service.

    • Command: systemctl status httpd Notes: Shows service status.

    • Command: journalctl -u httpd Notes: Displays logs for Apache service.

    • Command: tail -f /var/log/messages Notes: Shows live system logs.



Checking Hardware Configuration in RHEL

CPU Information

  • Command: lscpu Notes: Shows CPU architecture, cores, threads, speed.

  • Command: cat /proc/cpuinfo Notes: Detailed info per processor core.

Memory Information

  • Command: free -h Notes: Displays total, used, free memory (human-readable).

  • Command: cat /proc/meminfo Notes: Detailed memory statistics.

Disk & Storage

  • Command: lsblk Notes: Lists block devices (disks, partitions).

  • Command: df -h Notes: Shows mounted filesystems and usage.

  • Command: sudo fdisk -l Notes: Lists disk partitions.

PCI & USB Devices

  • Command: lspci Notes: Lists PCI devices (network card, graphics card).

  • Command: lsusb Notes: Lists USB devices.

System Information

  • Command: uname -a Notes: Kernel and OS details.

  • Command: sudo dmidecode | less Notes: BIOS, motherboard, and system info.

All-in-One Tools

  • Command: inxi -Fx Notes: Full hardware summary (if installed).

  • Command: sudo hwinfo Notes: Detailed hardware report (if installed).



Comments

Popular posts from this blog

Computer Networking (N+)

COMPUTER HARDWARE

Operating System (OS)