Thursday, 30 June 2016









1>  FDISK COMMAND
               DISPLAY PARTITIONS
               CREATE PARTITION
               DELETE PARTITION

2>  FORMATING/CREATE FILE SYSTEM

3>  MOUNTING
                TEMPORARY MOUNTING
                PERMANENT MOUNTING

4> SWAP PARTITION
               LIST SWAP VOLUMES
               CREATE SWAP PARTITION
               FORMATE SWAP VOLUME
               MULTIPLE SWAP PARTITION MANAGEMENT
               REMOVE SWAP PARTITION



Fdisk command 

fdisk stands (for “fixed disk or format disk“) is an most commonly used command-line based disk manipulation utility for a Linux/Unix systems. With the help of fdisk command you can view, create, resize, delete, change, copy and move partitions on a hard drive using its own user friendly text based menu driven interface.


p print the partition table
n create a new partition
d delete a partition
q quit without saving changes
w write the new partition table and exit

Thursday, 16 June 2016

 

 


 Group information is stored in the /etc/group file. Each record has the following format



[Group name]:[Group password]:[GID]:[Group members]

    [Group name] is the name of group.
    An x in [Group password] indicates group passwords are not being used.
    [GID]: same as in /etc/passwd.
    [Group members]: a comma separated list of users who are members of [Group name].


How to create a group.


To create group use groupadd commands. Group created by this command is called secondary group.
#groupadd test

#groupadd -g 600 -p pro@123 project1

g :gid
p: password
r : system account ( its take the gid value from reserved group id values)




How to add user in groups


To add user in this group use usermod commands

This command will make vinita user to member of test group BY REMOVING FROM ALL OTHER GROUP


#usermod –G test vinita


# usermod -a -G group1 vinita

The -a option is critical. The user is added to group1 while he continues to be a member of other groups. If it’s not used, then the user is added only to group1 and removed from any other groups. So, take note!
How to delete secondary group

You can delete a group by groupdel commands


# #groupdel test


You cannot delete users primary group until user exist for example

 #groupdel nikki


Remove a user from a group



Removing a user from a group is a bit trickier. Unfortunately, there is no direct command, at least not in Fedora or RHEL, that can do that from command line. At first you need to get a list of groups that your user is a member of:

# id -nG username
group1 group2 group3 ....

OR

# id username


Then you need to put all these groups as a comma-separated list to the usermod -G option, except for the group from which you want the user to be removed. So, to remove the user from group2, issue the command:

# usermod -G group1,group3,... username

Sunday, 12 June 2016

# grep --color 'jishnus account ' /etc/passwd : show the selected colour in colour
 
pkill -KILL -u {username:: logout any user 
 
The /etc/rc.d/rc.local : To add startup programs
 
script is executed by the init command at boot time or when changing runlevels. Adding commands to the
bottom of this script is an easy way to perform necessary tasks like 
starting special services or initialize devices without writing complex 
initialization scripts in the /etc/rc.d/init.d/ directory and creating symbolic links.
   

Popular Posts

Recent Posts

Unordered List

Categories

Text Widget

Powered by Blogger.

Home - PageNavi (show/hide)

Ads

Pages