TASK RHEL5 RHEL6 RHEL7 RED HAT ENTERPRISE LINUX 5, 6, AND 7 Graphical user management system-config-users Create user account useradd
Delete user account userdel
Common administrative commands Change user account details usermod
View user account details usermod /etc/passwd
Create user group groupadd
Delete user group groupdel TASK RHEL5 RHEL6 RHEL7 TASK RHEL5 RHEL6 RHEL7 Change group details groupmod /etc/sysconfig/rhn/systemid /etc/selinux/config View subscription information /etc/sysconfig/rhn/systemid subscription-manager identity subscription-manager identity chcon Change user password passwd username Configure system restorecon
rhn_register 1 security semanage usermod subscription-manager Change user permissions Configure subscription rhn_register rhnreg_ks 2 setsebool /etc/sudoers rhn_register subscription-manager system-config-selinux MANAGEMENT USER Change group permissions groupmod sosreport sosreport Report on system /etc/sudoers sealert View system profile dmidecode dmidecode security hwbrowser lshw Change password policy chage
SECURITY SECURITY authconfig SYSTEM BASICS SYSTEM View RHEL version information /etc/redhat-release LDAP, SSSD, Kerberos authconfig-tui Encrypted password
AND IDENTITY /etc/shadow authconfig-gtk location 1 subscription-manager is used for Satellite 6, Satellite 5.6 with SAM and newer, and Red Hat’s CDN. 2 RHN tools are deprecated on Red Hat Enterprise Linux 7. rhn_register should be used for Satellite server 5.6 and newer only. For details, see: Satellite 5.6 unable to register RHEL 7 client system due to Network users getent View/end user sessions w rhn-setup package not included in Minimal installation
TASK RHEL5 RHEL6 RHEL7 TASK RHEL5 RHEL6 RHEL7
Graphical configuration tools system-config-* gnome-control-center Default file system ext3 ext4 xfs
copy data to new file system nmcli copy data to new file system Configure network Defragment disk space fsck (look for ‘non-contiguous inodes’) system-config-network nmtui fsck (look for ‘non-contiguous inodes’) nm-connection-editor xfs_fsr
Configure system language system-config-language localectl fdisk Create/modify disk fdisk gdisk partitions timedatectl parted parted Configure time and date system-config-date date ssm create
mkfs.filesystem_type (ext4, xfs) ntpdate timedatectl mkfs.filesystem_type (ext4, xfs) Synchronize time and date Format disk partition mkswap /etc/ntp.conf /etc/chrony.conf mkswap ssm create Configure keyboard system-config-keyboard localectl mount mount Mount storage /etc/fstab Text-based configuration tools system-config-*-tui /etc/fstab ssm mount
Configure printer system-config-printer pvcreate Create physical volume pvcreate ssm create (if backend is lvm)
BASIC CONFIGURATION BASIC smbclient Configure samba /etc/samba/smb.conf vgcreate Create volume group vgcreate smbpasswd ssm create (if backend is lvm)
/etc/ssh/ssh_config lvcreate Create logical volume lvcreate Configure SSH /etc/ssh/sshd_config ssm create (if backend is lvm) ~/.ssh/config ssh-keygen vgextend Enlarge volumes vgextend lvextend formatted with default lvextend xfs_growfs file system resize2fs TASK RHEL5 RHEL6 RHEL7 ssm resize
/etc/rsyslog.conf Shrink volumes resize2fs XFS cannot currently be shrunk; copy /etc/rsyslog.d/*.conf formatted with default lvreduce Configure logging /etc/syslog.conf /etc/rsyslog.conf desired data to a smaller file system. /var/log/journal file system vgreduce systemd-journald.service fsck systemctl -at service Check/repair file system fsck chkconfig --list ssm check List all services ls /etc/systemd/system/*.service ls /etc/init.d/ ls /usr/lib/systemd/system/*.service Configure NFS share /etc/exports /etc/exports service nfs reload systemctl reload nfs.service List running services service --status-all systemctl -t service --state=active Mount and activate /etc/fstab Start/stop service service name start systemctl start name.service swap swapon -a service name stop systemctl stop name.service Automatically mount Enable/disable service chkconfig name on systemctl enable name.service at boot /etc/fstab
chkconfig name off systemctl disable name.service DISKS AND VOLUMES, SYSTEMS, FILE View free disk space df View service status service name status systemctl status name.service lvdisplay Check if service is enabled chkconfig name systemctl is-enabled name lvs vgdisplay Create new service file or View logical volume info chkconfig --add systemctl daemon-reload vgs modify configuration pvdisplay pvs View run level/target runlevel systemctl get-default who -r who -r View NFS share showmount -e mount Change run level/target /etc/inittab systemctl isolate name.target init run_level systemctl set-default Automatically /etc/auto.master.d/*.autofs mount after boot /etc/auto.* /var/log View logs /var/log journalctl chmod Change file permissions chown add audit=1 to kernel cmdline chgrp auditctl umask JOBS AND SERVICES /etc/audit/auditd.conf Configure system audit /etc/audit/audit.rules Change access authconfig control list setfacl /etc/pam.d/system-auth pam_tty_audit kernel module
View audit output aureport /var/log/faillog TASK RHEL5 RHEL6 RHEL7
cron iptables and ip6tables Schedule tasks iptables and ip6tables firewall-cmd at Configure firewall /etc/sysconfig/ip*tables /etc/sysconfig/ip*tables firewall-config system-config-firewall Configure batch tasks batch dhcpd /etc/dhcpd.conf Configure DHCP client /etc/dhcp/dhcpd.conf Find file by name locate /etc/dhcp6c.conf /etc/sysconfig/dhcpd Find file by characteristic find /etc/hosts Configure name /etc/hosts /etc/resolv.conf tar resolution /etc/resolv.conf nmcli con mod cpio Create archive zip hostnamectl gzip Configure hostname /etc/sysconfig/network /etc/hostname bzip2 nmtui
ip addr TASK RHEL5 RHEL6 RHEL7 View network interface ip addr nmcli dev show info ifconfig teamdctl brctl brctl append rd.break or init=/bin/bash Single user/rescue mode append 1 or s or init=/bin/bash to kernel cmdline bridge to kernel cmdline NETWORKING /etc/sysconfig/network-scripts/ifcfg-* Shut down system shutdown systemctl shutdown Configure network nmcli con [add|mod|edit] /etc/sysconfig/network-scripts/ifcfg-* interface nmtui Power off system poweroff systemctl poweroff nm-connection-editor
Halt system halt systemctl halt ss ss View ports/sockets lsof lsof Reboot system reboot systemctl reboot netstat
Configure default run level/target /etc/inittab systemctl set-default View routes ip route
/etc/default/grub Configure routes /etc/sysconfig/network Configure GRUB bootloader /boot/grub/grub.conf grub2-mkconfig system-config-network grub-set-default
View hardware configured hwbrowser lshw TASK RHEL5 RHEL6 RHEL7
Configure kernel module modprobe top top top ps ps Configure hardware device udev ps sar sar sar iostat iostat sysctl -a iostat netstat View kernel parameters View system usage ss cat /proc/cmdline netstat ss vmstat vmstat vmstat KERNEL, AND BOOT, HARDWARE mpstat Load kernel module modprobe mpstat mpstat numastat numastat numastat tuna Remove kernel module modprobe -r tuna
df View kernel version rpm -q kernel View disk usage df uname -r iostat
Trace system calls strace
TASK RHEL5 RHEL6 RHEL7 Trace library calls ltrace
yum install yum install Install software Change process priority nice yum groupinstall yum group install renice
View software info yum info yum info Change process run yum groupinfo yum group info RESOURCE MANAGEMENT location taskset Update software yum update kill Kill a process pkill Upgrade software yum upgrade killall
Configure software repository /etc/yum.repos.d/*.repo
SOFTWARE Find file in package rpm -qf filename MANAGEMENT
View software version rpm -q packagename Copyright © 2014 Red Hat, Inc. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, and JBoss are trademarks of Red Hat, Inc., 10/14 registered in the U.S. and other countries. Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries. View installed software rpm -qa