Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
C U S T O M E R (https://access.redhat.com/)
P O R TA L
System basics
Task RHEL5 RHEL6 RHEL7 RHEL8
/etc/sysconfig/rhn/systemid
View subscription subscription-manager
/etc/sysconfig/rhn/systemid subscription-manager
information identity
identity
2
rhn_register subscription-manager
1
Configure subscription rhn_register rhnreg_ks
3
subscription-manager rhn_register
sosreport
sosreport dmidecode
sosreport
dmidecode lstopo
View system profile
dmidecode lscpu
hwbrowser lstopo cat
lscpu /proc/cpuinfo
lshw
Basic configuration
Task RHEL5 RHEL6 RHEL7 RHEL8
nmcli
nmcli
nmtui
Configure network system-config-network nmtui
nm-connection-editor
nm-connection-editor
gnome-control-center
localectl
Configure system language system-config-language localectl
gnome-control-center
https://access.redhat.com/articles/1189123 1/21
4/25/2019 Common administrative commands in Red Hat Enterprise Linux 5, 6, 7, and 8 - Red Hat Customer Portal
C U S T O M E R (https://access.redhat.com/) timedatectl
P O R TA L
system-config-date timedatectl date
Configure time and date
date date
gnome-control-center
timedatectl
timedatectl
ntpdate date
Synchronize time and date /etc/chrony.conf
/etc/ntp.conf /etc/chrony.conf
ntpdate
chronyc
localectl
Configure keyboard system-config-keyboard localectl
gnome-control-center
/etc/ssh/ssh_config
/etc/ssh/sshd_config
Configure SSH
~/.ssh/config
ssh-keygen
systemctl list-units -
systemctl -at service at service
chkconfig --list
ls /etc/systemd/system/*.service find /etc/systemd/
List all services
ls /usr/lib/systemd/
ls /etc/init.d/
/usr/lib/systemd/system/*.service /run/systemd/ -name
*.service"
List running
service --status-all systemctl -t service --state=active
services
View service
service name status systemctl status name.service
status
Check if service
chkconfig name --list systemctl is-enabled name
is enabled
Create new
service file or systemctl daemon-reload
chkconfig --add
modify /etc/systemd/system/*.service
configuration
https://access.redhat.com/articles/1189123 2/21
4/25/2019 Common administrative commands in Red Hat Enterprise Linux 5, 6, 7, and 8 - Red Hat Customer Portal
/etc/rsyslog.conf
Configure /etc/rsyslog.d/*.conf
/etc/syslog.conf /etc/rsyslog.conf
logging /var/log/journal
systemd-journald.service
/var/log
View logs /var/log
journalctl
cron
cron at
Schedule/batch
at batch
tasks
batch systemd-run --on-
calendar
Find file by
locate
name
Find file by
find
characteristic
tar
cpio
Create archive
zip
xz
https://access.redhat.com/articles/1189123 3/21
4/25/2019 Common administrative commands in Red Hat Enterprise Linux 5, 6, 7, and 8 - Red Hat Customer Portal
C U S T O M E R (https://access.redhat.com/) poweroff
Power off system
P O R TA L
poweroff
systemctl poweroff
halt
Halt system halt
systemctl halt
reboot
Reboot system reboot
systemctl reboot
/etc/default/grub
Configure GRUB
/boot/grub/grub.conf grub2-mkconfig
bootloader
grub-set-default
sysctl -a
View kernel parameters
cat /proc/cmdline
rpm -q kernel
View kernel version
uname -r
Software management
Task RHEL5 RHEL6 RHEL7 RHEL8
subscription-manager repos
Configure software repository
/etc/yum.repos.d/*.repo
https://access.redhat.com/articles/1189123 4/21
4/25/2019 Common administrative commands in Red Hat Enterprise Linux 5, 6, 7, and 8 - Red Hat Customer Portal
C U S T O M E R (https://access.redhat.com/)
rpm -qa
View installed software
P O R TA L
yum list installed
User management
Task RHEL5 RHEL6 RHEL7 RHEL7
usermod
/etc/passwd
View/change user account details
vipw
id
groupmod
Change group details
/etc/group
usermod
Change user permissions
visudo
groupmod
Change group permissions
visudo
https://access.redhat.com/articles/1189123 5/21
4/25/2019 Common administrative commands in Red Hat Enterprise Linux 5, 6, 7, and 8 - Red Hat Customer Portal
mount
mount
Mount storage
/etc/fstab
/etc/fstab
ssm mount
/etc/fstab
Mount and activate swap
swapon -a
lvdisplay
lvs
vgdisplay
View logical volume info
vgs
pvdisplay
pvs
pvcreate
Create physical volume pvcreate ssm create (if backend is
lvm)
vgcreate
Create volume group vgcreate ssm create (if backend is
lvm)
lvcreate
Create logical volume lvcreate ssm create (if backend is
lvm)
vgextend
vgextend
Enlarge volumes formatted with lvextend
lvextend
default file system xfs_growfs
resize2fs
ssm resize
https://access.redhat.com/articles/1189123 6/21
4/25/2019 Common administrative commands in Red Hat Enterprise Linux 5, 6, 7, and 8 - Red Hat Customer Portal
C U S T O M E R (https://access.redhat.com/)
resize2fs
Shrink volumes formatted with XFS cannot currently be shrunk; copy desired
P O R TA L lvreduce
default file system data to a smaller file system.
vgreduce
fsck
Check/repair file system fsck
ssm check
showmount -e
View NFS share
mount
/etc/exports /etc/exports
Configure NFS share
service nfs reload systemctl reload nfs.service
chmod
chown
Change file permissions
chgrp
umask (future file creation)
Networking
Task RHEL5 RHEL6 RHEL7 RHEL8
/etc/hosts
Configure name /etc/hosts
/etc/resolv.conf
resolution /etc/resolv.conf
nmcli con mod
hostnamectl
Configure hostname /etc/sysconfig/network /etc/hostname
nmtui
ip addr
ip addr
nmcli dev show
View network interface
teamdctl
info ifconfig
brctl
brctl
bridge
/etc/sysconfig/network-
scripts/ifcfg-*
Configure network
/etc/sysconfig/network-scripts/ifcfg-* nmcli con [add|mod|edit]
interface
nmtui
nm-connection-editor
https://access.redhat.com/articles/1189123 7/21
4/25/2019 Common administrative commands in Red Hat Enterprise Linux 5, 6, 7, and 8 - Red Hat Customer Portal
ss
ss ss lsof
View ports/sockets lsof lsof netstat
netstat netstat pcp-dstat --
socket
/etc/selinux/config
chcon
restorecon
Configure system security
semanage
setsebool
system-config-selinux
authconfig
LDAP, SSSD, Kerberos authconfig-tui authselect
authconfig-gtk
Resource management
Task RHEL5 RHEL6 RHEL7 RHEL8
nice
Change process priority
renice
https://access.redhat.com/articles/1189123 8/21
4/25/2019 Common administrative commands in Red Hat Enterprise Linux 5, 6, 7, and 8 - Red Hat Customer Portal
C U S T O M E R (https://access.redhat.com/)
kill
P O R TA L
Kill a process pkill
killall
pcp-dstat
df pmiostat
View disk usage df
iostat df
iostat
1. Be aware of potential issues when using subscription-manager on Red Hat Enterprise Linux 5:
https://access.redhat.com/solutions/129003 (https://access.redhat.com/solutions/129003). ↩
2. subscription-manager is used for Satellite 6, Satellite 5.6 with SAM and newer, and Red Hat's CDN.
↩
3. 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: What's the difference between management services provided by Red Hat Network
(RHN) Classic and Red Hat Customer Portal Subscription Management/RHSM?
(https://access.redhat.com/articles/63269), Transition of Red Hat Network Classic Hosted to Red Hat Subscription
Management (https://access.redhat.com/rhn-to-rhsm), and Satellite 5.6 unable to register RHEL 7 client system
due to rhn-setup package not included in Minimal installation (https://access.redhat.com/solutions/737373). ↩
Attachments
- rhel_5_6_7_cheatsheet_24x36_0417_ jcs.pdf (/node/1189123/40/0/13536301)
- rhel_5_6_7_cheatsheet_11x17_0417_ jcs.pdf (/node/1189123/40/1/13536301)
Table of Contents
No
Product(s) Red Hat Enterprise Linux (/taxonomy/products/red-hat-enterprise-linux) Category Migrate (/category/migrate)
rhel_7 (/taxonomy/tags/rhel7)
https://access.redhat.com/articles/1189123 9/21
4/25/2019 Common administrative commands in Red Hat Enterprise Linux 5, 6, 7, and 8 - Red Hat Customer Portal
C U S T O M E R (https://access.redhat.com/)
P O R TA L
69 Comments
617 Points
David Winters
PRO
617 Points
https://access.redhat.com/articles/1189123 10/21
4/25/2019 Common administrative commands in Red Hat Enterprise Linux 5, 6, 7, and 8 - Red Hat Customer Portal
617 Points
C U S T O M E R (https://access.redhat.com/)
P O R TA L
27 September 2015 11:11 PM (https://access.redhat.com/articles/1189123#comment-969553)
12 Points
36 Points
5 Points
5 Points
https://access.redhat.com/articles/1189123 11/21
4/25/2019 Common administrative commands in Red Hat Enterprise Linux 5, 6, 7, and 8 - Red Hat Customer Portal
(/user/9773)One of our graphic designers is working on some more compact versions as I type; I'll see what we can
C U S T O M E R (https://access.redhat.com/)
RED HAT
wrangle. P O R TA L
PRO
617 Points
15 Points
617 Points
15 Points
5 Points
12 Points
https://access.redhat.com/articles/1189123 12/21
4/25/2019 Common administrative commands in Red Hat Enterprise Linux 5, 6, 7, and 8 - Red Hat Customer Portal
30 Points
C U S T O M E R (https://access.redhat.com/)
P O R TA L
21 October 2014 12:56 PM (https://access.redhat.com/articles/1189123#comment-838233)
SR sreeni_konduru (/user/2852713)
(/user/2852713)
helpfull to bootstrap RHEL 7, thanks
NEWBIE
5 Points
From what I've seen/heard of 8, I'm questioning if Red Hat has lost the script. It's been my preferred
enterprise distro for years because it did what it does very well with rock solid dependability and a core
focus. Maybe its time to split into a few products and introduce a RHEL Classic with all the flavour your
remember from way back when.
https://access.redhat.com/articles/1189123 13/21
4/25/2019 Common administrative commands in Red Hat Enterprise Linux 5, 6, 7, and 8 - Red Hat Customer Portal
Of course the natural response to my statement might be "but we don't want/have the time!" ... To which I
C U S T O M E R (https://access.redhat.com/)
can only say:
P ORHEL6
R TA L isn't going anywhere.
PS regarding upstart in RHEL6: I can see why you'd say that Red Hat's implementation was non-intrusive -- after
all we kept the whole SysV init rc structure completely intact! Keep in mind however that in doing so we didn't
take advantage of any of the job-control or event-based parallelization features upstart had to offer. It was great
that most people didn't have to learn anything new, but most people also didn't notice any improvement over init
from RHEL5.
22 Points
On the plus side, this documentation -- both in this format and the PDF poster size was done very weel. It
certainly will allow anyone who uses their own automation scripts and tools to discover the command line
equivalents quickly and update their scripts to avoid the very commands being replaced and their new
replacements.
P.S. The 27" x 36" = 7 sq foot and depending on the FedEx/Kinko's will cost $5.25 to print out ($0.75/sq
foot).
https://access.redhat.com/articles/1189123 14/21
4/25/2019 Common administrative commands in Red Hat Enterprise Linux 5, 6, 7, and 8 - Red Hat Customer Portal
(/user/246453)
Thank you for this very well documented quick cheat sheet, it is really appreciated. It will be handy soon
C U S T O M E R (https://access.redhat.com/)
COMMUNITY when we are
P Oto goL to RHEL 7.
R TA
MEMBER
22 Points I have a request however, would it be possible to have this document also in a printable format, the way it
currently is showing here above, but one that can actually download so that it would be easily referred to
when we do not have access to the web? The printable poster version is really nice as well, but our multi-
function printer can only support up to 11" x 17" and even at that size the print is really small to read!
617 Points
22 Points
617 Points
22 Points Thank you again for all your help with this, this document will be very handy going on to RHEL 7.
617 Points
https://access.redhat.com/articles/1189123 15/21
4/25/2019 Common administrative commands in Red Hat Enterprise Linux 5, 6, 7, and 8 - Red Hat Customer Portal
22 Points
C U S T O M E R (https://access.redhat.com/)
P O R TA L
4 November 2014 5:35 PM (https://access.redhat.com/articles/1189123#comment-846273)
LT Larry Timmins (/user/2174583)
(/user/2174583)
Hi Laura,
ACTIVE Thanks for providing the updated version. I was able to print the A3 version using 'Fit' option from Adobe
CONTRIBUTOR
Acrobat to normal 8.5 x 11 paper.
109 Points
While there is certainly a need for A4, A3 and other metric standards, why isn't there an equal need for Red
Hat to provide a standard US Letter and/or US Legal format?
The tough thing about Excellence is thinking it through and getting it right.
premchand.singh@velocis.in (/user/27993)
(/user/27993)
Very Nice document, helpful in quickly understand & learning.
COMMUNITY
MEMBER
Thank you.
45 Points
16 Points
31 Points
PRO
617 Points
https://access.redhat.com/articles/1189123 16/21
4/25/2019 Common administrative commands in Red Hat Enterprise Linux 5, 6, 7, and 8 - Red Hat Customer Portal
RED HAT
Just letting you know that there's now a multi-page version of the 'poster', so you can download and print a
C U S T O M E R (https://access.redhat.com/)
PRO nicely formatted
P O R TAversion
L at home. This should work nicely on A3 and A4.
617 Points
PRO
617 Points
31 Points
PRO
617 Points
PRO
617 Points
https://access.redhat.com/articles/1189123 17/21
4/25/2019 Common administrative commands in Red Hat Enterprise Linux 5, 6, 7, and 8 - Red Hat Customer Portal
(/user/9773)catch on this.
RED HAT
PRO
617 Points
31 Points
7 Points
32 Points
PRO If there are any commands you want added, just let me know, and I'll see about getting them added.
617 Points
I think you might be talking about the commands that are the same in RHEL 5 and RHEL 6, though — the
current Portal style doesn't include vertical table dividers. I have a bug raised to help with this, but in the
mean time, check out the downloadable PDF files — I think these are much clearer at the moment.
Cheers,
Laura B
https://access.redhat.com/articles/1189123 18/21
4/25/2019 Common administrative commands in Red Hat Enterprise Linux 5, 6, 7, and 8 - Red Hat Customer Portal
When you start to taking things from a desktop OS and implementing them on a server OS, you might be
C U S T O M E R (https://access.redhat.com/)
asking for trouble.
P O R TA L Microsoft found out the hard way (ie., Start Menu) that wasn't the best idea. In my
experience a desktop OS and server OS should not be mixed.
A server has one purpose....To serve.... It is not a desktop.
I know that things need to change, but changing things just because somebody didn't like the way it was in
RHEL5/6 for the sake of change to me doesn't make sense. You mentioned in a previous post that things
need to evolve. I agree, but part of evolution is learning that somethings don't work and aren't as efficient as
some might think. I know that RHEL7 is still an infant yet and still has some maturing to do.
Cheers,
PRO Glad you're finding the posters useful. I think the comment on evolution was actually from another Red
617 Points Hatter, but to your point: I agree! For a change to stick, it needs to be useful to the rest of the 'organism' — or
in this case, its users.
Is there anything you're finding particularly difficult (or nonsensical) to adjust to?
Cheers,
Laura B
2116
Points
Is it mandatory to evaluate the OS versions for using knowledgebase? Anyone has any idea of a RH archive
with technical documentation?
Tnx all!
32 Points
https://access.redhat.com/articles/1189123 19/21
4/25/2019 Common administrative commands in Red Hat Enterprise Linux 5, 6, 7, and 8 - Red Hat Customer Portal
15 July 2016 1:27 PM (https://access.redhat.com/articles/1189123#comment-1072711)
C U S T O M E R (https://access.redhat.com/)
Jörg Kastning
P O R(/user/13546641)
TA L
(/user/13546641)
Hello,
GURU
In the attachment "rhel_5_6_7_cheatsheet_a4_1114_ jcs.pdf" on the last page is the command "systemctl
1645
Points shutdown" mentioned for RHEL 7. But this command is not available in at least RHEL 7.2.
rhn-support-sgilson1 (/user/8396753)
(/user/8396753)
Jörg thanks for the note, good catch. We'll queue up a correction to show which versions of RHEL support
RED HAT
the "poweroff" command.
NEWBIE
19 Points
22 Points
7 Points
25 Points
7 Points
(/user/753723)
lshw is part of the rhel-7-server-rpms repository, you do not need EPEL anymore on RHEL 7.
GURU
7111 Points
https://access.redhat.com/articles/1189123 20/21
4/25/2019 Common administrative commands in Red Hat Enterprise Linux 5, 6, 7, and 8 - Red Hat Customer Portal
8 April 2019 9:26 AM (https://access.redhat.com/articles/1189123#comment-1493481)
C U S T O M E R (https://access.redhat.com/)
ir. Jan Gerrit
P OKootstra
R TA L (/user/753723) Community Leader
(/user/753723)
Hi Laura,
GURU
Can we expect a printable poster ones RHEL 8 has become GA?
7111 Points
Regards,
Jan Gerrit
617 Points
https://access.redhat.com/articles/1189123 21/21