Sie sind auf Seite 1von 1

Common administrative commands

in Red Hat Enterprise Linux 5, 6, 7, and 8


System basics Kernel, boot, and hardware Basic configuration File systems, volumes, and disks
TASK RHEL TASK RHEL TASK RHEL TASK RHEL

View /etc/sysconfig/rhn/systemid 5 6 append 1 or s or init=/bin/bash Graphical system-config-* 5 6 ext3 5


5 6
subscription to kernel cmdline configuration
Single user/ tools Default file
information subscription-manager identity 6 7 8 gnome-control-center 7 8 ext4 6
rescue mode system
append 1 or s or rd.break or
rhnreg_ks 6 init=/bin/bash to kernel 7 8 Text-based xfs 7 8
cmdline configuration system-config-*-tui 5 6
Configure 1, 3 5 6 7 8 tools ssm create 7
rhn_register
subscription Shut down
shutdown 5 6 7 8
2 system system-config-printer 5 6 7
subscription-manager 6 7 8 Configure gdisk 7 8
printer Create/modify
systemctl poweroff 7 8 gnome-control-center 8 disk partitions
hwbrowser 5 Power off ssm_create 8
system 5 6
poweroff 5 6 7 8 system-config-date
sosreport fdisk
5 6 7 8 5 6 7 8
dmidecode parted
timedatectl 7 8
View system systemctl halt 7 8 Configure time
profile lstopo Halt system and date ssm create 7 8
6 7 8 date 5 6 7 8
lscpu halt 5 6 7 8 Format disk
partition mkfs.filesystem_type (ext4, xfs)
gnome-control-center 8 5 6 7 8
cat/proc/cpuinfo systemctl reboot 7 8 mkswap
8
lshw Reboot system
/etc/ntp.conf 5 6
reboot 5 6 7 8 xfs_fsr 6 7 8
View RHEL 5 6 7
ntpdate Defragment
version /etc/redhat-release 5 6 7 8 Configure /etc/inittab 5 6 copy data to new file system
Synchronize disk space
information default run fsck (look for ‘non-contiguous 5 6 7 8
time and date timedatectl
level/target systemctl set-default 7 8 7 8 inodes’)
/etc/chrony.conf
1 Be aware of potential issues when using subscription-manager on Red Hat Enterprise Linux 5:
https://access.redhat.com/solutions/129003. /boot/grub/grub.conf 5 6 date ssm mount 7 8
Configure 8
2 Subscription-manager is used for Satellite 6, Satellite 5.6 with SAM and newer, and Red chronyc Mount storage
Hat’s CDN. GRUB /etc/default/grub mount
3 RHN tools are deprecated on Red Hat Enterprise Linux 7. rhn_register should be used for bootloader 5 6 7 8
grub2-mkconfig 7 8 system-config-keyboard 5 6 /etc/fstab
Satellite server 5.6 and newer only. For details, see: What subscription management services
grub-set-default
are offered by RHSM?, Transition of Red Hat Network Classic Hosted to Red Hat Configure
Subscription Management, and Satellite 5.6 unable to register RHEL 7 client system due to localectl 7 8 Mount and /etc/fstab
keyboard 5 6 7 8
rhn-setup package not included in Minimal installation. hwbrowser 5 activate swap swapon -a
gnome-control-center 8
View hardware
lshw (in EPEL) 6 7 Configure
configured /etc/fstab 5 6 7 8
/etc/ssh/ssh_config static mounts
lshw 8 /etc/ssh/sshd_config
Configure SSH 5 6 7 8
~/.ssh/config View free disk
df 5 6 7 8
Software management Configure
modprobe 5 6 7 8
ssh-keygen space
kernel module
TASK RHEL lvdisplay
Configure lvs
yum groupinstall 5 6 hardware udev 5 6 7 8 View logical vgdisplay
5 6 7 8
device volume info vgs
Install
yum group install 7 8 pvdisplay
software
View kernel sysctl -a Jobs and services pvs
5 6 7 8
yum install 5 6 7 8 parameters cat /proc/cmdline TASK RHEL
Create ssm create (if backend is lvm) 8
yum groupinfo 5 6 Load kernel physical
chkconfig --list
module
modprobe 5 6 7 8 5 6 volume pvcreate 5 6 7 8
View software ls /etc/init.d/
yum group info 7 8
info
Remove kernel systemctl -at service Create volume
ssm create (if backend is lvm) 8
modprobe -r 5 6 7 8
yum info 5 6 7 8 module ls /etc/systemd/system/*. group
service 7 vgcreate 5 6 7 8
Update View kernel rpm -q kernel List all services
ls /usr/lib/systemd/system/*.
yum update 5 6 7 8 5 6 7 8
software version uname -r service ssm create (if backend is lvm) 8
Create logical
volume
Upgrade systemctl list-units -at lvcreate 5 6 7 8
yum upgrade 5 6 7 8 service
software
find /etc/systemd/ /usr/lib/ 8
resize2fs 5 6
systemd/ /run/systemd/ -name
Configure Enlarge
subscription-manager repos *.service”
software 5 6 7 8 volumes xfs_growfs
repository
/etc/yum.repos.d/*.repo
User management 5 6
formatted with ssm resize
7 8
service --status-all default file
TASK RHEL List running
Find package rpm -qf filename system vgextend
5 6 7 8 services systemctl -t service 5 6 7 8
owning file yum provides filename-glob 7 8 lvextend
Graphical user system-config-users 5 6 7 --state=active
rpm -q packagename 5 6
management
gnome-control-center 8 service name start resize2fs
View software 5 6 lvreduce 5 6
version Start/stop
service name stop Shrink volumes
yum list installed packagename Create user useradd 5 6 7 vgreduce
7 8 service formatted with
rpm -q packagename account
gnome-control-center 8
systemctl start name.service
7 8
default file
systemctl stop name.service system XFS cannot currently be shrunk;
View installed rpm -qa copy desired data to a 7 8
5 6 7 8 userdel 5 6 7
software yum list installed Delete user chkconfig name on smaller file system.
account chkconfig name off
5 6
gnome-control-center 8 Enable/disable
Install a ssm check 8
yum module install module_name 8 service Check/repair
module usermod systemctl enable name.service
7 8 file system
/etc/passwd systemctl disable name.service fsck 5 6 7 8
View/change 5 6 7
View info on a user account vipw
yum module info module_name 8
module details id service name status 5 6 View NFS showmount -e
View service 5 6 7 8
share mount
gnome-control-center 8
status
View a systemctl status name.service 7 8
module’s yum module info module_name 8 service nfs reload 5 6
streams Create user groupadd 5 6 7
Check if chkconfig name --list 5 6
group service is Configure NFS
gnome-control-center systemctl reload nfs.service 7 8
yum module remove
8
enabled 7 8
share
systemctl is-enabled name
Change module_name:stream groupdel 5 6 7 /etc/exports 5 6 7 8
module Delete user
yum module reset module:stream 8 Create new chkconfig --add 5 6
streams group
yum module install gnome-control-center 8 service file Configure
module:new_stream or modify systemctl daemon-reload on-demand
/etc/auto.master.d/*.autofs
8
7 8
groupmod configuration /etc/systemd/system/*.service auto-mounts
/etc/auto.*
Change group 5 6 7
List available /etc/group
yum module list 8 details
modules runlevel 5 6
gnome-control-center 8
chmod
View run level/ Change file chown
7 8 8
passwd 5 6 7 target
systemctl get-default permissions chgrp
Change user umask (future file creation)
password who -r 5 6 7 8
gnome-control-center 8
Change file
chattr 8
Networking Change user
usermod
5 6 7
/etc/inittab
init run_level
5 6 attributes
visudo Change run
TASK RHEL permissions level/target Change access
gnome-control-center 8 systemctl isolate name.target setfacl 8
7 8 control list
nmcli con mod 7 8 systemctl set-default
Configure Change chage 5 6 7
name password
/etc/hosts /etc/syslog.conf 5
resolution 5 6 7 8 policy gnome-control-center
/etc/resolv.conf 8
/etc/rsyslog.conf 6 7 8
Configure
/etc/sysconfig/network 5 6 View user w 5 6 7
logging
Configure
hostnamectl
sessions
gnome-control-center 8
/etc/rsyslog.d/*.conf
/var/log/journal 7 8
Resource management
hostname
/etc/hostname 7 8 systemd-journald.service TASK RHEL
nmtui
journalctl 7 8 Trace system
strace 5 6 7 8
ifconfig 5 6 View logs calls
/var/log 5 6 7 8
nmcli dev show Trace library
View network teamdctl 7 8 Security and identity pam_tty_audit kernel module 5 6 7 calls
ltrace 5 6 7 8
interface info bridge TASK RHEL
tlog 8 Change
nice
ip addr
5 6 7 8 /etc/selinux/config process 5 6 7 8
Configure renice
brctl
chcon add audit=1 to kernel cmdline priority
Configure system audit auditctl
restorecon
nmcli con [add|mod|edit] system 5 6 7 8 /etc/audit/auditd.conf
semanage 5 6 7 8 Change
nmtui 7 8 security /etc/audit/audit.rules
Configure setsebool process run taskset 5 6 7 8
nm-connection-editor authconfig location
network system-config-selinux
/etc/pam.d/system-auth
interface
/etc/sysconfig/network-scripts/ Report on kill
5 6 7 8
ifcfg-*
system View audit aureport Kill a process pkill
sealert 5 6 7 8 5 6 7 5 6 7 8
security output /var/log/faillog killall
View routes ip route 5 6 7 8
cron netstat
authconfig 5 6
system-config-network 5 6 at 5 6 7 8
authconfig-tui 5 6 7 Schedule/
LDAP, SSSD, batch
authconfig-gtk batch tasks ss
nmcli Kerberos 6 7 8
tuna
Configure nmtui 7 8
8
systemd-run --on-calendar 8
authselect
routes nm-connection-editor pcp atop 8
Find file by View system
Network users getent 5 6 7 8 locate 5 6 7 8
ip route add name usage top
5 6 7 8
/etc/sysconfig/route-iface ps
Find file by sar
find 5 6 7 8
iptables and ip6tables characteristic iostat 5 6 7 8
5 6
/etc/sysconfig/ip*tables vmstat
tar mpstat
system-config-firewall 6 cpio numastat
Configure Create archive 5 6 7 8
firewall zip
firewall-cmd xz iostat 6 7 8
7 8
firewall-config
View disk usage pcp-dstat
8
nftables 8 pmiostat

pcp-dstat--socket 8 df 5 6 7 8

View ports/
sockets ss
lsof 5 6 7 8
netstat
5/19

Copyright © 2019 Red Hat, Inc. Red Hat, Red Hat Enterprise Linux, the Red Hat logo, and JBoss are
trademarks or registered trademarks of Red Hat, Inc. or its subsidiaries in the United States and
other countries. Linux ® is the registered trademark of Linus Torvalds in the U.S. and other countries.

Das könnte Ihnen auch gefallen