Anda di halaman 1dari 2

RED HAT ENTERPRISE LINUX 5, 6, AND 7 SOFTWARE MANAGEMENT NETWORKING

Common administrative commands TASK RHEL TASK RHEL

yum install iptables and ip6tables


5 6 5
yum groupinstall /etc/sysconfig/ip*tables
1 Be aware of potential issues when using subscription-manager
SYSTEM BASICS on Red Hat Enterprise Linux 5: https://access.redhat.com/ Install software iptables and ip6tables
solutions/129003. yum install Configure
7 /etc/sysconfig/ip*tables 6
TASK RHEL 2 Subscription-manager is used for Satellite 6, Satellite 5.6 with yum group install firewall system-config-firewall
SAM and newer, and Red Hats CDN.
/etc/sysconfig/rhn/systemid 5 yum info firewall-cmd
3 RHN tools are deprecated on Red Hat Enterprise Linux 7. 5 6 7
rhn_register should be used for Satellite server 5.6 and newer yum groupinfo firewall-config
/etc/sysconfig/rhn/systemid View software
View subscription information 6 only. For details, see: Satellite 5.6 unable to register RHEL 7
subscription-manager identity
client system due to rhn-setup package not included in
info yum info /etc/hosts
7 5 6
Minimal installation (https://access.redhat.com/ Configure /etc/resolv.conf
subscription-manager identity 7 yum group info
solutions/737373) name /etc/hosts
rhn_register
5 Update software yum update 5 6 7 resolution /etc/resolv.conf 7
subscription-manager 1 nmcli con mod
Upgrade software yum upgrade 5 6 7
rhn_register /etc/sysconfig/network 5 6
Configure subscription rhnreg_ks 6 Configure
subscription-manager
Configure subscription-manager repos
hostnamectl
software 5 6 7 hostname /etc/hostname 7
/etc/yum.repos.d/*.repo
subscription-manager 2 repository nmtui
7
rhn_register 3 ip addr
Find file in rpm -qf filename
5 6 7 ifconfig 5 6
sosreport package yum provides filename-glob brctl
dmidecode 5
View network ip addr
hwbrowser View software rpm -q packagename 5 6 7 interface info nmcli dev show
View system profile version
sosreport
RESOURCE MANAGEMENT teamdctl 7
dmidecode brctl
6 7 View installed rpm -qa
lstopo TASK RHEL 5 6 7 bridge
lscpu software yum list installed
top /etc/sysconfig/network-scripts/ifcfg-* 5 6
ps Configure
View RHEL version information /etc/redhat-release 5 6 7
sar /etc/sysconfig/network-scripts/ifcfg-*
iostat
network nmcli con [add|mod|edit]
5 interface 7
netstat nmtui
vmstat USER MANAGEMENT nm-connection-editor
mpstat
BASIC CONFIGURATION numastat TASK RHEL ss
lsof 5 6
TASK RHEL top Graphical user View ports/
system-config-users 5 6 7 netstat
ps management sockets
system-config-* 5 6 sar ss
Graphical configuration tools 7
iostat lsof
gnome-control-center 7 netstat Create user useradd 5 6 7
6 account
system-config-network 5 6 View system usage ss ip route add
vmstat system-config-network 5 6
Configure network nmcli mpstat Delete user userdel 5 6 7 /etc/sysconfig/route-iface
numastat account
nmtui 7 tuna
Configure ip route add
nm-connection-editor routes nmcli
usermod
top nmtui 7
system-config-language 5 6 ps View/change user /etc/passwd
5 6 7 nm-connection-editor
Configure system language sar account details vipw
localectl 7 /etc/sysconfig/route-iface
iostat id
ss 7
system-config-date View routes ip route 5 6 7
5 6 vmstat 5 6 7
date mpstat
Create user group groupadd
Configure time and date numastat
timedatectl tuna Delete user group groupdel 5 6 7
7
date
df 5 Change group groupmod
SECURITY AND IDENTITY
ntpdate 5 6 7
5 6 View disk usage df details /etc/group TASK RHEL
/etc/ntp.conf 6 7
iostat
Synchronize time and date timedatectl Change user /etc/selinux/config
passwd 5 6 7
Trace system calls strace 5 6 7 password chcon
/etc/chrony.conf 7
ntpdate
Configure system restorecon
5 6 7
Trace library calls ltrace 5 6 7 Change user usermod security semanage
5 6 7 setsebool
system-config-keyboard 5 6 permissions visudo
Configure keyboard Change process nice system-config-selinux
localectl 7 renice 5 6 7
priority Change group groupmod
5 6 7 Report on system
Text-based configuration tools system-config-*-tui 5 6 7 permissions visudo sealert 5 6 7
Change process security
taskset 5 6 7
Configure printer system-config-printer 5 6 7 run location Change password chage 5 6 7 authconfig
policy LDAP, SSSD,
/etc/ssh/ssh_config kill authconfig-tui 5 6 7
Kerberos
Configure SSH /etc/ssh/sshd_config 5 6 7 Kill a process pkill 5 6 7 authconfig-gtk
~/.ssh/config ssh-keygen
killall View user w 5 6 7
sessions Network users getent 5 6 7
JOBS AND SERVICES FILE SYSTEMS, VOLUMES, AND DISKS FILE SYSTEMS, VOLUMES, AND DISKS (CONT.)
TASK RHEL TASK RHEL TASK RHEL

/etc/syslog.conf 5 ext3 5 lvdisplay


lvs
/etc/rsyslog.conf 6 Default file system ext4 6 vgdisplay
View logical volume info 5 6 7
Configure logging /etc/rsyslog.conf xfs 7 vgs
/etc/rsyslog.d/*.conf pvdisplay
7 copy data to new file system pvs
/var/log/journal 5
fsck (look for non-contiguous inodes)
systemd-journald.service
Defragment disk space Configure on-demand /etc/auto.master.d/*.autofs
5 6 7
copy data to new file system
chkconfig --list auto-mounts /etc/auto.*
5 6 fsck (look for non-contiguous inodes) 6 7
ls /etc/init.d/
xfs_fsr chmod
List all services systemctl -at service chown
fdisk Change file permissions 5 6 7
ls /etc/systemd/system/*.service 7 5 6 chgrp
parted
ls /usr/lib/systemd/system/*.service umask (future file creation)
Create/modify disk fdisk
service --status-all 5 6 partitions Change file attributes chattr 5 6 7
List running services gdisk
7
systemctl -t service --state=active 7 parted
Change access control list setfacl 5 6 7
ssm create
service name start
5 6
service name stop mkfs.filesystem_type (ext4, xfs)
Start/stop service 5 6
mkswap
systemctl start name.service
systemctl stop name.service
7 Format disk partition mkfs.filesystem_type (ext4, xfs) KERNEL, BOOT, AND HARDWARE
mkswap 7
chkconfig name on TASK RHEL
5 6 ssm create
chkconfig name off
append 1 or s or init=/bin/bash to kernel cmdline 5 6
Enable/disable service mount
systemctl enable name.service 5 6 Single user/rescue mode
7 /etc/fstab append rd.break or init=/bin/bash to kernel cmdline 7
systemctl disable name.service
Mount storage mount shutdown 5 6
service name status 5 6 /etc/fstab 7
View service status Shut down system shutdown
systemctl status name.service 7 ssm mount 7
systemctl shutdown
chkconfig name --list 5 6 pvcreate 5 6
Check if service is enabled poweroff 5 6
systemctl is-enabled name 7 Create physical volume pvcreate
7 Power off system poweroff
ssm create (if backend is lvm) 7
chkconfig --add 5 6 systemctl poweroff
Create new service file or vgcreate 5 6
modify configuration systemctl daemon-reload halt 5 6
7
/etc/systemd/system/*.service Create volume group vgcreate Halt system
7 halt
ssm create (if backend is lvm) 7
runlevel systemctl halt
5 6
who -r lvcreate 5 6
View run level/target reboot 5 6
systemctl get-default
7 Create logical volume lvcreate Reboot system reboot
who -r 7 7
ssm create (if backend is lvm) systemctl reboot
/etc/inittab vgextend
5 6 /etc/inittab 5 6
init run_level lvextend 5 6 Configure default run level/target
Change run level/target resize2fs systemctl set-default 7
systemctl isolate name.target
7 Enlarge volumes formatted
systemctl set-default vgextend /boot/grub/grub.conf 5 6
with default file system
lvextend
/var/log 5 6 7 /etc/default/grub
xfs_growfs Configure GRUB bootloader
View logs grub2-mkconfig 7
/var/log ssm resize
7 grub-set-default
journalctl
resize2fs
lvreduce 5 6
hwbrowser 5
add audit=1 to kernel cmdline
Shrink volumes formatted View hardware configured
auditctl vgreduce lshw (in EPEL) 6 7
/etc/audit/auditd.conf with default file system
XFS cannot currently be shrunk; copy
Configure system audit /etc/audit/audit.rules 5 6 7 7 Configure kernel module modprobe 5 6 7
desired data to a smaller file system.
authconfig
/etc/pam.d/system-auth fsck 5 6
Configure hardware device udev 5 6 7
pam_tty_audit kernel module
Check/repair file system fsck sysctl -a
7 View kernel parameters cat /proc/cmdline
5 6 7
View audit output aureport /var/log/faillog 5 6 7 ssm check

cron /etc/exports Load kernel module modprobe 5 6 7


5 6
Schedule/batch tasks at 5 6 7 service nfs reload
Configure NFS share Remove kernel module modprobe -r 5 6 7
batch /etc/exports
7 rpm -q kernel
systemctl reload nfs.service
Find file by name locate 5 6 7 View kernel version uname -r
5 6 7
/etc/fstab
Find file by characteristic find 5 6 7 Mount and activate swap swapon -a
5 6 7

tar Configure static mounts /etc/fstab 5 6 7


Create archive cpio 5 6 7
zip View free disk space df 5 6 7 11/14

showmount -e Copyright 2014 Red Hat, Inc. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, and JBoss are
View NFS share mount trademarks of Red Hat, Inc., registered in the U.S. and other countries. Linux is the registered trademark
of Linus Torvalds in the U.S. and other countries.

Anda mungkin juga menyukai