You are on page 1of 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 Hat’s 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 sosreport version teamdctl 7
dmidecode RESOURCE MANAGEMENT brctl
6 7 View installed rpm -qa
lstopo 5 6 7 bridge
TASK RHEL
lscpu software yum list installed
/etc/sysconfig/network-scripts/ifcfg-* 5 6
top
View RHEL version information /etc/redhat-release 5 6 7 ps Configure /etc/sysconfig/network-scripts/ifcfg-*
sar network nmcli con [add|mod|edit]
7
iostat
netstat 5 USER MANAGEMENT interface nmtui
vmstat nm-connection-editor
TASK RHEL
BASIC CONFIGURATION mpstat
ss
numastat
TASK RHEL Graphical user system-config-users 5 6 7
lsof 5 6
View ports/ netstat
top management
system-config-* 5 6 ps sockets
ss
Graphical configuration tools sar
Create user 7
iostat useradd 5 6 7 lsof
gnome-control-center 7
netstat account
6 ip route add
system-config-network 5 6 View system usage ss
vmstat Delete user system-config-network 5 6
userdel 5 6 7 /etc/sysconfig/route-iface
Configure network nmcli mpstat account
nmtui 7 numastat Configure ip route add
nm-connection-editor tuna usermod routes nmcli
top View/change user /etc/passwd
5 6 7 nmtui 7
system-config-language 5 6
Configure system language ps account details vipw nm-connection-editor
localectl 7 sar id /etc/sysconfig/route-iface
iostat
system-config-date ss 7 Create user group groupadd 5 6 7 View routes ip route 5 6 7
5 6 vmstat
date
Configure time and date mpstat
Delete user group groupdel 5 6 7
timedatectl numastat
7
date
tuna SECURITY AND IDENTITY
Change group groupmod
5 6 7
df 5 details /etc/group TASK RHEL
ntpdate
5 6
/etc/ntp.conf View disk usage df
iostat 6 7 Change user /etc/selinux/config
Synchronize time and date passwd 5 6 7
timedatectl password chcon
/etc/chrony.conf 7 Trace system calls strace 5 6 7 Configure system restorecon
5 6 7
ntpdate Change user usermod security semanage
5 6 7 setsebool
Trace library calls ltrace 5 6 7 permissions visudo
system-config-keyboard 5 6 system-config-selinux
Configure keyboard
localectl 7 Change process nice Change group groupmod
renice 5 6 7 5 6 7 Report on system
priority permissions visudo sealert 5 6 7
Text-based configuration tools system-config-*-tui 5 6 7 security
Change process taskset Change password
Configure printer system-config-printer 5 6 7 5 6 7 chage 5 6 7 authconfig
run location policy LDAP, SSSD, authconfig-tui 5 6 7
/etc/ssh/ssh_config Kerberos authconfig-gtk
kill
Configure SSH /etc/ssh/sshd_config 5 6 7 Kill a process pkill 5 6 7 View user w 5 6 7
~/.ssh/config ssh-keygen killall 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 5 6
service name status 5 6 Shut down system shutdown
/etc/fstab 7
View service status
systemctl status name.service 7 ssm mount poweroff 5 6

pvcreate 5 6
Power off system poweroff
chkconfig name --list 5 6 7
Check if service is enabled Create physical volume
systemctl poweroff
systemctl is-enabled name 7 pvcreate
7 halt 5 6
ssm create (if backend is lvm)
chkconfig --add 5 6
Create new service file or Halt system halt
vgcreate 5 6 7
modify configuration systemctl daemon-reload systemctl halt
7
/etc/systemd/system/*.service Create volume group vgcreate
7 reboot 5 6
ssm create (if backend is lvm)
runlevel
5 6 Reboot system reboot
who -r lvcreate 5 6 7
View run level/target systemctl reboot
systemctl get-default
7 Create logical volume lvcreate
who -r 7 /etc/inittab 5 6
ssm create (if backend is lvm) Configure default run level/target
/etc/inittab systemctl set-default 7
5 6 vgextend
init run_level 5 6
lvextend /boot/grub/grub.conf 5 6
Change run level/target resize2fs
systemctl isolate name.target /etc/default/grub
7 Enlarge volumes formatted Configure GRUB bootloader
systemctl set-default vgextend grub2-mkconfig 7
with default file system
lvextend grub-set-default
/var/log 5 6 7
xfs_growfs
View logs /var/log ssm resize hwbrowser 5
7 View hardware configured
journalctl
resize2fs lshw (in EPEL) 6 7
add audit=1 to kernel cmdline lvreduce 5 6
Shrink volumes formatted vgreduce Configure kernel module modprobe 5 6 7
auditctl
/etc/audit/auditd.conf with default file system
XFS cannot currently be shrunk; copy Configure hardware device udev 5 6 7
Configure system audit /etc/audit/audit.rules 5 6 7 7
desired data to a smaller file system.
authconfig sysctl -a
View kernel parameters cat /proc/cmdline
5 6 7
/etc/pam.d/system-auth fsck 5 6
pam_tty_audit kernel module
Check/repair file system fsck Load kernel module modprobe 5 6 7
7
View audit output aureport /var/log/faillog 5 6 7 ssm check
Remove kernel module modprobe -r 5 6 7
cron /etc/exports
5 6
Schedule/batch tasks at 5 6 7 service nfs reload rpm -q kernel
Configure NFS share View kernel version uname -r
5 6 7
batch /etc/exports
7
5 6 7 systemctl reload nfs.service
Find file by name locate
/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 04/17

showmount -e Copyright © 2017 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.

You might also like