- unixforum.org
- зачем нужна директория /opt ? (наверно священная война)
- зачем нужна директория /opt ? (наверно священная война)
- Re: зачем нужна директория /opt ? (наверно священная война)
- Re: зачем нужна директория /opt ? (наверно священная война)
- Re: зачем нужна директория /opt ? (наверно священная война)
- Re: зачем нужна директория /opt ? (наверно священная война)
- Re: зачем нужна директория /opt ? (наверно священная война)
- Re: зачем нужна директория /opt ? (наверно священная война)
- Re: зачем нужна директория /opt ? (наверно священная война)
- Re: зачем нужна директория /opt ? (наверно священная война)
- Opt file in linux
- Linux: What is Opt Directory and How to Open Opt Directory
- /opt Directory
- Permissions for /opt Directory
- Open /opt in Ubuntu
- Linux Directory Structure Explained for Beginners
- Linux directory structure
- / – The root directory
- /bin – Binaries
- /dev – Device files
- /etc – Configuration files
- /usr – User binaries and program data
- /home – User personal data
- /lib – Shared libraries
- /sbin – System binaries
- /tmp – Temporary files
- /var – Variable data files
- /boot – Boot files
- /proc – Process and kernel files
- /opt – Optional software
- /root – The home directory of the root
- /media – Mount point for removable media
- /mnt – Mount directory
- /srv – Service data
unixforum.org
Форум для пользователей UNIX-подобных систем
- Темы без ответов
- Активные темы
- Поиск
- Статус форума
зачем нужна директория /opt ? (наверно священная война)
зачем нужна директория /opt ? (наверно священная война)
Сообщение arsis » 07.01.2009 08:27
впринципе просто узнать мнение
ну нахождение иногда OpenOffice.org в /opt еще както логично
но вот gnome-ppp в opt вааще нонсенс ИМХО
а вообще зачем она нужна какая логика в директории opt чем неураевает /usr
Re: зачем нужна директория /opt ? (наверно священная война)
Сообщение Giant Tao » 07.01.2009 08:40
впринципе просто узнать мнение
ну нахождение иногда OpenOffice.org в /opt еще както логично
но вот gnome-ppp в opt вааще нонсенс ИМХО
а вообще зачем она нужна какая логика в директории opt чем неураевает /usr
/opt — В этом каталоге размещаются дополнительные пакеты программ. Особенность Linux в том, что все пакеты программ, устанавливаются в этот каталог, например /opt/ . В последствии если этот пакет больше не будет нужен, то достаточно всего лишь удалить соответствующий каталог. В дистрибутивах SlackWare некоторые программы изначально поставляются в каталоге /opt (например, KDE — в /opt/kde).
а вообще гугл тебе в помощь, я задал и вот цевильный ответ Читай тут про назначение папок в Линуксе . Удачи
Re: зачем нужна директория /opt ? (наверно священная война)
Сообщение zwey » 07.01.2009 08:47
Re: зачем нужна директория /opt ? (наверно священная война)
Сообщение arsis » 07.01.2009 08:50
тема не несущяя смысла
гы
ну в десктопном дистре логичнее было httpd (или там samba) положить в opt чем пакеты gnome
или ктото расмастривает opensuse как серверный
зы в серверах один фиг все разносят по разным дисковым массивам с расчетом на конкуренцию
Re: зачем нужна директория /opt ? (наверно священная война)
Сообщение bluesman » 07.01.2009 10:16
Re: зачем нужна директория /opt ? (наверно священная война)
Сообщение Ben Aceler » 07.01.2009 10:30
впринципе просто узнать мнение
ну нахождение иногда OpenOffice.org в /opt еще както логично
но вот gnome-ppp в opt вааще нонсенс ИМХО
а вообще зачем она нужна какая логика в директории opt чем неураевает /usr
Re: зачем нужна директория /opt ? (наверно священная война)
Сообщение rm_ » 07.01.2009 16:56
Re: зачем нужна директория /opt ? (наверно священная война)
Сообщение Bluetooth » 07.01.2009 17:32
в опэнсусе кде3 собрано все в /opt/kde3.
с одной стороны, зачем? с другой — нет конфликтов с кедами 4, которые ставятся в /usr (хотя лично я бы сделал наоборот
)
и, наконец, пользователям-то какая разница, где валяются файлы всяких пакетов, в юср или в опт?
или у вас развлечение такое, шариться по системным каталогам?
Re: зачем нужна директория /opt ? (наверно священная война)
Сообщение k0da » 07.01.2009 17:36
Все продукты IBM ставятся в /opt
To avoid name space collisions when installing LSB-conforming applications, the applications belonging to the base operating system or the distribution are to be installed in /sbin/, /bin/, or /usr/. System administrators can build packages from source and install them into the /usr/local/ directory. However, third-party packages of add-on software must be installed in /opt/
is the name that describes a software suite. Associated files of these /opt/ applications may be in /var/opt/
/. Although the LSB specifies that the application is to be installed in /opt/, it is a good idea to make this a relocatable prefix in the RPM spec file. This will let the installer override that location and place the files elsewhere if there are mitigating circumstances.
Источник
Opt file in linux
This directory is reserved for all the software and add-on packages that are not part of the default installation. For example, StarOffice, Kylix, Netscape Communicator and WordPerfect packages are normally found here. To comply with the FSSTND, all third party applications should be installed in this directory. Any package to be installed here must locate its static files (ie. extra fonts, clipart, database files) must locate its static files in a separate /opt/’package’ or /opt/’provider’ directory tree (similar to the way in which Windows will install new software to its own directory tree C:\Windows\Progam Files\»Program Name»), where ‘package’ is a name that describes the software package and ‘provider’ is the provider’s LANANA registered name.
Although most distributions neglect to create the directories /opt/bin, /opt/doc, /opt/include, /opt/info, /opt/lib, and /opt/man they are reserved for local system administrator use. Packages may provide «front-end» files intended to be placed in (by linking or copying) these reserved directories by the system administrator, but must function normally in the absence of these reserved directories. Programs to be invoked by users are located in the directory /opt/’package’/bin. If the package includes UNIX manual pages, they are located in /opt/’package’/man and the same substructure as /usr/share/man must be used. Package files that are variable must be installed in /var/opt. Host-specific configuration files are installed in /etc/opt.
Under no circumstances are other package files to exist outside the /opt, /var/opt, and /etc/opt hierarchies except for those package files that must reside in specific locations within the filesystem tree in order to function properly. For example, device lock files in /var/lock and devices in /dev. Distributions may install software in /opt, but must not modify or delete software installed by the local system administrator without the assent of the local system administrator.
The use of /opt for add-on software is a well-established practice in the UNIX community. The System V Application Binary Interface [AT&T 1990], based on the System V Interface Definition (Third Edition) and the Intel Binary Compatibility Standard v. 2 (iBCS2) provides for an /opt structure very similar to the one defined here.
Generally, all data required to support a package on a system must be present within /opt/’package’, including files intended to be copied into /etc/opt/’package’ and /var/opt/’package’ as well as reserved directories in /opt. The minor restrictions on distributions using /opt are necessary because conflicts are possible between distribution installed and locally installed software, especially in the case of fixed pathnames found in some binary software.
The structure of the directories below /opt/’provider’ is left up to the packager of the software, though it is recommended that packages are installed in /opt/’provider’/’package’ and follow a similar structure to the guidelines for /opt/package. A valid reason for diverging from this structure is for support packages which may have files installed in /opt/ ‘provider’/lib or /opt/’provider’/bin.
Источник
Linux: What is Opt Directory and How to Open Opt Directory
By Sourabh / October 26, 2017 Category: How To, Ubuntu
Linux: What is opt directory used for? Know how to open opt file in Ubuntu terminal and how to change permission of opt folder in Ubuntu. The /opt is for “the installation of add-on application software packages”. /opt is reserved for the installation of such software packages.
/opt Directory
Note that the directories /opt/bin, /opt/doc, /opt/include, /opt/info, /opt/lib, and /opt/man are reserved for local system administrator use. Also note that the package files that are variable must be installed in /var/opt. Whereas the host-specific configuration files must be installed in /etc/opt.
In general terms, the /opt directory is reserved for all the software and add-on packages that are not part of the default installation. For example, all third party applications should be installed in this directory. Any package to be installed here must locate its static files in a separate /opt/’package’ or /opt/’provider’ directory tree. Under no circumstances are other package files to exist outside the /opt, /var/opt, and /etc/opt hierarchies except for those package files that must reside in specific locations within the filesystem tree in order to function properly.
Generally, all data required to support a package on a system must be present within /opt/’package’, including files intended to be copied into /etc/opt/’package’ and /var/opt/’package’ as well as reserved directories in /opt. The minor restrictions on distributions using /opt are necessary because conflicts are possible between distribution installed and locally installed software, especially in the case of fixed pathnames found in some binary software.
Permissions for /opt Directory
The default permissions for /opt are drwxr-xr-x with ownership root:root. Users can manually set this ownership and permissions:
sudo chown root:root /opt
sudo chmod 0755 /opt
Open /opt in Ubuntu
Ubuntu users can easily open /opt in Ubuntu. To open it via Terminal, use CD and navigate to the opt folder and simply use ls command to see the contents of the directory. Users can also access the /opt directory graphically. Open files tab and select the opt folder.
Источник
Linux Directory Structure Explained for Beginners
If you are even faintly acquainted with Linux, you might have heard the terms root, lib, bin etc. These are various directories that you’ll find in all Linux distributions.
In fact, the Linux Foundation maintains a Filesystem Hierarchy Standard (FHS). This FHS defines the directory structure and the content/purpose of the directories in Linux distributions. Thanks to this FHS, you’ll find the same directory structure in (almost) all the Linux distributions.
Let’s see the Linux directory structure in detail.
Linux directory structure
Linux is based on UNIX and hence it borrows its filesystem hierarchy from UNIX. You’ll fine a similar directory structure in UNIX-like operating systems such as BSD and macOS. I’ll be using the term Linux hereafter instead of UNIX though.
/ – The root directory
Everything, all the files and directories, in Linux are located under ‘root’ represented by ‘/’. If you look at the directory structure, you’ll realize that it is similar to a plant’s root.
Linux Directory Structure
Since all other directories or files are descended from root, the absolute path of any file is traversed through root. For example, if you have a file in /home/user/documents, you can guess that the directory structure goes from root->home->user->documents.
The cruel rm -rf / joke
You may have come across some jokes on internet that mentions “rm -rf /” . rm command is used for removing files and directories in Linux.
With rm -rf /, you ask your system to forcefully and recursively delete the contents of the root directory. Since root directory has everything underneath, you end up deleting everything and your Linux system just vanishes (theoretically).
Most Linux distribution won’t run this command unless you provide –no-preserve-root. In any case, don’t be curious to run this command. Curiosity killed the cat, after all.
/bin – Binaries
The ‘/bin’ directly contains the executable files of many basic shell commands like ls, cp, cd etc. Mostly the programs are in binary format here and accessible by all the users in the Linux system.
/dev – Device files
This directory only contains special files, including those relating to the devices. These are virtual files, not physically on the disk.
Some interesting examples of these files are:
- /dev/null: can be sent to destroy any file or string
- /dev/zero: contains an infinite sequence of 0
- /dev/random: contains an infinite sequence of random values
/etc – Configuration files
The /etc directory contains the core configuration files of the system, use primarily by the administrator and services, such as the password file and networking files.
If you need to make changes in system configuration (for example changing the hostname), this is where you’ll find the respective files.
/usr – User binaries and program data
in ‘/usr’ go all the executable files, libraries, source of most of the system programs. For this reason, most of the files contained therein is readonly (for the normal user)
- ‘/usr/bin’ contains basic user commands
- ‘/usr/sbin’ contains additional commands for the administrator
- ‘/usr/lib’ contains the system libraries
- ‘/usr/share’ contains documentation or common to all libraries, for example ‘/usr/share/man’ contains the text of the manpage
/home – User personal data
Home directory contains personal directories for the users. The home directory contains the user data and user-specific configuration files. As a user, you’ll put your personal files, notes, programs etc in your home directory.
When you create a user on your Linux system, it’s a general practice to create a home directory for the user. Suppose your Linux system has two users, Alice and Bob. They’ll have a home directory of their own at locations /home/alice and /home/bob.
Do note that Bob won’t have access to /home/alice and vice versa. That makes sense because only the user should have access to his/her home. You may read about file permissions in Linux to know more on this topic.
/lib – Shared libraries
Libraries are basically codes that can be used by the executable binaries. The /lib directory holds the libraries needed by the binaries in /bin and /sbin directories.
Libraries needed by the binaries in the /usr/bin and /usr/sbin are located in the directory /usr/lib.
/sbin – System binaries
This is similar to the /bin directory. The only difference is that is contains the binaries that can only be run by root or a sudo user. You can think of the ‘s’ in ‘sbin’ as super or sudo.
/tmp – Temporary files
As the name suggests, this directory holds temporary files. Many applications use this directory to store temporary files. Even you can use directory to store temporary files.
But do note that the contains of the /tmp directories are deleted when your system restarts. Some Linux system also delete files old files automatically so don’ store anything important here.
/var – Variable data files
Var, short for variable, is where programs store runtime information like system logging, user tracking, caches, and other files that system programs create and manage.
The files stored here are NOT cleaned automatically and hence it provides a good place for system administrators to look for information about their system behavior. For example, if you want to check the login history in your Linux system, just check the content of the file in /var/log/wtmp.
/boot – Boot files
The ‘/boot’ directory contains the files of the kernel and boot image, in addition to LILO and Grub. It is often advisable that the directory resides in a partition at the beginning of the disc.
/proc – Process and kernel files
The ‘/proc’ directory contains the information about currently running processes and kernel parameters. The content of the proc directory is used by a number of tools to get runtime system information.
For example, if you want to check processor information in Linux, you can simply refer to the file /proc/cpuinfo. You want to check memory usage of your Linux system, just look at the content of /proc/meminfo file.
/opt – Optional software
Traditionally, the /opt directory is used for installing/storing the files of third-party applications that are not available from the distribution’s repository.
The normal practice is to keep the software code in opt and then link the binary file in the /bin directory so that all the users can run it.
/root – The home directory of the root
There is /root directory as well and it works as the home directory of the root user. So instead of /home/root, the home of root is located at /root. Do not confuse it with the root directory (/).
/media – Mount point for removable media
When you connect a removable media such as USB disk, SD card or DVD, a directory is automatically created under the /media directory for them. You can access the content of the removable media from this directory.
/mnt – Mount directory
This is similar to the /media directory but instead of automatically mounting the removable media, mnt is used by system administrators to manually mount a filesystem.
/srv – Service data
The /srv directory contains data for services provided by the system. For example, if you run a HTTP server, it’s a good practice to store the website data in the /srv directory.
I think this much information is enough for you to understand the Linux directory structure and its usage.
In the end, if you want, you can download and save this image for quick reference to the directory structure in Linux systems.
Linux System Directories
Источник