Sunday, 1 December 2024

Oracle Linux Commands (users , groups , Directory creation and Permissions grant ) - part 4/4

 Dear All,


 In this post i am going to share few of the oracle Linux commands.

Complete Linux high level commands, I have posted in 4 parts, this is Part 4/4.


check the previous parts details below.

part 1 : https://anjaniappsdba.blogspot.com/2023/09/oracle-linux-commands-part-14.html

part 2 : https://anjaniappsdba.blogspot.com/2024/02/oracle-linux-commands-part-24.html 

Part 3 : https://anjaniappsdba.blogspot.com/2024/11/oracle-linux-commands-awksed.html


User and groups Creation commands

===========================

#useradd username ( create new users )

Id username >> ( it will display the user id with groups )

#passwd username>>to create /rest the password

#userdel username>>delete the user

#useradd –g primary group username>> add primary group ( new user )

#useradd –G secondary group to username>> to add second group

#usermod –a –G groupname username>> to add existing user into this group ( existing user )

#useradd -g racsinfo new_user

#usermod -g racsinfo existing user  



#groupadd racsinfo

 

cat /etc/group

 

group_name : password : group-id : list-of-members

 

groupadd -g 1001 racsinfo

groupadd -f racsinfo

groupadd -p newpassword racsinfo ( put the password )

 

 


 


 



Disk Fragmentation commands

=============================

Df >> to display disk fragmentation

Df -h >>to display disk fragmentation in gb

Df –m >> to display disk fragmentation in mb

Df –h . >> to display the disk fragmentation in current directory

 

 


 

Directory commands

========================

 

mkdir directory name >> to create the directory.

Mkdir -p directory name >> to create the directory’s with in

directories.

Mkdir – p directory/directory {1..10} >> to create the directory in

directories

Rm –rf directory name>> it removes the directory without

confirmation

Rmdir directoryname >> it remove the directory

 




Permission commands

==========================

Chmod 755 file >> to be give the change file permissions.

Chmod u+x file >> to be give the users execution permissions

chmod g+x file >> to give the groups execution permissions

Chmod o+x file >> to give the others execution permissions

chown username:username filename >> to change the ower

permissions

chgrp username:username filename >> to change the group

permissions

 





PS Command

=================

Ps >> to display the process for running

Ps –ef :to display the all process for running

Ps –ef|grep httpd >> to check the httpd process is running or not

ps –ef|grep httpd >>to see the apache running or not

ps –ef|grep httpd|grep –v grep >>to see the apache running or not ad

not display grep output

kill -9 <pid> (Or) kill –TERM <PID> >> it kill the running process

forcebully

kill -3 <pid>>> it create the thread dump

 

 






*Min|*H|*Day|*M|*W :

#*****

Min>> 0-59

H >> 0-23

Day >> 1-31

Month>> 1-12

Week>>> 0-6

 

RWX . read : 4 , Write : 2 , Execute : 1 , No Access :0

4+2+1=7

User >>  xxx

Group >> xxx

Others >>  xxx


Thanks,

Srini

No comments:

Post a Comment


No one has ever become poor by giving