Common Directories in Linux
Linus Torvalds says that there are so many
directories where we can go for getting a more information about linux. These
are the common top-level directories associated with the root
directory: Common Directories in Linux
/
/bin
/etc
/home
/opt
/tmp
/usr
/var
/etc
This root directory is one of the most important root directories on
your system. The etc folder (short for etcetera) is a common place locate to
store system files that are used by your operating system.
For
example, the sudoers file highlighted in this screenshot below
contains a list of the users and groups that have permission to
run sudo or a set of commands as the root user.
Also highlighted below are the "passwd" and "shadow" files. These two files are special for Linux as they show how your system
stores the passwords for each user in encrypted formatting called sha512.
/var
The "/var" directory with "var" being short for
variable data, is one of the main root folders found on a Linux
install. This folder stores data that is frequently accessed or written
by services or applications running on the system. For example, log files from
running services and applications are written here
(/var/log), or other data that is not necessarily associated with a
specific user (i.e, databases and the like).
/root
Unlike the /home directory, the /root folder is actually the home for the "root" system user. There
isn't anything more to this folder other than just understanding that this is
the home directory for the "root" user. But, it is worth a mention as the
logical presumption is that this user would have their data in a directory
such as "/home/root" by default.
/tmp
This is a unique root directory found on a Linux install. Short for
"temporary", the /tmp directory is volatile and is used to store
data that is only needed to be accessed once or twice. Similar to the memory
on your computer, once the computer is restarted, the contents of this folder
are cleared out.
What's useful for us in pentesting is that any user can
write to this folder by default. Meaning once we have access to a
machine, it serves as a good place to store things like our enumeration
scripts.
Disclaimer
All tutorials are for informational and educational purposes only and have been made using our own routers, servers, websites and other vulnerable free resources. we do not contain any illegal activity. We believe that ethical hacking, information security and cyber security should be familiar subjects to anyone using digital information and computers. Hacking Truth is against misuse of the information and we strongly suggest against it. Please regard the word hacking as ethical hacking or penetration testing every time this word is used. We do not promote, encourage, support or excite any illegal activity or hacking.