DEV Community

talent
talent

Posted on

File Structures and Basic Symbols Used in Linux

File Structure:
/bin: User binaries (Common linux command needs to use in single-user mode)

/sbin: System binaries (Commands under this is for system maintenance purpose used by system admins)

/etc: Config files (etc: extended text configuration)

/dev: Device files

/proc: Process info (Contains running process info, Once the system gets rebooted then all the related files will get clear and will create new info. because it retrieves information from kernel and memory.)

/var: Variable files (It contains logs)

/tmp: Temporary files (Contains temporary files created by the system and user, Once system get reboot then all the files will get clear)

/usr: User programs (USR: Unix system resource. Contains binaries, libraries documentation files. Under it we have bin(Eg: less, awk) and sbin(Eg: cron,sshd) which contains binary files for user programs.)

/home: Home directories

/boot: Boot loader files(kernel files, grub files etc)

/lib: System libraries(Contains library files that supports the binaries that are located in /bin and /sbin)

/opt: Optional add-on apps(Contains add on installed application related files)

/mnt: Mount directory (To mount any foreign device temporarily)

/media: Removable device(To mount any removable device)

/srv: Service data (Contains server-specific service data)

Basic Symbols:

The dot (.) represents the current directory in the filesystem.

The dot-dot (..) represents one level above the current directory.

The forward slash (/) represents the "root" of the filesystem. (Every directory/file in the Linux filesystem is nested under the root/directory.)

The tilde (~) represents the home directory of the currently logged-in user.

The dash (-) navigates back to the previous working directory, similar to how you can navigate to your user home directory with ~. If you need to go back to our deeply nested directory 9 under your user home directory (this was my previous working directory), you would issue this command:

Top comments (0)