In Linux, the bin directory is a binary file directory, which contains binary executable files. It 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. The purpose of the binary file depends on the system or application. If the software is installed by the user, the main program file of the software will be in the directory "/usr/local/bin".

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
What is the Linux bin directory?
bin is the abbreviation of binary. The directory contains binary executable files, which are mainly used to store system essentials. Execution files, such as:
cat, cp, chmod df, dmesg, gzip, kill, ls, mkdir, more, mount, rm, su, tar, etc.

Binary file
Simply put, text files are files based on character encoding. Common encodings include ASCII encoding and UNICODE Encoding and more. Binary files are files based on value encoding. You can specify what a certain value means according to the specific application (such a process can be regarded as custom encoding). As can be seen from the above, text files are basically fixed-length encoded. Based on characters, each character is fixed in the specific encoding. ASCII code is an 8-bit encoding, and UNICODE generally occupies 16 bits. Binary files can be regarded as variable-length encoding, because it is value encoding. How many bits represent a value is entirely up to you.
Explanation:
There is also a bin directory under /usr: /usr/bin, and the file paths in it are also executable files for some commands;
If the software is installed by the user, the main program file of the software will be in the directory /usr/local/bin (or the installation directory specified by the user, such as /usr/local/apache/bin) . Such as /usr/local/apache/bin).
Expand knowledge
In the Linux system, there are two important directories: bin and sbin, including /bin, /usr/bin/ and /sbin, /usr/sbin/.
/usr/bin:
Mainly places the necessary executable files of application tools, for example:
c, g, gcc, chdrv, diff, dig, du, eject, elm, free, gnome*, gzip, htpasswd, kfm, ktop, last, less, locale, m4, make, man, mcopy, ncftp , newaliases, nslookup passwd, quota, smb*, wget, etc.
/sbin:
Mainly places necessary programs for system management, such as:
cfdisk, dhcpcd, dump, e2fsck, fdisk, halt, ifconfig, ifup, ifdown, init, insmod, lilo, lsmod, mke2fs, modprobe, quotacheck, reboot, rmmod, runlevel, shutdown, etc.
/usr/sbin:
Mainly places necessary programs for network management, such as:
dhcpd, httpd, imap, in.*d, inetd, lpd, named, netconfig, nmbd, samba, sendmail, squid, swap, tcpd, tcpdump, etc.
/bin,/sbin,/usr The difference between /bin and /usr/sbin
/ : this is root directory root 用户根目录 /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/X11R6/bin : X application user commands /usr/X11R6/sbin: X application super user commands
Linux command list
| Linux 命令大全 | |||
|---|---|---|---|
| 1、文件管理 | |||
| cat | chattr | chgrp | chmod |
| chown | cksum | cmp | diff |
| diffstat | file | find | git |
| gitview | indent | cut | ln |
| less | locate | lsattr | mattrib |
| mc | mdel | mdir | mktemp |
| more | mmove | mread | mren |
| mtools | mtoolstest | mv | od |
| paste | patch | rcp | rm |
| slocate | split | tee | tmpwatch |
| touch | umask | which | cp |
| whereis | mcopy | mshowfat | rhmask |
| scp | awk | read | updatedb |
| 2、文档编辑 | |||
| col | colrm | comm | csplit |
| ed | egrep | ex | fgrep |
| fmt | fold | grep | ispell |
| jed | joe | join | look |
| mtype | pico | rgrep | sed |
| sort | spell | tr | expr |
| uniq | wc | let | |
| 3、文件传输 | |||
| lprm | lpr | lpq | lpd |
| bye | ftp | uuto | uupick |
| uucp | uucico | tftp | ncftp |
| ftpshut | ftpwho | ftpcount | |
| 4、磁盘管理 | |||
| cd | df | dirs | du |
| edquota | eject | mcd | mdeltree |
| mdu | mkdir | mlabel | mmd |
| mrd | mzip | pwd | quota |
| mount | mmount | rmdir | rmt |
| stat | tree | umount | ls |
| quotacheck | quotaoff | lndir | repquota |
| quotaon | |||
| 5、磁盘维护 | |||
| badblocks | cfdisk | dd | e2fsck |
| ext2ed | fsck | fsck.minix | fsconf |
| fdformat | hdparm | mformat | mkbootdisk |
| mkdosfs | mke2fs | mkfs.ext2 | mkfs.msdos |
| mkinitrd | mkisofs | mkswap | mpartition |
| swapon | symlinks | sync | mbadblocks |
| mkfs.minix | fsck.ext2 | fdisk | losetup |
| mkfs | sfdisk | swapoff | |
| 6、网络通讯 | |||
| apachectl | arpwatch | dip | getty |
| mingetty | uux | telnet | uulog |
| uustat | ppp-off | netconfig | nc |
| httpd | ifconfig | minicom | mesg |
| dnsconf | wall | netstat | ping |
| pppstats | samba | setserial | talk |
| traceroute | tty | newaliases | uuname |
| netconf | write | statserial | efax |
| pppsetup | tcpdump | ytalk | cu |
| smbd | testparm | smbclient | shapecfg |
| 7、系统管理 | |||
| adduser | chfn | useradd | date |
| exit | finger | fwhios | sleep |
| suspend | groupdel | groupmod | halt |
| kill | last | lastb | login |
| logname | logout | ps | nice |
| procinfo | top | pstree | reboot |
| rlogin | rsh | sliplogin | screen |
| shutdown | rwho | sudo | gitps |
| swatch | tload | logrotate | uname |
| chsh | userconf | userdel | usermod |
| vlock | who | whoami | whois |
| newgrp | renice | su | skill |
| w | id | groupadd | free |
| 8、系统设置 | |||
| reset | clear | alias | dircolors |
| aumix | bind | chroot | clock |
| crontab | declare | depmod | dmesg |
| enable | eval | export | pwunconv |
| grpconv | rpm | insmod | kbdconfig |
| lilo | liloconfig | lsmod | minfo |
| set | modprobe | ntsysv | mouseconfig |
| passwd | pwconv | rdate | resize |
| rmmod | grpunconv | modinfo | time |
| setup | sndconfig | setenv | setconsole |
| timeconfig | ulimit | unset | chkconfig |
| apmd | hwclock | mkkickstart | fbset |
| unalias | SVGATextMode | gpasswd | |
| 9、备份压缩 | |||
| ar | bunzip2 | bzip2 | bzip2recover |
| gunzip | unarj | compress | cpio |
| dump | uuencode | gzexe | gzip |
| lha | restore | tar | uudecode |
| unzip | zip | zipinfo | |
| 10、设备管理 | |||
| setleds | loadkeys | rdev | dumpkeys |
| MAKEDEV | poweroff | ||
Recommended learning: Linux video tutorial
The above is the detailed content of What is the bin directory in linux. For more information, please follow other related articles on the PHP Chinese website!
Linux's Essential Components: Explained for BeginnersApr 17, 2025 am 12:08 AMThe core components of Linux include the kernel, file system, shell and common tools. 1. The kernel manages hardware resources and provides basic services. 2. The file system organizes and stores data. 3. Shell is the interface for users to interact with the system. 4. Common tools help complete daily tasks.
Linux: A Look at Its Fundamental StructureApr 16, 2025 am 12:01 AMThe basic structure of Linux includes the kernel, file system, and shell. 1) Kernel management hardware resources and use uname-r to view the version. 2) The EXT4 file system supports large files and logs and is created using mkfs.ext4. 3) Shell provides command line interaction such as Bash, and lists files using ls-l.
Linux Operations: System Administration and MaintenanceApr 15, 2025 am 12:10 AMThe key steps in Linux system management and maintenance include: 1) Master the basic knowledge, such as file system structure and user management; 2) Carry out system monitoring and resource management, use top, htop and other tools; 3) Use system logs to troubleshoot, use journalctl and other tools; 4) Write automated scripts and task scheduling, use cron tools; 5) implement security management and protection, configure firewalls through iptables; 6) Carry out performance optimization and best practices, adjust kernel parameters and develop good habits.
Understanding Linux's Maintenance Mode: The EssentialsApr 14, 2025 am 12:04 AMLinux maintenance mode is entered by adding init=/bin/bash or single parameters at startup. 1. Enter maintenance mode: Edit the GRUB menu and add startup parameters. 2. Remount the file system to read and write mode: mount-oremount,rw/. 3. Repair the file system: Use the fsck command, such as fsck/dev/sda1. 4. Back up the data and operate with caution to avoid data loss.
How Debian improves Hadoop data processing speedApr 13, 2025 am 11:54 AMThis article discusses how to improve Hadoop data processing efficiency on Debian systems. Optimization strategies cover hardware upgrades, operating system parameter adjustments, Hadoop configuration modifications, and the use of efficient algorithms and tools. 1. Hardware resource strengthening ensures that all nodes have consistent hardware configurations, especially paying attention to CPU, memory and network equipment performance. Choosing high-performance hardware components is essential to improve overall processing speed. 2. Operating system tunes file descriptors and network connections: Modify the /etc/security/limits.conf file to increase the upper limit of file descriptors and network connections allowed to be opened at the same time by the system. JVM parameter adjustment: Adjust in hadoop-env.sh file
How to learn Debian syslogApr 13, 2025 am 11:51 AMThis guide will guide you to learn how to use Syslog in Debian systems. Syslog is a key service in Linux systems for logging system and application log messages. It helps administrators monitor and analyze system activity to quickly identify and resolve problems. 1. Basic knowledge of Syslog The core functions of Syslog include: centrally collecting and managing log messages; supporting multiple log output formats and target locations (such as files or networks); providing real-time log viewing and filtering functions. 2. Install and configure Syslog (using Rsyslog) The Debian system uses Rsyslog by default. You can install it with the following command: sudoaptupdatesud
How to choose Hadoop version in DebianApr 13, 2025 am 11:48 AMWhen choosing a Hadoop version suitable for Debian system, the following key factors need to be considered: 1. Stability and long-term support: For users who pursue stability and security, it is recommended to choose a Debian stable version, such as Debian11 (Bullseye). This version has been fully tested and has a support cycle of up to five years, which can ensure the stable operation of the system. 2. Package update speed: If you need to use the latest Hadoop features and features, you can consider Debian's unstable version (Sid). However, it should be noted that unstable versions may have compatibility issues and stability risks. 3. Community support and resources: Debian has huge community support, which can provide rich documentation and
TigerVNC share file method on DebianApr 13, 2025 am 11:45 AMThis article describes how to use TigerVNC to share files on Debian systems. You need to install the TigerVNC server first and then configure it. 1. Install the TigerVNC server and open the terminal. Update the software package list: sudoaptupdate to install TigerVNC server: sudoaptinstalltigervnc-standalone-servertigervnc-common 2. Configure TigerVNC server to set VNC server password: vncpasswd Start VNC server: vncserver:1-localhostno


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

WebStorm Mac version
Useful JavaScript development tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 English version
Recommended: Win version, supports code prompts!

Zend Studio 13.0.1
Powerful PHP integrated development environment






