12132017Headline:

RHEL 5 vs RHEL 7 comparision

Command changes for common tasks

System basics

Task RHEL5 RHEL7
View subscription information /etc/sysconfig/rhn/systemid subscription-manager identity
Configure subscription rhn_register subscription-manager
rhn_register
View system profile sosreport
dmidecode
hwbrowser
sosreport
dmidecode
lstopo
lscpu

Basic configuration

Task RHEL5 RHEL7
Graphical configuration tools system-config-* gnome-control-center
Configure network system-config-network nmcli
nmtui
nm-connection-editor
Configure system language system-config-language localectl
Configure time and date system-config-date
date
timedatectl
date
Synchronize time and date ntpdate
/etc/ntp.conf
timedatectl
/etc/chrony.conf
ntpdate
Configure keyboard system-config-keyboard localectl

Jobs and services

Task RHEL5 RHEL7
List all services chkconfig –list
ls /etc/init.d/
systemctl -at service
ls /etc/systemd/system/*.service
ls /usr/lib/systemd/system/*.service
List running services service –status-all systemctl -t service –state=active
Start/stop service service name start
service name stop
systemctl start name.service
systemctl stop name.service
Enable/disable service chkconfig name on
chkconfig name off
systemctl enable name.service
systemctl disable name.service
View service status service name status systemctl status name.service
Check if service is enabled chkconfig name –list systemctl is-enabled name
Create new service file or modify configuration chkconfig –add systemctl daemon-reload
/etc/systemd/system/*.service
View run level/target runlevel
who -r
systemctl get-default
who -r
Change run level/target /etc/inittab
init run_level
systemctl isolate name.target
systemctl set-default
Configure logging /etc/syslog.conf /etc/rsyslog.conf
/etc/rsyslog.d/*.conf
/var/log/journal
systemd-journald.service
View logs /var/log /var/log
journalctl

Kernel, boot, and hardware

Task RHEL5 RHEL7
Single user/rescue mode append 1 or s or init=/bin/bash to kernel cmdline append rd.break or init=/bin/bash to kernel cmdline
Shut down system shutdown shutdown
systemctl shutdown
Power off system poweroff poweroff
systemctl poweroff
Halt system halt halt
systemctl halt
Reboot system reboot reboot
systemctl reboot
Configure default run level/target /etc/inittab systemctl set-default
Configure GRUB bootloader /boot/grub/grub.conf /etc/default/grub
grub2-mkconfig
grub-set-default
View hardware configured hwbrowser lshw (in EPEL)

Software management

Task RHEL5 RHEL7
Install software yum install
yum groupinstall
yum install
yum group install
View software info yum info
yum groupinfo
yum info
yum group info

File systems, volumes, and disks

Task RHEL5 RHEL7
Default file system ext3 xfs
Create/modify disk partitions fdisk
parted
fdisk
gdisk
parted
ssm create
Format disk partition mkfs.filesystem_type (ext4, xfs)
mkswap
mkfs.filesystem_type (ext4, xfs)
mkswap
ssm create
Defragment disk space copy data to new file system
fsck (look for ‘non-contiguous inodes’)
copy data to new file system
fsck (look for ‘non-contiguous inodes’)
xfs_fsr
Mount storage mount
/etc/fstab
mount
/etc/fstab
ssm mount
Create physical volume pvcreate pvcreate
ssm create (if backend is lvm)
Create volume group vgcreate vgcreate
ssm create (if backend is lvm)
Create logical volume lvcreate lvcreate
ssm create (if backend is lvm)
Enlarge volumes formatted with default file system vgextend
lvextend
resize2fs
vgextend
lvextend
xfs_growfs
ssm resize
Shrink volumes formatted with default file system resize2fs
lvreduce
vgreduce
XFS cannot currently be shrunk; copy desired data to a smaller file system.
Check/repair file system fsck fsck
ssm check
Configure NFS share /etc/exports
service nfs reload
/etc/exports
systemctl reload nfs.service

Networking

Task RHEL5 RHEL7
Configure name resolution /etc/hosts
/etc/resolv.conf
/etc/hosts
/etc/resolv.conf
nmcli con mod
Configure hostname /etc/sysconfig/network hostnamectl
/etc/hostname
nmtui
View network interface info ip addr
ifconfig
brctl
ip addr
nmcli dev show
teamdctl
brctl
bridge
Configure network interface /etc/sysconfig/network-scripts/ifcfg-* /etc/sysconfig/network-scripts/ifcfg-*
nmcli con [add|mod|edit]
nmtui
nm-connection-editor
Configure routes ip route add
system-config-network
/etc/sysconfig/route-iface
ip route add
nmcli
nmtui
nm-connection-editor
/etc/sysconfig/route-iface
Configure firewall iptables and ip6tables
/etc/sysconfig/ip*tables
firewall-cmd
firewall-config
View ports/sockets ss
lsof
netstat
ss
lsof

Resource management

Task RHEL5 RHEL7
View system usage top
ps
sar
iostat
netstat
vmstat
mpstat
numastat
top
ps
sar
iostat
ss
vmstat
mpstat
numastat
tuna
View disk usage df df
iostat

What Next

Recent Articles

Leave a Reply

Submit Comment