RHEL7 My CheatSheet
RHEL7 My CheatSheet
SYSTEM BASICS
View subscription information subscription-manager identity
sosreport
View system profile dmidecode
lshw
nmcli
Configure network nmtui
nm-connection-editor
timedatectl
Configure time and date date
timedatectl
Synchronize time and date /etc/chrony.conf
BASIC CONFIGURATION
Configure keyboard localectl
smbclient
Configure samba /etc/samba/smb.conf
smbpasswd
/etc/ssh/ssh_config
Configure SSH /etc/ssh/sshd_config
~/.ssh/config ssh-keygen
/etc/rsyslog.conf
/etc/rsyslog.d/*.conf
Configure logging /var/log/journal
systemd-journald.service
systemctl -at service
List all services ls /etc/systemd/system/*.service
ls /usr/lib/systemd/system/*.service
List running services systemctl -t service –state=active
systemctl start name.service
Start/stop service systemctl stop name.service
/var/log
View logs journalctl
cron
Schedule tasks at
JOBS AND SERVICES
tar
cpio
Create archive zip
gzip
bzip2
/etc/default/grub
KERNEL, BOOT, AND HARDWARE
sysctl -a
View kernel parameters cat /proc/cmdline
rpm -q kernel
View kernel version uname -r
yum install
Install software yum group install
yum info
View software info yum group info
/etc/selinux/config
chcon
Configure system restorecon
Security semanage
setsebool
system-config-selinux
AND IDENTITY
Report on system
sealert
Security
SECURITY
authconfig
LDAP, SSSD, Kerberos authconfig-tui
authconfig-gtk
usermod
View user account details /etc/passwd
usermod
USER MANAGEMENT
groupmod
Change group permissions /etc/sudoers
Encrypted password
/etc/shadow
Location
View/end user sessions w
pvcreate
Create physical volume ssm create (if backend is lvm)
vgcreate
Create volume group ssm create (if backend is lvm)
lvcreate
Create logical volume ssm create (if backend is lvm)
/etc/exports
Configure NFS share systemctl reload nfs.service
lvdisplay
lvs
vgdisplay
View logical volume info vgs
pvdisplay
pvs
showmount -e
View NFS share mount
Automatically /etc/auto.master.d/*.autofs
mount after boot /etc/auto.*
chmod
chown
Change file permissions chgrp
umask
Change access setfacl
control list
View access
getfacl
control list
firewall-cmd
Configure firewall firewall-config
dhcpd
Configure DHCP client /etc/dhcp/dhcpd.conf
/etc/sysconfig/dhcpd
/etc/hosts
Configure name
/etc/resolv.conf
Resolution nmcli con mod
hostnamectl
Configure hostname /etc/hostname
nmtui
ip addr
nmcli dev show
View network interface info teamdctl
brctl
bridge
/etc/sysconfig/network-scripts/ifcfg-*
nmcli con [add|mod|edit]
Configure network interface nmtui
nm-connection-editor
NETWORKING
ss
View ports/sockets lsof
/etc/sysconfig/network
Configure routes system-config-network
top
ps
sar
iostat
View system usage ss
vmstat
mpstat
numastat
tuna
df
View disk usage
RESOURCE MANAGEMENT
iostat
nice
Change process priority renice
kill
Kill a process pkill
killall