Standard files in linux

Standard files in linux

Learn Latest Tutorials

Splunk tutorial

SPSS tutorial

Swagger tutorial

T-SQL tutorial

Tumblr tutorial

React tutorial

Regex tutorial

Reinforcement learning tutorial

R Programming tutorial

RxJS tutorial

React Native tutorial

Python Design Patterns

Python Pillow tutorial

Python Turtle tutorial

Keras tutorial

Preparation

Aptitude

Logical Reasoning

Verbal Ability

Company Interview Questions

Artificial Intelligence

AWS Tutorial

Selenium tutorial

Cloud Computing

Hadoop tutorial

ReactJS Tutorial

Data Science Tutorial

Angular 7 Tutorial

Blockchain Tutorial

Git Tutorial

Machine Learning Tutorial

DevOps Tutorial

B.Tech / MCA

DBMS tutorial

Data Structures tutorial

DAA tutorial

Operating System

Computer Network tutorial

Compiler Design tutorial

Computer Organization and Architecture

Discrete Mathematics Tutorial

Ethical Hacking

Computer Graphics Tutorial

Software Engineering

html tutorial

Cyber Security tutorial

Automata Tutorial

C Language tutorial

C++ tutorial

Java tutorial

.Net Framework tutorial

Python tutorial

List of Programs

Control Systems tutorial

Data Mining Tutorial

Data Warehouse Tutorial

Javatpoint Services

JavaTpoint offers too many high quality services. Mail us on h[email protected], to get more information about given services.

  • Website Designing
  • Website Development
  • Java Development
  • PHP Development
  • WordPress
  • Graphic Designing
  • Logo
  • Digital Marketing
  • On Page and Off Page SEO
  • PPC
  • Content Development
  • Corporate Training
  • Classroom and Online Training
  • Data Entry

Training For College Campus

JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected].
Duration: 1 week to 2 week

Like/Subscribe us for latest updates or newsletter RSS Feed Subscribe to Get Email Alerts Facebook Page Twitter Page YouTube Blog Page

Источник

What are the standard file locations in Linux systems?

Learn the directory structure and where common files are located in Linux.

Screen from

Screen from «What are the standard file locations in Linux systems?» (source: O’Reilly)

As a Linux administrator or ethical hacker you need to know where the common files are located and how directories are structured in Linux. In this video, Ted Jordan shows you where the user’s home directories reside, where the bootable files are located, and where the libraries are located. You will learn a command to clear the screen, how to recognize bootable files, and where to find the all-important logs.

Learn faster. Dig deeper. See farther.

Join the O’Reilly online learning platform. Get a free trial today and find answers on the fly, or master something new and useful.

Ted Jordan has more than 25 years of Linux and UNIX programming and training experience working for companies such as General Motors, Silicon Graphics, and Sun Microsystems. He now leads Funutation Tech Camp, a Massachusetts-based company that’s taught more than 25,000 children how to write computer games, program battle robots, and build websites. Ted earned an MS in Mechanical Engineering from UC Berkeley; and he holds the LPIC-1, Linux+, SUSE Certified Linux Administrator (CLA), Network+, A+, Security+, Solaris Administrator, and Certified Ethical Hacker certifications.

Источник

Читайте также:  Установить менеджер обновлений linux mint

Linux File Hierarchy Structure

The Linux File Hierarchy Structure or the Filesystem Hierarchy Standard (FHS) defines the directory structure and directory contents in Unix-like operating systems. It is maintained by the Linux Foundation.

  • In the FHS, all files and directories appear under the root directory /, even if they are stored on different physical or virtual devices.
  • Some of these directories only exist on a particular system if certain subsystems, such as the X Window System, are installed.
  • Most of these directories exist in all UNIX operating systems and are generally used in much the same way; however, the descriptions here are those used specifically for the FHS and are not considered authoritative for platforms other than Linux.

Primary hierarchy root and root directory of the entire file system hierarchy.

  • Every single file and directory start from the root directory.
  • The only root user has the right to write under this directory.
  • /root is the root user’s home directory, which is not the same as /

2. /bin :

