0% found this document useful (0 votes)
94 views6 pages

Kali Linux Directory Structure Overview

The document outlines the directory structure of Kali Linux, detailing the purpose and contents of each directory from the root (/) to /srv, including /bin for user binaries, /etc for configuration files, and /home for user home directories. It also distinguishes between primary and secondary memory types. Additionally, it clarifies the difference between the root directory and the home directory for the root user.

Uploaded by

simulhasan79
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views6 pages

Kali Linux Directory Structure Overview

The document outlines the directory structure of Kali Linux, detailing the purpose and contents of each directory from the root (/) to /srv, including /bin for user binaries, /etc for configuration files, and /home for user home directories. It also distinguishes between primary and secondary memory types. Additionally, it clarifies the difference between the root directory and the home directory for the root user.

Uploaded by

simulhasan79
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Kali linux Directory Structure

1. / – Root
■ Every single file and directory starts from the root directory.
■ Only root users have write privilege under this directory.
■ Please note that /root is the user’s home directory, which is not the
same as /.

2. /bin – User Binaries


■ Contains binary executables.
■ Common linux commands you need to use in single-user modes
are located under this directory.
■ Commands used by all the users of the system are located here.
■ For example: ps, ls, ping, grep, cp.

3. /sbin – System Binaries


■ Just like /bin, /sbin also contains binary executables.
■ But, the linux commands located under this directory are used
typically by system administrators, for system maintenance
purposes.
■ For example: iptables, reboot, fdisk, ifconfig, swapon
■ Only for root user: example: iptables –list

4. /etc – Configuration Files


■ Contains configuration files required by all programs.
■ This also contains startup and shutdown shell scripts used to
start/stop individual programs.
■ For example: /etc/[Link], /etc/[Link]

5. /dev – Device Files


■ Contains device files.
■ These include terminal devices, usb, or any device attached to the
system.
■ For example: /dev/tty1, /dev/usbmon0

6. /proc – Process Information


■ Contains information about system process.
■ This is a pseudo file system containing information about the
running process. For example: /proc/{pid} directory contains
information about the process with that particular pid.
■ This is a virtual filesystem with text information about system
resources. For example: /proc/uptime

7. /var – Variable Files


■ var stands for variable files.
■ Content of the files that are expected to grow can be found under
this directory.
■ This includes — system log files (/var/log); packages and database
files (/var/lib); emails (/var/mail); print queues (/var/spool); lock
files (/var/lock); temp files needed across reboots (/var/tmp);

8. /tmp – Temporary Files


■ Directory that contains temporary files created by system and
users.
■ Files under this directory are deleted when the system is rebooted.

9. /usr – User Programs


■ Contains binaries, libraries, documentation, and source-code for
second level programs.
■ /usr/bin contains binary files for user programs. If you can’t find a
user binary under /bin, look under /usr/bin. For example: at, awk,
cc, less, scp
■ /usr/sbin contains binary files for system administrators. If you
can’t find a system binary under /sbin, look under /usr/sbin. For
example: atd, cron, sshd, useradd, userdel
■ /usr/lib contains libraries for /usr/bin and /usr/sbin
■ /usr/local contains user programs that you install from source.
For example, when you install apache from source, it goes under
/usr/local/apache2

10. /home – Home Directories


■ Home directories for all users to store their personal files.
■ For example: /home/john, /home/nikita

11. /boot – Boot Loader Files


■ Contains boot loader related files.
■ Kernel initrd, vmlinux, grub files are located under /boot
■ For example: [Link]-2.6.32-24-generic,
vmlinuz-2.6.32-24-generic

12. /lib – System Libraries


■ Contains library files that supports the binaries located under /bin
and /sbin
■ Library filenames are either ld* or lib*.so.*
■ For example: [Link], [Link].5.7

13. /opt – Optional add-on Applications


■ opt stands for optional.
■ Contains add-on applications from individual vendors.
■ add-on applications should be installed under either /opt/ or /opt/
sub-directory.
14. /mnt – Mount Directory
■ Temporary mount directory where sysadmins can mount
filesystems.

15. /media – Removable Media Devices


■ Temporary mount directory for removable devices.
■ For examples, /media/cdrom for CD-ROM; /media/floppy for
floppy drives; /media/cdrecorder for CD writer

