Home  >  Article  >  Operation and Maintenance  >  What are the functions of commonly used directories in Linux?

What are the functions of commonly used directories in Linux?

巴扎黑
巴扎黑Original
2017-09-08 10:45:312768browse

This article mainly introduces relevant information that explains the role of commonly used directories in Linux. Here is a list of commonly used directories with examples to help you understand this part of the content. Friends in need can refer to

Detailed explanation of Linux The role of commonly used directories

A commonly used first-level directory

Note:

1. Bin and sbin in the root directory, and bin and sbin in the usr directory. These four directories are used to save system commands.
2. Any user can execute the commands in the bin directory, and only the super user can execute the commands in the sbin directory.
3. media is used to mount the CD, misc is used to mount the tape drive, and mnt is used to mount the U disk. They are all empty directories.
4. The proc and sys directories cannot be directly operated. These two directories store memory mount points.
5. You can place any content in the root or home directory, as well as the tmp directory.

2 Actual Combat


[root@localhost test]# cd /
[root@localhost /]# ls
bin  dev home  lib  media mydata proc run  srv tmp var
boot etc japan lib64 mnt  opt   root sbin sys usr
[root@localhost /]# ls /usr
bin games  lib  libexec sbin  src
etc include lib64 local  share tmp
[root@localhost /]# cd /dev
[root@localhost dev]# ls
autofs      mqueue       stdout tty35 tty63
block      net         tty   tty36 tty7
bsg       network_latency   tty0  tty37 tty8
btrfs-control  network_throughput tty1  tty38 tty9
bus       null        tty10  tty39 ttyS0
cdrom      nvram        tty11  tty4  ttyS1
char       oldmem       tty12  tty40 ttyS2
console     port        tty13  tty41 ttyS3
core       ppp         tty14  tty42 uhid
cpu       ptmx        tty15  tty43 uinput
cpu_dma_latency pts         tty16  tty44 urandom
crash      random       tty17  tty45 usbmon0
disk       raw         tty18  tty46 usbmon1
fd        rtc         tty19  tty47 vcs
full       rtc0        tty2  tty48 vcs1
fuse       sda         tty20  tty49 vcs2
hidraw0     sda1        tty21  tty5  vcs3
hpet       sda2        tty22  tty50 vcs4
hugepages    sda3        tty23  tty51 vcs5
initctl     sda4        tty24  tty52 vcs6
input      sda5        tty25  tty53 vcsa
kmsg       sda6        tty26  tty54 vcsa1
log       sda7        tty27  tty55 vcsa2
loop-control   sg0         tty28  tty56 vcsa3
lp0       sg1         tty29  tty57 vcsa4
lp1       shm         tty3  tty58 vcsa5
lp2       snapshot      tty30  tty59 vcsa6
lp3       snd         tty31  tty6  vfio
mapper      sr0         tty32  tty60 vga_arbiter
mcelog      stderr       tty33  tty61 vhost-net
mem       stdin        tty34  tty62 zero
[root@localhost dev]# ls /lib
alsa    grub     kbd       sendmail
binfmt.d  java     kdump      sendmail.postfix
cpp    java-1.5.0  kernel     sse2
crda    java-1.6.0  locale     sysctl.d
cups    java-1.7.0  modprobe.d   systemd
debug   java-1.8.0  modules     tmpfiles.d
dracut   java-ext   modules-load.d tuned
firewalld jvm     mozilla     udev
firmware  jvm-commmon polkit-1    udisks2
games   jvm-exports python2.7    x86_64-redhat-linux6E
gcc    jvm-private rpm       yum-plugins
[root@localhost dev]# cd /
[root@localhost /]# ls
bin  dev home  lib  media mydata proc run  srv tmp var
boot etc japan lib64 mnt  opt   root sbin sys usr

The above is the detailed content of What are the functions of commonly used directories in Linux?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn