Friday, April 9, 2010

RHCE "Cheat Sheet"

SkyHi @ Friday, April 09, 2010
This document attempts to provide answers to all study points on the RHCE and RHCT Exam Preparation Guide in a single-page (and thus, printable) format. This is not a “brain dump” or an attempt to cheat the RH302 exam in any way. These are just my self-study notes. Use them at your own risk.

:!: Note: Study points last updated on 2009-08-11. This list may become out of date without notice (especially after I pass the test ;-)).
Testing Environment with Sun VirtualBox

install guest additions:

yum install gcc kernel-devel
sh /media/VBOXADDITIONS*/VBoxLinuxAdditions-x86.run
reboot

Prerequisite skills for RHCT and RHCE

Candidates should possess the following skills, as they may be necessary in order to fulfill requirements of the RHCT and RHCE exams:
use standard command line tools (e.g., ls, cp, mv, rm, tail, cat, etc.) to create, remove, view, and investigate files and directories
use grep, sed, and awk to process text streams and files
use a terminal-based text editor, such as vim or nano, to modify text files
use input/output redirection
operator description
> redirect STDOUT to a file
2> redirect STDERR to a file
&> redirect all output to a file
2>&1 redirect all output to a pipe

*
use » to append instead of overwrite

understand basic principles of TCP/IP networking, including IP addresses, netmasks, and gateways for IPv4 and IPv6
use su to switch user accounts

su -

use passwd to set passwords

passwd

use tar, gzip, and bzip2

# compress (tar/gzip)
tar cvzf .tgz

# extract (tar/gzip)
tar xvzf .tgz

# compress (tar/bzip)
tar cvjf .tbz

# extract (tar/bzip)
tar xvjf .tbz

configure an email client on Red Hat Enterprise Linux

echo "message" | mail -s "subject"
mail -s "subject" <

use text and/or graphical browser to access HTTP/HTTPS URLs

*
elinks
*
lynx

use lftp to access FTP URLs
RHCT skills
Troubleshooting and System Maintenance

RHCTs should be able to:
boot systems into different run levels for troubleshooting and system maintenance

append the desired runlevel to grub's kernel line:

*
1-5 runs appropriate rc and init scripts
*
single only runs rc.sysinit
*
emergency skips all rc and init scripts

diagnose and correct misconfigured networking

1.
check /etc/sysconfig/network
2.
check /etc/sysconfig/network-scripts/ifcfg-
3.
service network restart
4.
chkconfig network on
5.
ifconfig
6.
ping
7.
netstat -r
8.
ping
9.
ping 4.2.2.2

redhat network config tool:

system-config-network

diagnose and correct hostname resolution problems

1.
check /etc/nsswitch.conf
2.
check /etc/resolv.conf
3.
check /etc/hosts
4.
dig @ google.com

redhat network config tool:

system-config-network

configure the X Window System and a desktop environment

install x:

yum groupinstall "x window system"

*
init respawns /etc/X11/prefdm -nodaemon to keep x running in runlevel 5
*
startx to start manually

xfs is supposedly required for x windows (even though i can run x fine without it…):

service xfs on
chkconfig xfs on

x environment config:

*
/etc/sysconfig/desktop
*
/etc/X11/xinit/xinitrc
*
/etc/X11/xinit/Xclients
*
~/.xinitrc
*
~./Xclients

redhat display config tool:

system-config-display [--reconfig]

install gnome desktop:

yum groupinstall "gnome desktop environment"

switchdesk allows you to change your desktop environment:

yum install switchdesk
switchdesk

if switchdesk is not available, edit /etc/sysconfig/desktop:

DISPLAYMANAGER=
DESKTOP=

add new partitions, filesystems, and swap to existing systems
partitions

manage partitions:

fdisk
partprobe

filesystems

make filesystems:

mkfs.

label filesystems:

e2label