Get the App
SLTechnology News&Howtos  ›  Servers  › 

What are the differences between / bin, / sbin, / usr/bin, / usr/sbin in Linux

Shulou Source: shulou.com Published: 2022-06-01 10:35:26 11月11日 Update

This article will explain in detail the differences between/bin, /sbin, /usr/bin,/usr/sbin in Linux. Xiaobian thinks it is quite practical, so share it with you as a reference. I hope you can gain something after reading this article.

The four application directories we use most often under linux are: /bin,/sbin,/usr/bin,/usr/sbin

bin:

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

/usr/bin:

The main place some application software tools necessary execution files such as c++, g++, gcc, chdrv, diff, dig, du, reject, elm, free, gnome*, zip, htpasswd, kfm, ktop, last, less, locale, m4, make, man, mcopy, ncftp, nealiases, nslookup passwd, quota, smb*, wget, etc.

/sbin:

The main place some system management necessary procedures such as:cfdisk, dhcpcd, dump, e2fsck, fdisk, half, ifconfig, ifup, ifdown, init, insmod, lilo, lsmod, mke2fs, modprobe, quotacheck, reboot, rmmod, runlevel, shutdown and so on.

/usr/sbin:

Put in some network management prerequisites such as dhcpd, httpd, imap, in.* d, inetd, lpd, named, netconfig, nmbd, samba, sendmail, squid, swap, tcpd, tcpdump, etc.

/ : this is root directory

/bin : commands in this dir are all system installed user commands

/sbin: commands in this dir are all system installed super user commands

/usr/bin: user commands for applications

/usr/sbin: super user commands for applications

/usr/local/bin : application user commands

/usr/local/sbin: application super user commands

/bin: are some instructions for the system.

/sbin: Generally refers to the super-user command.

/usr/bin: is a script for running some software that you install later.

Summary:

If it is a binary file required by users and administrators, it will be placed in/bin;

Binary files that are required by system administrators but not used by the average user are placed in/sbin.

If it is not a binary file required by the user, it will probably be placed in/usr/bin;

If it is not a necessary tool for system administrators, such as network administration commands, most will be placed in/usr/sbin.

About "Linux/bin, /sbin, /usr/bin, /usr/sbin what are the differences" This article is shared here, I hope the above content can be of some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it for more people to see.

Tags: Management systems users binaries files programs administrators articles tools instructions more software applications good practical content commands applications applications articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Shulou Technology Docker Linux vpn