RHCSA Questions With Complete Answers
Repeat last command !!
Repeat last argument in current command !$
Kernel log message command dmesg
File usage du -hsx
h - human, s - summarize,
x - single fs
Umount a busy drive kill -9 'lsof +D /mnt/cdrom'
(list open files, +D=directory and contents)
Compare file contents diff
Search for all gzip files, not dirs find -type f -name *.gz
, RHCSA Questions With Complete Answers
Command to tell crond what to do crontab
crontab order Min, hour, date, month, day, command
Show what's in crond crontab -l
Turn on firewall for run levels 2-5 chkconfig iptables on
Check if <cmd> is running service <cmd> status <=old
systemctl status <cmd> <=new
Set tasks for crond crontab -e
e = edit
Mail location /var/spool/mail
, RHCSA Questions With Complete Answers
Command to check messages mail
Check <cmd> run level schedule chkconfig --list <cmd>
Print a file's number of lines wc -I <file>
l=line
User account commands useradd, userdel, usermod
usermod switches G second group, g main group, u user ID num, d home, s shell
Set user password passwd --stdin <user>
Delete user account AND home dir userdel -r
r = remove
Force user password change chage -d 0 <user>
, RHCSA Questions With Complete Answers
change + age
-d = last day
Group-file field categories /etc/group gname:x:gid:users
User account lock cmd usermod -L or -U <usr>
U = unlock
Check if user account is locked less /etc/passwd
user:! means locked
:!! means no password set
Show password parameters chage -l <login>
l = list
Set password max life chage -M <# of days>
Firewall settings GUI system-config-firewall
Repeat last command !!
Repeat last argument in current command !$
Kernel log message command dmesg
File usage du -hsx
h - human, s - summarize,
x - single fs
Umount a busy drive kill -9 'lsof +D /mnt/cdrom'
(list open files, +D=directory and contents)
Compare file contents diff
Search for all gzip files, not dirs find -type f -name *.gz
, RHCSA Questions With Complete Answers
Command to tell crond what to do crontab
crontab order Min, hour, date, month, day, command
Show what's in crond crontab -l
Turn on firewall for run levels 2-5 chkconfig iptables on
Check if <cmd> is running service <cmd> status <=old
systemctl status <cmd> <=new
Set tasks for crond crontab -e
e = edit
Mail location /var/spool/mail
, RHCSA Questions With Complete Answers
Command to check messages mail
Check <cmd> run level schedule chkconfig --list <cmd>
Print a file's number of lines wc -I <file>
l=line
User account commands useradd, userdel, usermod
usermod switches G second group, g main group, u user ID num, d home, s shell
Set user password passwd --stdin <user>
Delete user account AND home dir userdel -r
r = remove
Force user password change chage -d 0 <user>
, RHCSA Questions With Complete Answers
change + age
-d = last day
Group-file field categories /etc/group gname:x:gid:users
User account lock cmd usermod -L or -U <usr>
U = unlock
Check if user account is locked less /etc/passwd
user:! means locked
:!! means no password set
Show password parameters chage -l <login>
l = list
Set password max life chage -M <# of days>
Firewall settings GUI system-config-firewall