Sie sind auf Seite 1von 19

Ramesh Ramineni

1) BASIC COMMANDS:
1. #Cat>file name: To create a file.
2. #Cat filename: To display the contents of a file
3. #Cat >>filename: To append the data in the already existed file
4. #touch <filename> <filename> <filename>: Creating multiple files at same time
5. #mkdir <dir name>: To create a directory
6. #cp <source filename> <destination directory in which to paste the file>: To copying file into directory
7. # cp rvfp <dir name> <destination name>: coping directories from one location to other location
8. #mv <dir name> <destination dir name>: Move a directory from one location to other location
9. #mv <old name> <new name>: To renaming a file
10. #rm filename or #rm f filename (without prompting): To removing a file
11. #ls: To search for all folders and files in a system
12. #grep root /etc/passwd: To see the information about a particular expression
13. #grep i kernel ktfile: To avoid case sensitive of the word
14. #grep nA2 wheel /etc/group: To display a word and 2 lines before the word
15. #grep -nB2 wheel /etc/group: To display a word and 2 lines after the word
16. #Less /etc/passwd: The less command is used to see the output line wise or page wise.
17. #more /etc/passwd: This command is used same as less command
18. # head /etc/passwd: It is used to display the top 10 lines of the file.
19. #tail /etc/passwd: It is used to display the last 10 lines of the file.
20. #sort filename: To display sorting order that is either numeric or alphabetical
21. #sort d ktfile: To sort the file according to numbers
22. #sed s/searchfor/replacewith/g filename: which is used to search a word in the file and replace it with
the word required to be in the output
23. #cat file1 file2 > file3: Copying of two content files into a single file
24. #ls l filename: To check list of file permissions to a file
25. #chmod ugo=rwx <file name>: Assigning full permissions to a file.
26. #chmod 764 ktfile (where 7 means rwx i.e. 4+2+1, rw=6 i.e. 4+2 and 1 indicates x: Assigning permissions
to a file in numerical mode(Absolute Method)
27. #umask: To check umask value

1|Page
Ramesh Ramineni
#chmod u+x ktfile (Adding execute permission to user only)
#chmod go-wx ktfile (Removing write and execute permissions from group and other)
#chmod go+wx ktfile (Adding write and execute permissions from group and other)
#chmod go=r ktfile (Giving only read permission to group and other)

2) PARTITIONS AND FILE SYSTEMS:


1. #fdisk l or parted l: To see the existing partitions.
2. #fdisk /dev/sda: To enter into disk utilities
3. #partprobe /dev/sda : To updating the partition of disk
4. # mkfs.<file system type> <partition name>: To format a partition with ext4
5. #mount <device name> <directory name (mount point)>: Temporary Mounting
6. #mount: To see the mounted partitions
7. #umount <mount point directory> : To unmount a partitions
8. #df -h : To view the usage information of mounted partition use the command
9. #du h file or directory name : To view the size of the file or directory uses the command
10. #e2label <partition name> <label>: To assign label to the partition e2label command is used
11. #free m: To see the memory size and the swap space size
12. #swapon s: To see the swap space usage
13. #mkswap <parititon name>: To format the partition with swap file system use
14. #swapon <partition name>: To activate swap space
15. #swapoff <partition name>: To deactivate swap space
16. #cryptsetup luksFormat /dev/sda5: To encrypt the partitions
17. #cryptsetup luksOpen /dev/sda5 ktpart : To decrypt a partition
18. Commands used in LUKS encryption:
cryptsetup luksFormat: To Format the partition with encryption, and assigning the password.
cryptsetup luksOpen: To open or decrypt the partition. (Password will be required) and then you need to
assign some name to it, which will be used for further operation as /dev/mapper/name.
crypsetup luksClose: To Close or encrypt back the partition after use.
cryptsetup luksAddKey: To add the key (password) to the configuration to automatically decrypting the
partition
2|Page
Ramesh Ramineni
3) LOGICAL VOLUME MANAGEMENT:
Components of LVM in Linux:
1. Physical Volume (PV):
It is the standard partition that you add to the LVM. Normally, a physical volume is a standard primary or
logical partition with the hex code 8e.
2. Physical Extent (PE): It is a chunk of disk space. Every PV is divided into a number of equal sized PEs.
3. Volume Group (VG): It is composed of a group of PVs and LVs. It is the organizational group for LVM.
4. Logical Volume (LV): It is composed of a group of LEs. You can format and mount any file system on an LV. The
size of these LVs can easily be increased or decreased as per the requirement.
5. Logical Extent (LE): It is also a chunk of disk space. Every LE is mapped to a specific PE.
As per the process, first we need to create physical volumes and then we need to attach with a
volume group. After that we will create logical volumes with some amount of size. Then, we want to make a
file system and then mount it with a new directory. After that by using fstab we want to change
permanently. If we want to remove a physical volumes then first we should be unmount and then remove
volume group after that we can delete a physical volume.

