tty – tty command will tells you current terminal. #tty /dev/pts/1 whoami- whoami commands tells you current logged-in username #whoami root which- which command will give you the path of the command #which tty /usr/bin/tty set- set command prints and sets the shell variables or environment variables echo-echo command will prints the output to screen #echo $PWD print current working directory to the screen. history-history command will tells you the command history clear or ctrl+l- This will clear the terminal [...]
Archive for July 2011
Environment variables in Unix are a set of dynamic named values that can affect the way running processes will be have on a computer
script is one of the powerful tool available to record a unix terminal session.Start the recording of Unix terminal session with script command.And start doing your important configurations, it will recorded in a file. After completing the task ,you can exit the recording with exit command Example procedure: [root@core-22 ~]# script Script started, file is typescript [root@core-22 ~]# service httpd stop Stopping httpd: [ OK ] [root@core-22 ~]# service httpd start Starting httpd: [ OK ] [root@core-22 ~]# exit exit [...]
What is run level in Unix??? Run level defines the predefined set of operational state for Unix system.The operational state is defined in file inittab which is located in /etc. init command used to switch between different run levels.init command followed by runlevel will switch system to corresponding runlevel Eg: init 3 This will switch system to run level 3 which is text mode. Standard Linux distributions have the following run levels: No Name Description 0 Halt System will go [...]
First runlevel for Linux system which only one user is allowed to access that root user.Single user mode is useful for fixing some system problem like filesystem errors,recovering root password etc.So these are the steps for entering to single user mode in Linux.This is based on redhat enterprise linux 5( RHEL 5) Steps: Press any key during booting to go to OS listing Hit ‘e‘ to edit the selected command in the boot sequence(Read the specified instructions in bottom of [...]
PAM is an authentication layer that allows programs to be written independent of specific authentication scheme.The application request authentication via the PAM library and PAM library determines whether the user is allowed to proceed.If an administrator wants to implement a different authentication,he just change the PAM configuration files and existing program work seamlessly. All application and services that depend on PAM for authentication have a file in /etc/pam.d/ directory with filename being exactly the same as the application or service.The [...]
Top is an invaluable tool for actively monitoring the processes running on linux system.With top you are able to view the most CPU intensive tasks,manipulate processes or track the system perfomance over time. Top updates its output every 5 seconds bydefault.The output consists of a header block of information showing overall system statistics,and a process block showing a list of process and their associated information.The header block contains such information as load average,number of processes,available RAM and swap space and [...]
RPC portmapper is a server that converts RPC program number into a TCP/IP or UDP/IP protocol port numbers.It must be running in order to make RPC calls to RPC servers on that machine.When an RPC server is started,it will tell portmap what port number it is listening to and what RPC program number it is prepared to serve.When a client wishes to make an RPC call to a given program number ,it will first contact portmap on the server machine [...]
All unix files have its description stored in a structure called inode that is identified by an inode number .The inode contain information about file size,time of last access,time of last modification ,permission etc The i node value contains the following fields 1).File owner identifier 2).File type 3).File access permissions 4).File access times 5).Number of links 6).File size 7).Location of file data The inode number indexes a table of inodes in a known location on the device; from the inode [...]
The ntsysv utility provides a simple interface for activating or deactivating services.ntsysv used to tern an xinted managed service on or off. It can also used to configure runlevels.By default,only the current runlevel is configured.To configure a different runlevel you can use ntsysv utility. eg: #ntsysv –level 345
chattr enables you to set special attributes on files.You can set files to repress updating the access time,or set files to be append only, immutable or undeletable.You can also use ‘chattr’ to ensure secure deletion of a file.Only root user can use this command.chattr command works only on ext2 and ext3 filesystems. The structure of command is #chattr [-RV][-v version][mode]files Options -R – recursively change attributes of directory and their contents(symbolic links ignored) -V – Verbose wih chattr’s output & [...]
sysctl is an interface that allows you to make changes to a running linux kernel.With /etc/sysctl.conf,you can configure various linux networking and system setting such as limit network transmited configuration for ipv4 & ipv6 Turn on exe sheild protection prevent against the common flood attack Turn on source IP address verification prevent a cracker from using a spoofing attack against IP address of the server Log several types of suspicious packets and redirects sysct command is used to modify [...]






