Professional Documents
Culture Documents
RHEL 567 Commands Cheatsheet PDF
RHEL 567 Commands Cheatsheet PDF
rhn_register
Configure subscription rhnreg_ks 6
subscription-manager
subscription-manager 2
7
rhn_register 3
sosreport
dmidecode 5
hwbrowser
ip addr
Find file in rpm -qf filename
5 6 7 ifconfig 5 6
package yum provides filename-glob brctl
View network ip addr
View software rpm -q packagename 5 6 7 interface info nmcli dev show
version teamdctl 7
brctl
View installed rpm -qa
5 6 7 bridge
software yum list installed
/etc/sysconfig/network-scripts/ifcfg-* 5 6
Configure /etc/sysconfig/network-scripts/ifcfg-*
network nmcli con [add|mod|edit]
interface 7
nmtui
USER MANAGEMENT nm-connection-editor
TASK RHEL ss
lsof 5 6
Graphical user View ports/ netstat
system-config-users 5 6 7
management sockets
ss
7
lsof
Create user useradd 5 6 7
account ip route add
system-config-network 5 6
Delete user userdel 5 6 7 /etc/sysconfig/route-iface
account Configure ip route add
routes nmcli
usermod
nmtui 7
View/change user /etc/passwd
5 6 7 nm-connection-editor
account details vipw
/etc/sysconfig/route-iface
id
View routes ip route 5 6 7
Create user group groupadd 5 6 7
/etc/syslog.conf 5
/etc/rsyslog.conf 6
chkconfig --list
5 6
ls /etc/init.d/
List all services systemctl -at service
ls /etc/systemd/system/*.service 7
ls /usr/lib/systemd/system/*.service
service --status-all 5 6
List running services
systemctl -t service --state=active 7
service name start
5 6
service name stop
Start/stop service
systemctl start name.service
7
systemctl stop name.service
chkconfig name on
5 6
chkconfig name off
Enable/disable service
systemctl enable name.service
7
systemctl disable name.service
chkconfig --add 5 6
Create new service file or modify
configuration systemctl daemon-reload
7
/etc/systemd/system/*.service
runlevel
5 6
who -r
View run level/target
systemctl get-default
7
who -r
/etc/inittab
5 6
init run_level
Change run level/target
systemctl isolate name.target
7
systemctl set-default
/var/log 5 6
View logs /var/log
7
journalctl
cron
Schedule/batch tasks at 5 6 7
batch
tar
Create archive cpio 5 6 7
zip
FILE SYSTEMS, VOLUMES, AND DISKS
TASK RHEL
ext3 5
fdisk
5 6
parted
mount
5 6
/etc/fstab
Mount storage mount
/etc/fstab 7
ssm mount
pvcreate 5 6
Create physical volume pvcreate
7
ssm create (if backend is lvm)
vgcreate 5 6
Create volume group vgcreate
7
ssm create (if backend is lvm)
lvcreate 5 6
Create logical volume lvcreate
7
ssm create (if backend is lvm)
vgextend
lvextend 5 6
resize2fs
Enlarge volumes formatted with
default file system vgextend
lvextend
7
xfs_growfs
ssm resize
resize2fs
lvreduce 5 6
Shrink volumes formatted with vgreduce
default file system
XFS cannot currently be shrunk; copy desired data to
7
a smaller file system.
fsck 5 6
Check/repair file system fsck
7
ssm check
/etc/exports
5 6
service nfs reload
Configure NFS share
/etc/exports
7
systemctl reload nfs.service
/etc/fstab
Mount and activate swap swapon -a
5 6 7
lvdisplay
lvs
vgdisplay
View logical volume info vgs
5 6 7
pvdisplay
pvs
showmount -e
View NFS share 5 6 7
mount
/etc/auto.master.d/*.autofs
Configure on-demand auto-mounts /etc/auto.*
5 6 7
chmod
chown 5 6 7
Change file permissions chgrp
umask (future file creation)
shutdown 5 6
Shut down system shutdown
systemctl shutdown 7
poweroff 5 6
Power off system poweroff
7
systemctl poweroff
halt 5 6
Halt system halt
7
systemctl halt
reboot 5 6
Reboot system reboot
7
systemctl reboot
/etc/inittab 5 6
Configure default run level/target
systemctl set-default 7
/boot/grub/grub.conf 5 6
hwbrowser 5
View hardware configured
lshw (in EPEL) 6 7
sysctl -a
View kernel parameters cat /proc/cmdline
5 6 7
rpm -q kernel
View kernel version uname -r
5 6 7
11/14
Copyright 2014 Red Hat, Inc. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, 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.