LVM Command Function


pvs : Displays all the physical volumes
vgs : Displays all volume groups in the system
lvs : Displays all the logical volumes in the system
pvdisplay : Displays detailed information on physical volumes
vgdisplay : Displays detailed information on volume groups
lvdisplay : Displays detailed information on logical volumes
pvcreate : Create a new physical volume
vgcreate : Create a new volume group.
lvcreate : Creates a new logical volume
vgextend : Add a new physical disk to a volume group.
lvextend : Extends a logical volume
lvresize : Resizes a logical volume
lvreduce : Reduces a logical volume
pvmove : Moves/migrates data from one physical volume to
another
vgreduce : Reduces a volume group by removing a PV from it.
pvremove : Deletes a physical volume
vgremove : Removes /Deletes a volume group
lvremove : Removes /Deletes a logical volume

3|Page
Ramesh Ramineni
4) USER AND GROUP ADMINISTRATION:

1. # useradd <option> <username>: To add an user to a system


2. #useradd ktuser2 u 505 -g 505 d /home/kernel c salesman: Create a user with our own attributes
3. #passwd <user name>: Assigning a password to an user
4. # usermod <options> <username>: To modify the user attributes
5. # usermod -l newname oldname: To change the name of the user
6. #usermod L < user name>: To lock a user account
7. #usermod U < user name >: To unlock the user account
8. #chage -l < user name>: To view the advanced parameters of a user
9. #userdel r < user name >: To delete a user
10. #groupadd <name for the group>: To create a group
11. #groupadd -g 595 ktgroup: Creating a group with group ID
12. #groupmod <option> <arguments> <group name>: To Modify the group parameters
13. #usermod G <group name > < user name>: To add an user to a group
14. #gpasswd d ktuser2 ktgroup: Removing a user from the group
15. #system-config-users &: To add and remove users by using GUI

5) NETWORKING CONFIGURATION AND TROUBLESHOOTING:

1. #ifconfig: To check the ip address allocating to interfaces


2. #ifconfig < adapter name >: To check the IP of particular interface
3. #hostname: To check the hostname of system
4. #hostname i : To check the IP of host and #hostname rams.rs.com: To create a host
5. #host <ip address>: To check whether the DNS is running or not
6. #nslookup <ip address>: this is also same as host
7. #dig<hostname> : To check the functions of DNS
8. #ping <ip address>: To check the connectivity of network
9. #vim /etc/sysconfig/network: The configuration file for hostname change permanent
10. #service network restart: Restart the network services
11. #service NetworkManager restart: To restart the network manager services
12. #ethtool <adapter name>: To know the full description of adapter.
4|Page
Ramesh Ramineni

BOOTING PROCDURE AND KERNEL PARMETERS:

1. #who r: To see the which run level it is in


2. #vim /etc/inittab: To edit the run level
3. #uname r: To see the version of kernel use
4. #uname a: To see the indepth detail of version of kernel
5. # cat /etc/redhat-release: To check the OS version of linux
6. #arch: To check the architecture of OS
7. #init 6: To reboot or restart the system
8. #init 0: To shutdown the system
9. #lsmod: To check the list of modules
10. #lsmod |grep i module name: To check whether a particular module is loaded or not.

5|Page
Ramesh Ramineni

JOB AUTOMATION (CRON & AT):


1. #crontab l: To check the assigned cron job of currently logged in user
2. #crontab l u ktuser: To check the assigned cron job of Particular user
3. #crontab e: To schedule a job with vi editor
4. #Service crond restart: To restart a crond for job schedule
5. #service crond stop: To stop a crond job
6. #at <time>: The syntax of AT jobs
7. #at l: To check the list of all at jobs
8. #at c < job id >: To check what the job is scheduled
9. #atrm < job id >: To remove a job

ADMINISTRATING REMOTE SYSTEM:


