My RHEL Notes

From Got Opinion Wiki
Jump to navigation Jump to search

general notes

$ cmd [-opt] [arguments]

cmd uses $PATH and arguments uses $PWD. Arguments are local to current working directory

Press TAB TAB to list available commands in $PATH or list available arguments in $PWD.

managing system resources

fg %[job #]
ps [-fax]

Process Status can be suspended (S+PROCESS STATE CODES in $ ps man page to view), stopped (T), running (R+), zombie

running process is flagged to be scheduled in CPU cycles

# ps -ax

Command column square brackets [ ]  mean kernel started process.

kill -l // list kill options

process priority
# nice cmd
# renice cmd

# jobs // to get job #
kill -KILL %[job #] // to kill by job #

disk usage

use du command
# du -sh /* 2> /dev/null // use STD ERROR to bit bucket

# ps -eo "%c %n %y" // see ps man page, like %P & %U

Software Management

# rpm -qf

# rpm -ql

# rpm -V

# rpm -vi

# rpm -qa

yum resolves dependencies

rpm installs & deletes

# ls /etc/yum.repos.d/

man pages

$ man -k record | grep -i dvd
# man -k pdf

network stuff

$ mtr [destination]

users & groups

# egrep 'dave|darth|luke' /etc/{passwd,group,shadow}


umask blocks out bits

special permissions

<insert graphics example>

[student@desktop12 test]$ pwd
[student@desktop12 test]$ touch file1
[student@desktop12 test]$ touch file2
[student@desktop12 test]$ touch file3
[student@desktop12 test]$ touch file4
[student@desktop12 test]$ touch file5
[student@desktop12 test]$ touch file6
[student@desktop12 test]$ touch file7
[student@desktop12 test]$ chmod 1777 file1
[student@desktop12 test]$ chmod 2777 file2
[student@desktop12 test]$ chmod 3777 file3
[student@desktop12 test]$ chmod 4777 file4
[student@desktop12 test]$ chmod 5777 file5
[student@desktop12 test]$ chmod 6777 file6
[student@desktop12 test]$ chmod 7777 file7
[student@desktop12 test]$ ls -l
total 0
-rwxrwxrwt. 1 student student 0 Sep 29 10:19 file1
-rwxrwsrwx. 1 student student 0 Sep 29 10:19 file2
-rwxrwsrwt. 1 student student 0 Sep 29 10:19 file3
-rwsrwxrwx. 1 student student 0 Sep 29 10:19 file4
-rwsrwxrwt. 1 student student 0 Sep 29 10:19 file5
-rwsrwsrwx. 1 student student 0 Sep 29 10:19 file6
-rwsrwsrwt. 1 student student 0 Sep 29 10:20 file7
[student@desktop12 test]$

admin remote system

$ ssh -X hostname

$ gedit filename


$ cd ~; tar -zcvf newtarball.tgz .

general services







pending categorization

# ldd /usr/bin/sshd

To Linux