16. /srv – Service Data


■ srv stands for service.
■ Contains server specific services related data.
■ For example, /srv/cvs contains CVS related data.

Difference between / and root directory:

=> When the First linux system was made at that time, the root directory didn’t exist .But
if a root user needed to do some activity (like file creation ,move etc),he must have used
this [Link] it is very disgusting to create this type of random file..So that later root
directory is created only for root user purpose.

Primary memory:

Examples: RAM, ROM, Cache memory, PROM, EPROM, Registers, etc.

Secondary memory:
Examples: Hard Disk, Floppy Disk, Magnetic Tapes, et

Common questions

Powered by AI

The /usr directory is used to store user programs including binaries, libraries, documentation, and source code for user space applications, for example, binaries in /usr/bin and libraries in /usr/lib . On the other hand, /opt is specifically dedicated to optional add-on applications from third-party vendors, allowing for the installation of software in subdirectories without interfering with the base system structure . This separation helps maintain a clean and manageable filesystem by segmenting third-party software from standard system software.

The /mnt directory serves as a temporary mount point where system administrators can mount filesystems for temporary use, enabling them to access data on external storage devices . This functionality allows for testing, data transfer, or temporary utilization of additional storage resources without committing to a permanent space within the filesystem hierarchy. It supports flexibility and ease in managing system resources.

The /home directory plays a crucial role in user experience by providing personal space for each user to store their personal files and configurations, with each user's files located in directories such as /home/john or /home/nikita . This separation allows users to have individualized environments that are protected and isolated from each other, facilitating efficient data management and privacy. It enables users to customize their environment without affecting others’ data or the overall system configuration.

Primary memory, which includes RAM, ROM, Cache memory, PROM, and EPROM, refers to the direct storage systems that interact with the CPU to execute programs and operations promptly. It is typically volatile and temporary, designed for quick access to facilitate fast processing. In contrast, secondary memory, such as Hard Disks, Floppy Disks, and Magnetic Tapes, is non-volatile and used for long-term data storage . Its role is to provide persistent storage and larger capacity to manage substantial amounts of data that need not be as immediately accessible to the CPU.

Files in the /tmp directory are designed to be temporary and are deleted upon system reboots to ensure that disk space is not unnecessarily used by leftover temporary files. This transience aids system performance by preventing the accumulation of obsolete data, providing a clean slate upon system startup and ensuring that temporary files do not interfere with new operations .

The /var directory is tailored to accommodate files that are expected to grow in size over time, such as system log files (/var/log), database files (/var/lib), mail (/var/mail), and print queues (/var/spool). This directory design anticipates the dynamic needs of a running system by organizing data that evolves with system operation, allowing for efficient access and management of growing files. The separation from static system components reflects a robust design for handling changeable data without disrupting overall system structure.

The /proc directory is a pseudo-filesystem that provides an interface to kernel data structures, making it essential for system monitoring and troubleshooting. It contains a hierarchy of special files representing the current state of the kernel, including process data in directories such as /proc/{pid} for specific processes. For instance, it includes system uptime information, which can help diagnose system issues . By offering real-time data about running processes and system resources, it aids administrators in understanding system behavior and performance.

/bin contains binary executables that are necessary for system operation in single-user modes and can be used by all system users, hence it includes common commands such as ps, ls, ping, grep, cp . In contrast, /sbin contains system executables that are typically used by system administrators for system maintenance purposes, including iptables, reboot, fdisk, ifconfig, swapon. Access to some commands in /sbin might be restricted to the root user .

The /etc directory is crucial as it holds all the configuration files required by various programs as well as startup and shutdown scripts necessary for controlling individual program operations. Examples include network configuration files like /etc/resolv.conf and log control files like /etc/logrotate.conf . Without these configurations, the system and associated software could not function correctly, emphasizing its role in maintaining system stability and operation.

The /media directory standardizes the location for mounting removable media devices, offering convenient access points for different device types such as /media/cdrom for CD-ROMs or /media/floppy for floppy drives . This organization simplifies the use and management of external devices by providing clear, predefined mount locations, allowing users to reliably locate and access removable media without needing to manually configure mount points for each device, thus enhancing user experience and system usability.

You might also like