คำสั่งพื้นฐาน AlmaLinux 8.5

Link

อัพเดท

$ sudo yum update

whoami

$ whoami
jack
$ sudo whoami
root
$ su root
Password:
# whoami
root

Repository

ดู repository ทั้งหมด

$ yum repolist all
repo id                                          repo name                                                      status
appstream                                        AlmaLinux 8 - AppStream                                        enabled
appstream-debuginfo                              AlmaLinux 8 - AppStream debuginfo                              disabled
appstream-source                                 AlmaLinux 8 - AppStream Source                                 disabled
baseos                                           AlmaLinux 8 - BaseOS                                           enabled
baseos-debuginfo                                 AlmaLinux 8 - BaseOS debuginfo                                 disabled
baseos-source                                    AlmaLinux 8 - BaseOS Source                                    disabled
extras                                           AlmaLinux 8 - Extras                                           enabled
extras-debuginfo                                 AlmaLinux 8 - Extras debuginfo                                 disabled
extras-source                                    AlmaLinux 8 - Extras Source                                    disabled
...

ดู repository เฉพาะที่ enabled

$ yum repolist enabled
repo id                                              repo name
appstream                                            AlmaLinux 8 - AppStream
baseos                                               AlmaLinux 8 - BaseOS
extras                                               AlmaLinux 8 - Extras

ดู IP Address

$ ifconfig
$ ip -br a

Host Names

$ hostnamectl
   Static hostname: localhost.localdomain
         Icon name: computer-vm
           Chassis: vm
        Machine ID: c6c8f39ae3af4fe5b1e4deb9821ceb99
           Boot ID: 2eee3cee87074946b2a6854883030838
    Virtualization: oracle
  Operating System: AlmaLinux 8.5 (Arctic Sphynx)
       CPE OS Name: cpe:/o:almalinux:almalinux:8::baseos
            Kernel: Linux 4.18.0-348.el8.x86_64
      Architecture: x86-64

Set All the Host Names

$ sudo hostnamectl set-hostname name