1. #ssh <ip address/ host name of remote machine>: To access the assigning remote system
2. # ssh-keygen: To generate the SSH Key pair
3. #cd /root/.ssh: To check for the key
4. #ssh-copy-id i <public key location> <clients IP address>: To copy the server public key in client system
5. #cd /root/.ssh/ : To change the directory
6. #cat authorized_keys: check whether the key was copied or not
7. #ssh 192.168.10.95: Login to client ssh
8. #scp <file name > <remote hosts IP >:/<location to copy the file >: The syntax for SCP a file from source
location
9. #scp <source systems IP>:/<location of file to be copied> <destination location to copy>: The syntax for
SCP a file from destination location
10. #rsync <options> <encryption> <source dir> <destination IP>:/<location of destination dir>: Syntax for
rsync destination

6|Page
Ramesh Ramineni

SOFTWARE MANAGEMENT:
1. #rpm qa: To check all the installed packages
2. #rpm q <package name>: To check whether a particular package is installed or not
3. #rpm ivh <package name>: To install a package
4. #rpm e < package name>: To remove or uninstall a package
5. #rpm qip <package name>: To see the info of package
6. #rpm qi < package name >: To see the info of installed package
7. #which cat: To check the package of a particular command
8. #rpm qf /bin/mount: To install a package forcefully
9. #rpm qlc <package name>: To see the configuration file for installed package
10. #rpm Uvh <package name>: To update a particular package
11. #yum list installed: To view installed packages in system
12. #yum localinstall finger* -y: To install a package by using yum

BACKUP AND RESTORE:


1. #tar cvf <destination and name to be > < source file>: To backup the file using tar command
2. #tar cvf <destination and name to be > < source file>: Check the size of tar file
3. #gzip <file name>: To apply a gzip on a file
4. #scp /opt/etc.tar.gz 192.168.10.95:/root/: To transfer the file to other computer using scp
5. #gunzip <file name>: To unzip a file
6. #tar -xvf <file name>: To untar a file

7|Page
Ramesh Ramineni
MANAGING INSTALL SERVICES:
1. #service <name of the service> status --- To check the status of the service
2. #service <name of the service> start --- To start the service
3. #service <name of the service > stop --- To stop a service
4. #service <name of the service> reload --- To reload the service
5. #service <name of the service> restart --- To restart the service
6. #chkconfig - -list: To check the status of all services availability
7. #chkconfig - - list <name of the service>: To check the status of particular service
8. #chkconfig vsftpd on: To make the service availability on
9. #chkconfig vsftpd off: To make the service availability off
10. #chkconfig - - level <1-6> <service> <on/off>: To make the service availablilty on, on a particular runlevel

MANAGING PROCESS:
1. #ps: To monitor the process
2. #ps a: To see total number of process running on the system
3. #ps u <user name>: To see the process of logged user
4. #ps x: To see which process are attached with some terminals
5. #ps aux : To see the offline process
6. #kill l : To see the list of signals
7. The most common signals used are
1 for reloading the process
9 for killing the process
15 for Terminating the process
20 for stopping the process
8. #kill <signal no> <process id>: To kill the signals
9. #nice n <nice value range (-20 to 19)> <command>: To set a priority of process
10. #top: To monitor all process

8|Page
Ramesh Ramineni

FTP SERVER:

Profile of ftp server:


