- The /bin Directory
- Как устанавливать bin файлы в Linux
- Установка bin файлов в Linux
- Консольный вариант
- Графический вариант
- Linux Root Folders Explained
- Linux Root folders
- / – The Root
- /bin – Binaries
- /boot – Boot Files
- /dev – Device Nodes
- /etc – Configuration Files
- /home – Users’ Folder
- /lib – Libraries
- /lost+found – Recovered Files
- /media – Automatic mount point
- /mnt – Manual mount point
- /opt – Optional Software
- /proc – Kernel Files
- /root – Root Home
- /run – Early temp
- /sbin – System Binaries
- /srv – Service Data
- /tmp – Temporary Files
- /usr – User Binaries
- /var – Variable Files
- Conclusion
The /bin Directory
/bin is a standard subdirectory of the root directory in Unix-like operating systems that contains the executable (i.e., ready to run) programs that must be available in order to attain minimal functionality for the purposes of booting (i.e., starting) and repairing a system.
The root directory, which is designated by a forward slash ( / ), is the top-level directory in the hierarchy of directories (also referred to as the directory tree) on Unix-like operating systems. That is, it is the directory that contains all other directories and their subdirectories as well as all files on the system.
A directory in a Unix-like operating system is merely a special type of file that contains a list of the names of objects (i.e., files, links and directories) that appear to the user to be in it along with the corresponding inodes for each object. A file is a named collection of related information that appears to the user as a single, contiguous block of data and that is retained in storage (e.g., a hard disk drive or a floppy disk). An inode is a data structure on a filesystem that stores all the information about a filesystem object except its name and its actual data. A data structure is a way of storing data so that it can be used efficiently. A filesystem is the hierarchy of directories that is used to organize files on a computer system.
The full names (also referred to as the absolute pathnames) of all of the subdirectories in the root directory begin with a forward slash, which shows their position in the filesystem hierarchy. In addition to /bin, some of the other standard subdirectories in the root directory include /boot, /dev, /etc, /home, /mnt, /usr, /proc and /var.
Among the contents of /bin are the shells (e.g., bash and csh), ls, grep, tar, kill, echo, ps, cp, mv, rm, cat, gzip, ping, su and the vi text editor. These programs can be used by both the root user (i.e., the administrative user) and ordinary users.
A list of all the programs in /bin can be viewed by using the ls command, which is commonly used to view the contents of directories, i.e.,
/bin is by default in PATH, which is the list of directories that the system searches for the corresponding program when a command is issued. This means that any executable file (i.e., runnable program) in /bin can be run just by entering the file name at the command line and then pressing the ENTER key. The contents of PATH can be seen by using the echo command as follows:
There are several other directories on Unix-like systems that also contain the string (i.e., sequence of characters) bin in their names, including /sbin and /usr/bin. The former contains additional programs that are used to boot the system as well as administrative and system maintenance programs that are only available to the root user. The latter contains executable programs that are not required for booting or repairing the system.
Created June 5, 2005.
Copyright © 2005 The Linux Information Project. All Rights Reserved.
Источник
Как устанавливать bin файлы в Linux
Не смотря, на то, что большинство программ в операционной системе Linux (в моем случае Ubuntu) можно установить из Центра приложений, тем самым обеспечивая совместимость с системой, иногда вам может понадобится установить новую версию программы или наоборот, старую, которой может не оказаться в списке.
Такие программы чаще всего распространяются, в формате .bin также известные как бинарные файлы. Бывает, что они запакованы в архив, а иногда как исполняемые файлы. Установка bin linux, может быть произведена через терминал либо же через графический интерфейс. Рассмотрим оба варианта.
Установка bin файлов в Linux
Консольный вариант
1. Для начала в файловом менеджере, нужно найти наш бинарник.
2. Откроем терминал, сочетанием клавиш Ctrl+Alt+T.
3. Зайдем в режим суперпользователя (под рутом). Для этого введем следующую команду в терминале:
Затем нужно ввести пароль.
4. Теперь, в терминале нам нужно зайти в ту директорию, где расположен наш бинарник. В моем случае это будет так:
5. Дайте права на выполнение файла .bin, командой:
chmod +x thefile.bin
В моем случае это выглядит так:
chmod +x clip2net.bin
6. Теперь выполните его. Для этого находясь уже в той директории, где находится бинарный файл введем точку и слэш, затем имя файла. В случае со мной это выглядит так:
7. После этой команды, установщик программы запустился и спрашивает меня на каком языке я хотел бы установить bin файл в linux.
8. Далее устанавливаем программу как обычно это делается в ОС Windows.
Графический вариант
Он ненамного проще, но для новичков, которые недавно перешли с Windows будет понятнее. Первые 3 пункта из консольного варианта все же придется выполнить. Затем нужно выбрать файл, нажать правой кнопкой мыши, выбрать пункт «свойства». На вкладке права, нужно поставить галочку напротив пункта «Разрешить выполнение файла как программы».
Закрываем окно. И перетаскиваем этот файл в терминал, запущенный от суперпользователя, имя файла и путь уже впишутся автоматически, остается лишь нажать на кнопку «Enter». Далее, вы можете установить bin файл, как и в первом варианте. На этом все.
Источник
Linux Root Folders Explained
In this post, you will finally get the Linux root folders explained. You will learn how these folders are used by your Linux system and how you can use them.
When you open your file manager, you are usually located in your home directory. But if you go two levels up, you will see this set of directories:
This post exactly about all these directories. You can watch the video where these Linux root folders explained or continue reading below.
Linux Root folders
I won’t use the terminal here and I will show you some visual presentation. But you are of course are encouraged to open the terminal and explore all these directories. Let’s get started.
/ – The Root
Everything begins in your system from this directory. All your folders, hard drives, USB drivers, everything is located in this root folder. You cannot go above this directory.
Also, the root directory is designated by the slash sign.
The concept of the root directory may be difficult to understand for Windows users who are used to see something like disk C, disk D and disk E. In Linux, every disk is a represented as a folder that is mounted under this root directory.
This Linux Directory Structure may look like a mess, but believe me when you learn it, you will realize how much sense it makes.
/bin – Binaries
The /bin folder contains programs that are essential for the system to boot and run. So, if you destroy this folder, your system won’t boot and run.
These programs are stored in the binary format. In other words, they are not in text format. You cannot open and read the content of these programs. The advantage of such format is that a computer can read and execute these programs very fast.
/boot – Boot Files
It is easy to guess from the name. This folder is needed to boot your system. It contains the Linux kernel, initial RAM disk image for drives need at boot time, and the bootloader.
I also would like to point out that within this boot folder, you can find the grub folder that contains grub configuration files.
If you read my Arch Linux post, you should remember than I used this command to generate the GRUB configuration file.
The boot folder also contains the Linux kernel.
/dev – Device Nodes
Here, I need to introduce another important concept of Linux – everything is a file. The /dev folder contains files for all devices your Linux is able to recognize.
If you have some Linux experience, you may recall that when you mount a hard drive, you use a name such as /dev/sda1 . The sda is the name of a first hard drive recognized by your Linux kernel and it is located in the dev folder. When the disk is mounted, you see it as a folder in that mounting point.
You can also find here USB devices, CPU etc.
/etc – Configuration Files
The /etc folder comprises all system-wide configuration files and some shell scripts that are executed during the system boot. All files here are text files, so they are human readable.
If you ever did any system-wide configuration, you probably edited some files here.
For example, there is /etc/fstab file that contains a table of storage devices and their mounting points.
/home – Users’ Folder
The home directory contains a home folder for each regular user on your Linux system. For example, I have tow folders in my /home folder. ALU is my home folder. The second folder belongs to another user, whom I named User2. So, the home folder of every user is named by its username.
You have as many folders as many users you have on your system.
These users’ folders are where users store their private data such as documents, videos, picture, music etc. When you open your file manager or your terminal by default you are located in you user’s home folder. It is also often marked as
/lib – Libraries
You already know the /bin directory that contains programs, this /lin folder contains libraries required by those programs from the /bin folder.
A library is a set of functions that are shared between programs. Thus, this /lib folder is also essential for your system to work correctly.
/lost+found – Recovered Files
You will have this directory if you use the ext4 file system. Most of the modern Linux distros use ext4, so most likely you have this folder. This is a file system specific folder that is used for data recovery in case of file corruption. Unless something bad has happened, this folder should be empty on your system.
This /lost+found folder is produced on every separate partition. So, if your /home folder is on a separate partition, you should have this /lost+found folder in your home directory too.
/media – Automatic mount point
This folder is used for automatic mounting of removable media such as USB drives, CD-ROM etc. For example, if your system is configured for automatic mounting, when you insert a USB drive it will be mounted to this folder.
/mnt – Manual mount point
The /mnt folder is similar to the /media folder, it is also used to mount devices, but usually, it is used for manual mounting. You, of course, can manually mount your devices to /media , but to keep some order in your system it is better to separate these two mounting points.
/opt – Optional Software
This folder is not essential for your system to work. Usually, it is used to install commercial programs on your system. For example, my Dropbox installation is located in this folder.
/proc – Kernel Files
This is a virtual file-system maintained by the Linux kernel. Usually, you do not touch anything in this folder. It is needed only for the kernel to run different processes.
/root – Root Home
This is the home directory of your root user. Don’t mix it with the / root directory. The / directory is the parental directory for the whole system, whereas this /root directory is the same as your user home directory but it is for the root account.
If you log in as a root, you will be located in this directory by default. This is a folder for private data and account specific setting of your root account.
/run – Early temp
The /run is a recently introduced folder that is actually a temporary file-system. It is used to store temporary files very early in system boot before the other temporary folders become available.
/sbin – System Binaries
Similar to /bin this folder contains binaries for essential system tasks but they are meant to be run by the super user, in other words, the administrator of the system.
/srv – Service Data
This directory contains service files installed on your system. For example, if you installed a web-served on your Linux system, it will be located in this folder.
/tmp – Temporary Files
This is just a place where programs store temporary files on your system. This directory is usually cleaned on reboot.
/usr – User Binaries
This is probably the largest folder after your home folder. It contains all programs used by a regular user.
I would like to stop little more on sub-directories of this /usr folder.
/usr/bin contains the programs installed by your Linux distribution. There are usually thousands of programs here.
The libraries for this /usr/bin executables are located in the /usr/lib folder.
The /usr/local doesn’t have any programs by default, but if you compile and install a program system-wide it will be placed here.
The most useful folder is /usr/share . It contains all the shared data used by the programs from /usr/bin .
All default configuration files, themes, icons, wallpapers, sound files are stored here, one more folder I would like to mention here is the /usr/share/doc folder, where you can find the documentation files for programs installed on your system.
/var – Variable Files
The /var contains files that are of variable content, so their content is not static and it constantly changes. For example, this is where the log files are stored. If you don’t know, a log file is a file that records all events happening in your system while it is running. These log files often help to find out if something is not working correctly in your system.
Conclusion
Now you have some clue about all those folders in your Linux system.
Please, feel free to add anything in the comments bellow in case I missed something.
Источник