Home > Operation and Maintenance > Linux Operation and Maintenance > What is the directory where basic linux commands are stored?

What is the directory where basic linux commands are stored?

青灯夜游
Release: 2023-01-05 16:13:42
Original
17432 people have browsed it

The directory where basic Linux commands are stored is "/bin". Bin is the abbreviation of binary. The "/bin" directory is a binary executable file directory. It is mainly used to place necessary executable files for the system, such as cat, cp, gzip, kill, ls, mkdir, more, mount, rm, etc.

What is the directory where basic linux commands are stored?

#The operating environment of this tutorial: Red Hat Enterprise Linux 6.1 system, Dell G3 computer.

The directory where basic Linux commands are stored is "/bin".

bin:

bin is the abbreviation of binary, which mainly places the necessary executable files of the system, such as:
cat, cp, chmod df, dmesg, gzip, kill, ls, mkdir, more, mount, rm, su, tar, etc.

What is the directory where basic linux commands are stored?

Tree directory structure:

What is the directory where basic linux commands are stored?

The following is an introduction to directory and file related commands, and by the way, we learned the directory organization structure :

List command: ls; parameter -l: detailed information, which is used to view what files are in the directory. I think the directory here is equivalent to the folder under windows. View the detailed command to also view the properties of these files. Linked files or file attributes called shortcuts start with l. If it is a directory, its file attributes begin with d;

View the current directory: pwd, used to view which directory it is currently in. When the Shell is first started, it is in the root directory. You can enter the root directory and use the ll command to view the directory structure.

1. /bin directory: bin is the abbreviation of Binary. This directory stores the most commonly used commands.

2. / boot directory:

1) Change directory [cd].

2) If you want to go to the root directory: [cd /]; and to go to the directory with an absolute path, [cd /boot] (absolute command).

3) You can view the files in the boot. To update the kernel, you need to update the files in the boot. vmlinuz-2.4.20-8 is the image of the kernel file;

In boot The grub directory stores the boot program, and grub.conf in the grub directory is the configuration file.

4) File printing (view file content): [cat]; such as [cat grub.conf].

3. /dev directory: [cd dev]; dev is the abbreviation of Device. Enter the device directory, which stores device files.

You need to care about this directory when making a driver.

What starts with b is a block device, and what starts with c is a character device; hdb2 represents the second partition of the second hard disk, and hda represents the first hard disk; (3, 66): 3 represents the major device number, Represents which type of equipment it is, 66 is the slave device number, and the identification is the number of this type of equipment.

4. /etc directory: [Return to the previous directory: [cd ..]; [cd etc] Enter the etc directory, which contains the system configuration files;

inittab File: Describes system startup settings at a certain run level. Run levels include halt, single user mode,

Full multiuser mode, X11 (graphical interface), reboot, etc.,

id: 5: Indicates starting with the graphical interface; the /etc/rc.d/rc.sysinit file configures the process started by the system. # respawn: The program behind it indicates that it will automatically restart after the process terminates unexpectedly;

rc.d: cd rc.d, the file name is green, which means it has execution permission;

on The directory one level above the first-level directory: [cd ../..]; if you are not sure which directory you are at, you can use the [pwd] command to check it;

The vsftpd directory in the etc directory: cd vsftpd , pay attention to when typing the command and hit cd vs, press the tab button directly, cd vsftpd will appear, because there is only one directory starting with vs;

vsftpd.conf: The file or directory you want to share is here File modification, as well as read and write permissions, etc.; but I can’t find the vsftpd directory in my etc directory. From what I read online, it seems that I need to create it myself, so I’ll skip it first.

5. /home directory: cd /home, the directory of the created user;

6. /initrd directory: initialization related configuration;

7. /lib directory : The suffix name is so which represents the dynamic link library;

8. /lost found directory: Lost file retrieval

9. /misc directory: Miscellaneous configuration;

10 ./mnt directory: The device must be mounted before it can be used; mount the optical drive: mount -t /dev/cdrom /mnt/cdrom;

Load the hard disk partition: mount -t (temporary loading) vfat (fat hard disk ) /dev/hda2 (assumed to be the second partition) /mnt/windows/d;

Add directory: mkdir; Add a widows directory: mkdir widows;

fdisk: Parameters can be added -l to view the hard disk partition corresponding to the device;

11. /opt directory: the directory of the user's own application program;

12. /proc directory: the mapping of the system running process, view its contents, the number represents the ID number of the process, cd 1, enter process No. 1:

Memory usage, space mapping, status, etc. ;

cpuinfo: cpu related information, cat cpuinfo view;

devices: devices;

filesystems: supported file systems;

interrupts: Interrupts supported by the system;

iomem: memory mapping, the left side after cat viewing represents the address mapping;

ioports: io port mapping;

meminfo: memory information;

modules: module driver, there are two loading methods for Linux driver:

1) Directly compile the kernel;

2) After Linux is started, insert a separate module into the kernel;

partitions: partition;

pci: bus number, device number on the bus, interrupt number;

stat: status information;

version: version;

uptime: Indicates the running time of the entire system;

13. /root directory: The directory where the root user logs in

14. /sbin directory: System management tools;

15. /tmp directory: stores temporary files;

16. /usr directory: src directory stores kernel source code; include: writes header files needed for Linux;

17. /var directory: stores temporary variables;

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of What is the directory where basic linux commands are stored?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template