Rhel 5 6 7 8 Cheatsheet A3 0519 PDF
Rhel 5 6 7 8 Cheatsheet A3 0519 PDF
Rhel 5 6 7 8 Cheatsheet A3 0519 PDF
cat/proc/cpuinfo
xfs_fsr 6 7 8 service name start
lshw 8 5 6
Defragment copy data to new file service name stop
disk space system Start/stop
View RHEL 5 6 7 8 systemctl start name.
fsck (look for ‘non-contig- service service
version /etc/redhat-release 5 6 7 8 uous inodes’) 7 8
systemctl stop name.
information service
ssm mount 7 8
Mount
1 Be aware of potential issues when using subscription-manager on Red storage mount chkconfig name on
5 6
Hat Enterprise Linux 5: https://access.redhat.com/solutions/129003. /etc/fstab 5 6 7 8 chkconfig name off
Enable/
2 Subscription-manager is used for Satellite 6, Satellite 5.6 with SAM disable systemctl enable name.
and newer, and Red Hat’s CDN. Mount and /etc/fstab
5 6 7 8 service service
3 RHN tools are deprecated on Red Hat Enterprise Linux 7. rhn_register activate swap swapon -a
systemctl disable name.
7 8
should be used for Satellite server 5.6 and newer only. For details, see: service
What subscription management services are offered by RHSM?, Configure
Transition of Red Hat Network Classic Hosted to Red Hat Subscription /etc/fstab 5 6 7 8 5 6
static mounts service name status
Management, and Satellite 5.6 unable to register RHEL 7 client system View service
due to rhn-setup package not included in Minimal installation. status systemctl status name.
7 8
View free disk service
df 5 6 7 8
space
Check if chkconfig name --list 5 6
lvdisplay service is
Software management lvs enabled systemctl is-enabled name 7 8
View logical vgdisplay
volume info vgs 5 6 7 8
TASK RHEL Create new chkconfig --add 5 6
pvdisplay
pvs service file systemctl daemon-reload
yum groupinstall 5 6 or modify /etc/systemd/system/*. 7 8
Install Create ssm create (if backend is
8
configuration service
yum group install 7 8 lvm)
software physical
volume runlevel 5 6
yum install 5 6 7 8 pvcreate 5 6 7 8
View run
systemctl get-default 7 8
yum groupinfo 5 6 ssm create (if backend is level/target
Create volume lvm) 8
who -r 5 6 7 8
View software group
yum group info 7 8
info vgcreate 5 6 7 8 /etc/inittab
init run_level 5 6
yum info 5 6 7 8 ssm create (if backend is
8
Change run
Create logical lvm) level/target systemctl isolate name.
Update volume target 7 8
yum update 5 6 7 8
software lvcreate 5 6 7 8 systemctl set-default
resize2fs 5 6 /etc/syslog.conf 5
Upgrade Enlarge
yum upgrade 5 6 7 8
software volumes xfs_growfs /etc/rsyslog.conf 6 7 8
formatted 7 8 Configure
ssm resize
with default logging /etc/rsyslog.d/*.conf
Configure subscription-manager
file system vgextend /var/log/journal 7 8
software repos 5 6 7 8 lvextend 5 6 7 8 systemd-journald.service
repository /etc/yum.repos.d/*.repo
resize2fs journalctl 7 8
Shrink 5 6 View logs
Find package rpm -qf filename
volumes
lvreduce
5 6 7 8 vgreduce /var/log 5 6 7 8
owning file yum provides filename-glob
formatted
with default XFS cannot currently be pam_tty_audit kernel
5 6 7
rpm -q packagename 5 6 file system shrunk; copy desired data 7 8 module
to a smaller file system.
View software yum list installed tlog 8
version ssm check 8
packagename 7 8 Check/repair Configure add audit=1 to kernel
rpm -q packagename file system system audit cmdline
fsck 5 6 7 8
auditctl
View installed rpm -qa
View NFS
/etc/audit/auditd.conf 5 6 7 8
5 6 7 8 showmount -e
software yum list installed
share mount 5 6 7 8 /etc/audit/audit.rules
authconfig
/etc/pam.d/system-auth
Install a yum module install service nfs reload 5 6
8
module module_name View audit aureport
Configure systemctl reload nfs. 5 6 7
7 8 output /var/log/faillog
NFS share service
View info on a yum module info
8
module module_name /etc/exports 5 6 7 8 cron
Schedule/ at 5 6 7 8
batch
View a Configure /etc/auto.master.d/*. batch tasks
yum module info
module’s 8 on-demand autofs 8 systemd-run --on-calendar 8
module_name
streams auto-mounts /etc/auto.*
Find file by locate 5 6 7 8
yum module remove chmod name
chown
module_name:stream Change file
Change chgrp 8
yum module reset permissions Find file by
module 8 umask (future file find 5 6 7 8
streams module:stream creation) characteristic
yum module install
module:new_stream Change file tar
chattr 8
attributes Create archive cpio
5 6 7 8
zip
List available yum module list 8 xz
modules Change
access setfacl 8
control list
Basic configuration Kernel, boot, and hardware Security and identity
TASK RHEL TASK RHEL TASK RHEL
ip route add
Change
/etc/sysconfig/route-iface
5 6 7 8 process run taskset 5 6 7 8
location
iptables and ip6tables
5 6
/etc/sysconfig/ip*tables kill
Kill a process pkill 5 6 7 8
Configure system-config-firewall 6 killall
firewall firewall-cmd
7 8
netstat 5 6
firewall-config
ss
nftables 8 tuna 6 7 8
iostat 6 7 8
df 5 6 7 8
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.