Essential command binaries that need to be available in single-user mode; for all users, e.g., cat, ls, cp.

  • 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 e.g. ps, ls, ping, grep, cp

3. /boot :

Boot loader files, e.g., kernels, initrd.

  • Kernel initrd, vmlinux, grub files are located under /boot
  • Example: initrd.img-2.6.32-24-generic, vmlinuz-2.6.32-24-generic

4. /dev :

Essential device files, e.g., /dev/null.

  • These include terminal devices, usb, or any device attached to the system.
  • Example: /dev/tty1, /dev/usbmon0
Читайте также:  What is ttys0 linux

5. /etc :

Host-specific system-wide configuration files.

  • Contains configuration files required by all programs.
  • This also contains startup and shutdown shell scripts used to start/stop individual programs.
  • Example: /etc/resolv.conf, /etc/logrotate.conf.

6. /home :

Users’ home directories, containing saved files, personal settings, etc.

  • Home directories for all users to store their personal files.
  • example: /home/kishlay, /home/kv

7. /lib:

Libraries essential for the binaries in /bin/ and /sbin/.

8. /media:

Mount points for removable media such as CD-ROMs (appeared in FHS-2.3).

  • Temporary mount directory for removable devices.
  • Examples, /media/cdrom for CD-ROM; /media/floppy for floppy drives; /media/cdrecorder for CD writer

9. /mnt :

Temporarily mounted filesystems.

10. /opt :

Optional application software packages.

  • Contains add-on applications from individual vendors.
  • Add-on applications should be installed under either /opt/ or /opt/ sub-directory.

11. /sbin :

Essential system binaries, e.g., fsck, init, route.

  • Just like /bin, /sbin also contains binary executables.
  • The linux commands located under this directory are used typically by system administrators, for system maintenance purposes.
  • Example: iptables, reboot, fdisk, ifconfig, swapon

12. /srv :

Site-specific data served by this system, such as data and scripts for web servers, data offered by FTP servers, and repositories for version control systems.

  • srv stands for service.
  • Contains server specific services related data.
  • Example, /srv/cvs contains CVS related data.

13. /tmp :

Temporary files. Often not preserved between system reboots and may be severely size restricted.

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

14. /usr :

Secondary hierarchy for read-only user data; contains the majority of (multi-)user utilities and applications.

  • 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’s programs that you install from source. For example, when you install apache from source, it goes under /usr/local/apache2
  • /usr/src holds the Linux kernel sources, header-files and documentation.
Читайте также:  Как запустить систему linux

15. /proc:

Virtual filesystem providing process and kernel information as files. In Linux, it corresponds to a procs mount. Generally, automatically generated and populated by the system, on the fly.

  • Contains information about system process.
  • This is a pseudo filesystem that contains information about running processes. For example: /proc/ 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

Modern Linux distributions include a /run directory as a temporary filesystem (tmpfs) which stores volatile runtime data, following the FHS version 3.0. According to the FHS version 2.3, such data were stored in /var/run but this was a problem in some cases because this directory is not always available at early boot. As a result, these programs have had to resort to trickery, such as using /dev/.udev, /dev/.mdadm, /dev/.systems or /dev/.mount directories, even though the device directory isn’t intended for such data.Among other advantages, this makes the system easier to use normally with the root filesystem mounted read-only. For example, below are the changes Debian made in its 2013 Wheezy release:

  • /dev/.* ? /run/*
  • /dev/shm ? /run/shm
  • /dev/shm/* ? /run/*
  • /etc/* (writable files) ? /run/*
  • /lib/init/rw ? /run
  • /var/lock ? /run/lock
  • /var/run ? /run
  • /tmp ? /run/tmp

?list=PLqM7alHXFySFc4KtwEZTANgmyJm3NqS_L
This article is contributed by Kishlay Verma. If you like GeeksforGeeks and would like to contribute, you can also write an article using write.geeksforgeeks.org or mail your article to review-team@geeksforgeeks.org. See your article appearing on the GeeksforGeek’s main page and help other Geeks.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

Источник

Оцените статью
Adblock
detector