o Use: Ftp is used for uploading and downloading the files.
o Disadvantage: Directory cannot be uploaded or downloaded.
o Package: vsftpd
o Daemon: vsftpd (Very Secure Ftp daemon)
o Script: /etc/initd/vsftpd
o Port no: 21 (Tcp) > 1024 (Udp, Random)
o Configuration files: /etc/vsftpd/vsftpd.conf ,/etc/vsftpd/user_list ,/etc/vsftpd/ftpuser,
/etc/pam.d/vsftpd
o Document Root: /var/ftp
o Home directory: /var/ftp (which is created only when the package is installed.
Steps to configuring ftp server for downloading a file:
1. Install the package using yum or rpm command.
#yum install vsftpd* -y
2. Navigate to /var/ftp/pub directory and create some files in it
#cd /var/ftp/pub
#touch file {1...5}
3. Restart the ftp service
#service vsftpd restart
4. To make a service enable use the following command
#chkconfig vsftpd on
5. Connect from client and access the files and download it
To access the ftp server the client should have ftp package installed. If not installed, install it
using rpm, because yum will not work if ftp package is not installed.
Check whether ftp package is installed or not
#rpm q ftp
5. Now connect to ftp server using its IP .To connect to ftp server use the following command
#ftp <ftp servers IP>
6. To download files use the following command
#get <file name> for single file
9|Page
Ramesh Ramineni
Configuring the ftp server for uploading a file:
1. Create an upload dir in the document root of ftp server i.e., /var/ftp
#mkdir upload
2. Change the group to ftp and write permission to the upload directory, Changing the group of upload to ftp
#chgrp <group name> <directory name>
Adding the write permission to upload directory
#chmod g+w upload
3. Log into client machine, access ftp server and try to upload some files
4. Restart the ftp service
#service vsftpd restart
5. Again login to client system and try again to upload the files into ftp server
6. Add read write permission in context of upload directory using following command
#chcon t public_content_rw_t

NFS SERVER:
Profile for NFS:
o Package: nfs-utils
o Daemons: rpc.nfsd, rpc.mountd, rpc.statd, rpc.lockd, rpc.rquotad
o Script: /etc/init.d/nfs
o Port number: 2049
o Configuration File: /etc/exports
o Other imp files: /var/lib/nfs/etab, /var/lib/nfs/rmtab

Steps to configure NFS server:


1. Install the NFS package.
#yum install nfs-utils* -y
2. Create a partition, format it and mount it, access the mount point and add data to it
#fdisk /dev/vda
Update the partition table and format it #partx a /dev/vda #mkfs.ext4 /dev/vda13
Create a directory and mount the partition over it and also make it permanent in /etc/fstab
3. Export the directory by editing /etc/exports file and using exportfs command
Edit the /etc/exports file
4. Restart the services and make it permanent. #service nfs restart

10 | P a g e
Ramesh Ramineni
Client side configuration for NFS mounting:
Step1: Check and Install the NFS package if not installed
Step2: Start the NFS services
Step3: Check which directory is exported for this machine using show mount command
Step4: Make a directory and mount the NFS dir over it.
Step5: Add some data to it and check the same is updated on server side.

Steps to configure auto mount at client side:


1. Log into client side and check whether autofs is install or not, if not install autofs
#yum install autofs* -y
2. Edit the /etc/auto. master as follows
#vim /etc/auto.master
3. Create /etc/auto.ktnfs file and /ktnfs directory if not created earlier
#vim /etc/auto.ktnfs
4. Stop and start the autofs service
#service autofs stop
#service autofs start
#chkconfig autofs on
5. Change the directory to the name given in /etc/auto.ktnfs i.e. ktnfs and then auto mounting will be done.
#cd ktnfs
#mount

Steps for removing NFS:


1. Remove all autofs details from all config files like /etc/auto.master and /etc/auto.ktnfs
2. un-export all the directory which was exported earlier using following command
# exportfs auv

Note:- if you dont have DNS and you dont want use IP but want to use hostname instead, update hostname
with its ip in /etc/hosts file and then you can use hostname instead of IP

Okay now finally weve done with all NFS activities.

11 | P a g e
Ramesh Ramineni
SAMBA SERVER:
Profile for SAMBA:
o Usage: used for sharing files and directories in the network between different platforms,
like Linux-windows
o Package: SAMBA, SAMBA-common, SAMBA-client.
o Daemons: smbd, nmbd
o Script: /etc/init.d/smb, /etc/init.d/nmb
o Portno: 187 (net bios ns{name service}), 138 (net biosdgm {datagram})
o 139 (net bios-ssn{session service}), 445 (Microsoft ds{dist sys})
o File system: CIFS (common internet file system)
o Config file: /etc/samba/smb.conf

Steps to configure SAMBA server:


1. Check and Install the SAMBA package, if not installed
#rpm q samba #yum install samba* -y
2. Make a directory and assign full permission to it ,which will be shared
#mkdir /ktsamba
#chmod 777 /ktsamba
3. Check the context of the directory and change it according to samba
#ls ldZ /ktsamba
#chcon t samba_share_t /ktsamba
4. Create a user or use any existing user who will be allowed to log in as samba user, add that user to
samba user As we have a existing user ktuser, lets just make it samba user
#smbpasswd a <username>
#smbpasswd a ktuser
5. Go to the configuration file i.e. /etc/samba/smb.conf and make the following changes
Open the /etc/samba/smb.conf and copy the last seven lines shown below and paste it at the last to
edit it.
6. Test the samba parameters and restart the service and make it enable after reboot
To test the parameters us the following command
#testparm

12 | P a g e
Ramesh Ramineni
7. We have to restart two services here
#smb and #nmb and make it add to enable after reboot
#service smb restart
#service nmb restart

Linux as client of SAMBA:


1. Log into Linux machine and check how many samba servers are there in your network
#findsmb
2. Check the share name of that samba server by using following command
#smbclient L //192.168.10.93
When prompted for passwd just press enter without giving any passwd
3. To connect to the samba server use the following syntax
#smbclient //<server IP>/<share name> -U <User name>
4. To mount the SAMBA directory on remote Linux client
The syntax is
#mount t <type of fs> //<server IP address>/<share name> /<mount point> -O user= <user name>.
#mount t cifs //192.168.10.93/ktshare /mnt o user=ktuser

13 | P a g e
Ramesh Ramineni
DNS SERVER:

Profile for DNS Server:


o Usage : To Resolve IP into hostname and vice-versa
o Package : bind, caching-name
o Script : /etc/init.d/named
o Port : 53
o Configuration File : /etc/named.conf
o Document root : /var/named/
o Daemon : named
Step by Step configuration of DNS server:
1. Check and Install the package for DNS
The package which is to be installed for DNS is bind and caching
#rpm q bind #yum install bind* caching* -y
2. Update the /etc/hosts file with the servers ip address, and change the hostname with fully qualified
domain name. Change the hostname by adding fully qualified domain name
#hostname ktadm.kt.com (where kt.com is the FQDN ) and Make it permanent
/etc/sysconfig/network file
3. Edit the /etc/named.conf file with our name servers IP address and network range for clients.
#vim /etc/named.conf
4. Edit the other zone configuration file i.e. /etc/named.rfc1912.zones
To add the details of the zones i.e. forward lookup zone and reverse lookup zone we need to edit the
/etc/named.rfc1912.zones file as shown below
#vim /etc/named.rfc1912.zones
5. Navigate to /var/named/ directory and copy the named.localhost file with its permissions as kt.flz and
edit it.
#cd /var/named
#cp p named.localhost kt.flz

6. To check the consistency of zone files the command is


#named-chkzone <domain name> zone file

14 | P a g e
Ramesh Ramineni
7. Add the address of DNS server in /etc/resolv.conf
Edit the /etc/resolv.conf and add the IP of DNS server
#vim /etc/resolv.conf
8. Restart the named service
#service named restart
Using host command to check resolution
Checking the DNS resolution with host command for both server as well as clients
#host <hostname>
Using host command with IP address of server as well as client
#host 192.168.10.95
#host 192.168.10.92 (or) 91, 93 any client
Use nslookup command with server and clients hostname and check it
#nslookup ktadm
Check the same thing with IP addresses
#nslookup 192.168.10.95
#nslookup 192.168.10.93

Client side configuration for DNS:


1. Log into client machine and add the DNS servers information in /etc/resolv.conf file
#vim /etc/resolv.conf
2. Now check with any of the options used previously like dig, ping, host or nslookup for dns resolution

15 | P a g e
Ramesh Ramineni
WEB SERVER (APACHE):
Profile for Apache Server:
o Use: Hosting a web site.
o Package: httpd
o Port: 80/http, 443/https
o Configuration Files: /etc/httpd/conf/httpd.conf and /etc/httpd/conf.d/ssl.conf (https)
o Document Root: /var/www/html
o Daemon: httpd
o Script: /etc/initd/httpd
Steps to configure a simple web server:
1. The package for apache web server is httpd.
#yum install httpd* -y
2. Navigate to the configuration file for http i.e. /etc/httpd/conf/httpd.conf and copy the last 7
lines as shown below
#vim /etc/httpd/conf/httpd.conf
3. Navigate to the document root folder i.e. /var/www/html/ and create an index.html file which
will be accessed through a web browser
#vim /var/www/html/index.html
4. Open Firefox web browser and type the IP Address of the web server
http://192.168.10.95
5. To open the website from command line use the following command
#curl <IP/HOSTNAME of web server>
#curl 192.168.10.95
DNS configuration if you dont want to use IP address:
1. Open the DNS configuration file and add the canonical name as www, so that we can use our
domain as full fledge website.
#vim /var/named/kt.rlz
2. Restart the DNS services
#service named restart

16 | P a g e
Ramesh Ramineni
Important configuration files for linux:
Disk Identification:
Different type of disks will be having different initials in Linux
IDE drive will be shown as /dev/hda
SCSI drive will be shown as /dev/sda
Virtual drive will be shown as /dev/vda
Types of file systems used in RHEL 6:
S.NO EXT2 EXT3 EXT4
1. Stands for Second Stands for Third Stands for Fouth
Extended File System Extended File System Extended File System
2. It was introduced in It was introduced in It was introduced in
1993 2001 2008.
3. Does not have Supports Journaling Supports Journaling
journaling feature. Feature. Feature.
4. Maximum File size Maximum File Size Maximum File Size
can be from 16 GB to can be from 16 GB to can be from 16 GB to
2 TB 2 TB 16 TB
5. Maximum ext2 file Maximum ext3 file Maximum ext4 file
system size can be system size can be system size is 1 EB
from 2 TB to 32 TB from 2 TB to 32 TB (Exabyte). 1 EB =
1024 PB (Petabyte). 1
PB = 1024 TB
(Terabyte).
6. Cannot convert ext You can convert an All previous ext file
file system to ext2. ext2 file system to systems can easily be
ext3 file system converted into ext4
directly (without file system. You can
backup/restore). also mount an
existing ext3 f/s as
ext4 f/s (without
having to upgrade it).

Files which is related to mounting in Linux:


/etc/mtab is a file which stores the information of all the currently mounted file systems; it is dynamic and keeps
changing.
/etc/fstab is the file which is keeps information about the permanent mount point. If you want to make your mount
point permanent, so that it will be mounted even after reboot, then you need to make an appropriate entry in this
file.

17 | P a g e
Ramesh Ramineni
Some Important Points related to Users:
Users and groups are used to control access to files and resources
Users login to the system by supplying their username and password
Every file on the system is owned by a user and associated with a group
Every process has an owner and group affiliation, and can only access the resources its owner or group can
access.
Every user of the system is assigned a unique user ID number ( the UID)
Users name and UID are stored in /etc/passwd
Users password is stored in /etc/shadow in encrypted form.
Users are assigned a home directory and a program that is run when they login (Usually a shell)
Users cannot read, write or execute each others files without permission.

Types of EXAMPLE USER ID GROUP ID HOME SHELL


users In (UID) (GID) DIRECTORY
Linux and
their
attributes:
TYPE
Super User Root 0 0 /root /bin/bash
System User ftp, ssh, 1 to 499 1 to 499 /var/ftp , etc /sbin/nologin
apache
nobody
Normal User Visitor, 500 to 60000 500 to 60000 /home/user /bin/bash
ktuser,etc name

There are two important files a user administrator should be aware of.
1. "/etc/passwd"
2. "/etc/shadow"
Each of the above mentioned files have specific formats.
1. /etc/passwd

The above fields are


root =name
x= link to password file i.e. /etc/shadow
0 or 1= UID (user id)
0 or 1=GID (group id)
root or bin = comment (brief information about the user)
/root or /bin = home directory of the user
/bin/bash or /sbin/nologin = shell
18 | P a g e
Ramesh Ramineni

2. /etc/shadow
root:$1fdsfsgsdfsdkffefje:14757:0:99999:
7:::
The fields are as follows,
1. root = User name
2. :$1fdsfsgsdfsdkffefje = Encrypted password
3. 14757 = Days since that password was last changed.
4. 0 = Days after which password must be changed.
5. 99999 = Days before password is to expire that user is warned.
6. 7 = Days after the password is expires that the user is disabled.
7. A reserved field.

Some Important configuration files/directories of network configurations:

o #/etc/sysconfig/network-scripts is the directory which keeps the configuration of network devices


connected to the system.
o #/etc/sysconfig/network is a file which keeps the information about the hostname assigned to the
system. If you want to change the hostname permanently, you need to change the hostname in this file.
o #/etc/hosts a file which is responsible for resolving hostname into IP locally, in other word it acts as local
DNS if DNS server is not accessible.
o #/etc/resolv.conf is a file which keeps the address of DNS server to which the clients will be accessing to
resolve IP to hostname and hostname to IP.

Important SELinux configuration Files


o /etc/selinux/config is the main configuration file of SELinux.
o /etc/sysconfig/selinux
Important Files related to cron and at
/etc/crontab is the file which stores all scheduled jobs
/etc/cron.deny is the file used to restrict the users from using cron jobs.
/etc/cron.allow is used to allow only users whose names are mentioned in this file to use cron jobs. (this file does not
exist by default)
/etc/at.deny same as cron.deny for restricting at jobs
/etc/at.allow same as cron.allow for allowing user to use at jobs.

*Minute-hour-date of month-month of year-day of week

19 | P a g e

Das könnte Ihnen auch gefallen