Techit Tricks

You can download videos of CCNA | Azure | Vmware | AWS | Citrix | HP

Must known commands for Linux admin

Permissions in Linux:

Basic and Must Known commands for Linux admins
3 users:
user group
3 permissions:
r= read permission
w= write permission
x= execure permission
-= no permission

chmod (change mode to change the permission)
absolute mode and symbolic mode
chmod 777 <filename> -> to change the permission of file in absolute mode
chmod u=rw, g-x, o-w <filename> -> to change the permission of file in symbolic mode (here we are providing read and write for user, adding execute in group and removing write permission from others)

chown (change ownership of file and directory)
chown <user which we want to change for the file> <file name> -> to change the owner of file
chown <user:group> <filename> -> to change the owner and group of file

chgrp (Change Group)
chgrp <group name which we want to change for the file> <file name> to change the group of file

./etc/group -> to see all groups in file system
groups -> to see all groups 
newgrp <newgroup> -> to create new group in file system
Linux File Structure
/bin Essential command binaries
/boot Static files of the boot loader
/dev Device files
/etc Host-specific system configuration
/lib Essential shared libraries and kernel modules
/media Mount point for removeable media
/mnt Mount point for mounting a filesystem temporarily
/opt Add-on application software packages
/sbin Essential system binaries
/srv Data for services provided by this system
/tmp Temporary files
/usr Secondary hierarchy
/var Variable data


Thanks for sharing.. awesome