You are on page 1of 5

Switch from normal user to root user

$ su

Password:

To change from desktop to home directory

# cd /home

Managing Processes
ps : To show all current users

ps -l

ps -a

ps aux :Tabular form with 11 columns having information about all processes

Creating Backup
# tar -cvf /tmp/etc.tar /etc

# tar -tvf /tmp/etc.tar

# tar -xvf /tmp/etc.tar

Working With Links

# ln -s /etc/hosts/ ~/symhosts : for soft link

# ln /etc/hosts ~/hardhosts : for hard link

Create repository
# mkdir /repo

# cd /media/RHEL[tab]/P[tab]

# cp * /repo

# rpm -ivh deltarpm[tab]

#rpm -ivh python-deltarpm[tab]

#rpm -ivh createrepo[tab]

#createrepo /repo
Working With User and Groups
# useradd [username]

# passwd [password]

# userdel [username]

# usermod [username]

# groupadd [groupname]

# groupdel [groupname]

Configuring NFS Server


Server side

Network Configuration

# service network restart

# cd /media/RHEL[tab]/P[tab]

# rpm -ivh nfs*

# cd /home

# mkdir nfsserver

# cd nfsserver

# cat > nfsserverfile

This is nfs server side file

(Press ctrl+c)

# chmod -R 777 .

# vi /etc/exports

(press i)

/home/nfsserver * (rw,sync)

:wq

# service nfs restart


# service iptables stop

# setenforce 0

# showmount -e 192.168.1.4

Client Side

Network Configuration

# service network restart

# cd /home

# mkdir nfsclient

# mount -t nfs 192.168.1.3:/home/nfsserver /home/nfsclient

# cd nfsclient

# ls

# cat nfsserverfile

DHCP Configuration

Server side Configuration

Nertwork Configuration

# cd /media/RHEL[tab]/P[tab]

# rpm -ivh dhcp*

# cp /usr/share/doc/dhcp*/dhcpd.conf.sample /etc/dhcp/dhcpd.conf

# vi /etc/dhcp/dhcpd.conf

:se nu

Line 7- “it.com”

Line 8- server.it.com

Line 18- (#- Remove) authoritative

Line 22 #

Line 28 #
Line 32 subnet 192.168.1.0 netmask 255.255.255.0

Line 34 #

:wq

# service dhcpd restart

# service iptables stop

# setenforce 0

Client Side Configuration

Network Configuration

# service network restart

# ifconfig

FTP Configuration
# cd /media/RHEL[tab]/P[tab]
# rpm -ivh ftp*
# rpm -ivh vsftpd*
# vi /etc/vsftpd/vsftpd.conf
:se nu
Line 12: YES
Line 27: YES
Line 109: YES
:wq
#service vsftpd restart
# setsebool allow_ftpd_anon_write=1
# setsebool ftp_home_dir=1
# service vsftpd restart
# ftp 192.168.1.3
Name: ftp
Password: tahkur
ftp> ls-a
bye
# vi /etc/vsftpd/user_list
Name: ftp

You might also like