You are on page 1of 1

RED HAT ENTERPRISE LINUX 5, 6, AND 7 KERNEL, BOOT, AND HARDWARE

Common administrative commands TASK

Single user/rescue mode


append 1 or s or init=/bin/bash to kernel cmdline
RHEL

5 6

append rd.break or init=/bin/bash to kernel cmdline 7

shutdown 5 6
SYSTEM BASICS JOBS AND SERVICES Shut down system shutdown
7
systemctl shutdown
TASK RHEL TASK RHEL
poweroff 5 6
/etc/sysconfig/rhn/systemid 5 /etc/syslog.conf 5
Power off system poweroff
View subscription /etc/sysconfig/rhn/systemid /etc/rsyslog.conf 6 systemctl poweroff
7
6
information subscription-manager identity
Configure logging /etc/rsyslog.conf halt 5 6
subscription-manager identity 7 /etc/rsyslog.d/*.conf 7 Halt system
/var/log/journal halt
rhn_register 7
5 systemd-journald.service systemctl halt
subscription-manager 1
chkconfig --list reboot 5 6
rhn_register 5 6
ls /etc/init.d/
Configure subscription rhnreg_ks 6 Reboot system reboot
subscription-manager List all services systemctl -at service 7
systemctl reboot
ls /etc/systemd/system/*.service 7
subscription-manager 2 7
ls /usr/lib/systemd/system/*.service Configure default run /etc/inittab 5 6
rhn_register 3
service --status-all 5 6 level/target systemctl set-default 7
sosreport List running services
dmidecode 5 systemctl -t service --state=active 7 /boot/grub/grub.conf 5 6
hwbrowser
service name start 5 6 Configure GRUB bootloader /etc/default/grub
View system profile sosreport service name stop grub2-mkconfig 7
dmidecode Start/stop service grub-set-default
6 7 systemctl start name.service
lstopo 7
lscpu systemctl stop name.service hwbrowser 5
View hardware configured
chkconfig name on lshw (in EPEL) 6 7
View RHEL version 5 6
/etc/redhat-release 5 6 7 chkconfig name off
information Enable/disable service Configure kernel module modprobe 5 6 7
systemctl enable name.service
7
1 Be aware of potential issues when using subscription-manager on Red Hat Enterprise Linux 5: https://access.
systemctl disable name.service Configure hardware device udev 5 6 7
redhat.com/solutions/129003.
service name status 5 6 sysctl -a
2 Subscription-manager is used for Satellite 6, Satellite 5.6 with SAM and newer, and Red Hat’s CDN. View service status View kernel parameters cat /proc/cmdline
5 6 7
3 RHN tools are deprecated on Red Hat Enterprise Linux 7. rhn_register should be used for Satellite server 5.6 and systemctl status name.service 7
newer only. For details, see: Satellite 5.6 unable to register RHEL 7 client system due to rhn-setup package not
chkconfig name --list 5 6
Load kernel module modprobe 5 6 7
included in Minimal installation (https://access.redhat.com/solutions/737373)
Check if service is enabled
systemctl is-enabled name 7 Remove kernel module modprobe -r 5 6 7

chkconfig --add 5 6 rpm -q kernel


Create new service file or View kernel version uname -r
5 6 7

modify configuration systemctl daemon-reload


BASIC CONFIGURATION /etc/systemd/system/*.service
7

TASK RHEL runlevel


who -r
5 6 FILE SYSTEMS, VOLUMES, AND DISKS
Graphical configuration system-config-* 5 6 View run level/target TASK RHEL
systemctl get-default
tools 7
gnome-control-center 7 who -r
ext3 5
system-config-network 5 6 /etc/inittab
init run_level
5 6 Default file system ext4 6
Configure network nmcli Change run level/target xfs 7
nmtui 7 systemctl isolate name.target 7
nm-connection-editor systemctl set-default copy data to new file system
5
fsck (look for ‘non-contiguous inodes’)
Configure system system-config-language 5 6 /var/log 5 6
Defragment disk space
language localectl 7 View logs /var/log
copy data to new file system
7 fsck (look for ‘non-contiguous inodes’) 6 7
journalctl
xfs_fsr
system-config-date
5 6
date add audit=1 to kernel cmdline fdisk
Configure time and date auditctl parted
5 6
timedatectl /etc/audit/auditd.conf
7
date Configure system audit /etc/audit/audit.rules 5 6 7 Create/modify disk
fdisk
authconfig partitions gdisk
ntpdate /etc/pam.d/system-auth 7
5 6 parted
/etc/ntp.conf pam_tty_audit kernel module
Synchronize time ssm create
and date timedatectl
View audit output aureport /var/log/faillog 5 6 7 mkfs.filesystem_type (ext4, xfs)
/etc/chrony.conf 7 5 6
mkswap
ntpdate
cron
Format disk partition
system-config-keyboard 5 6 Schedule/batch tasks at 5 6 7 mkfs.filesystem_type (ext4, xfs)
mkswap 7
Configure keyboard batch
localectl 7 ssm create
Find file by name locate 5 6 7
mount
Text-based /etc/fstab
5 6
system-config-*-tui 5 6 7
configuration tools Find file by characteristic find 5 6 7
Mount storage mount
Configure printer system-config-printer 5 6 7 tar /etc/fstab 7
Create archive cpio 5 6 7 ssm mount
/etc/ssh/ssh_config zip
Configure SSH /etc/ssh/sshd_config 5 6 7 pvcreate 5 6
~/.ssh/config ssh-keygen Create physical volume pvcreate
NETWORKING ssm create (if backend is lvm)
7

RESOURCE MANAGEMENT TASK RHEL


vgcreate 5 6
Create volume group vgcreate
iptables and ip6tables 7
TASK RHEL 5 ssm create (if backend is lvm)
/etc/sysconfig/ip*tables
top lvcreate 5 6
ps iptables and ip6tables
sar Configure firewall /etc/sysconfig/ip*tables 6 Create logical volume lvcreate
system-config-firewall 7
iostat ssm create (if backend is lvm)
5
netstat
firewall-cmd vgextend
vmstat 7
firewall-config lvextend 5 6
mpstat
numastat resize2fs
/etc/hosts Enlarge volumes formatted
5 6
/etc/resolv.conf
top with default file system vgextend
ps Configure name resolution /etc/hosts
lvextend
7
sar xfs_growfs
/etc/resolv.conf 7
iostat ssm resize
nmcli con mod
netstat
6 resize2fs
View system usage ss /etc/sysconfig/network 5 6
vmstat lvreduce 5 6
Shrink volumes formatted vgreduce
mpstat Configure hostname hostnamectl
numastat /etc/hostname 7 with default file system
XFS cannot currently be shrunk; copy desired data
tuna nmtui 7
to a smaller file system.
top ip addr
fsck 5 6
ps ifconfig 5 6
sar brctl Check/repair file system fsck
iostat 7
ssm check
ss 7 View network interface info ip addr
vmstat nmcli dev show /etc/exports
mpstat teamdctl 7 5 6
service nfs reload
numastat brctl Configure NFS share
tuna bridge /etc/exports
7
systemctl reload nfs.service
df 5 /etc/sysconfig/network-scripts/ifcfg-* 5 6
/etc/fstab
View disk usage df /etc/sysconfig/network-scripts/ifcfg-* Mount and activate swap 5 6 7
6 7 Configure network interface nmcli con [add|mod|edit]
swapon -a
iostat 7
nmtui
Configure static mounts /etc/fstab 5 6 7
Trace system calls strace 5 6 7 nm-connection-editor

ss View free disk space df 5 6 7


Trace library calls ltrace 5 6 7 lsof 5 6
netstat lvdisplay
nice View ports/sockets lvs
Change process priority renice
5 6 7
ss vgdisplay
lsof
7 View logical volume info vgs
5 6 7
Change process run taskset
pvdisplay
5 6 7 ip route add
location pvs
system-config-network 5 6
/etc/sysconfig/route-iface showmount -e
kill View NFS share mount
5 6 7
Kill a process pkill 5 6 7
killall Configure routes ip route add
nmcli Configure on-demand /etc/auto.master.d/*.autofs
nmtui 7 5 6 7
auto-mounts /etc/auto.*
nm-connection-editor
USER MANAGEMENT /etc/sysconfig/route-iface
chmod
chown
View routes ip route 5 6 7 Change file permissions chgrp
5 6 7
TASK RHEL
umask (future file creation)
Graphical user
system-config-users 5 6 7 Change file attributes chattr 5 6 7
management SOFTWARE MANAGEMENT
Create user account useradd 5 6 7
Change access control list setfacl 5 6 7
TASK RHEL

Delete user account userdel 5 6 7 yum install


5 6

usermod Install software


yum groupinstall
SECURITY AND IDENTITY
View/change user /etc/passwd yum install
7
5 6 7 yum group install TASK RHEL
account details vipw
id
yum info /etc/selinux/config
5 6
yum groupinfo chcon
Create user group groupadd 5 6 7
View software info restorecon
yum info Configure system security 5 6 7
7 semanage
Delete user group groupdel 5 6 7 yum group info setsebool
system-config-selinux
Change group details
groupmod
5 6 7 Update software yum update 5 6 7
/etc/group Report on system security sealert 5 6 7
Upgrade software yum upgrade 5 6 7
Change user password passwd 5 6 7 authconfig
Configure software subscription-manager repos LDAP, SSSD, Kerberos authconfig-tui 5 6 7
usermod 5 6 7
Change user permissions visudo
5 6 7 repository /etc/yum.repos.d/*.repo authconfig-gtk

Network users getent 5 6 7


Change group groupmod
5 6 7 Find file in package rpm -qf filename 5 6 7
yum provides filename-glob
permissions visudo

View software version rpm -q packagename 5 6 7 10/14


Change password policy chage 5 6 7
rpm -qa Copyright © 2014 Red Hat, Inc. Red Hat, Red Hat Enterprise Linux, the Shadowman logo,
View user sessions w 5 6 7 View installed software yum list installed
5 6 7 and JBoss are 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