{"id":36723,"date":"2019-10-31T22:13:23","date_gmt":"2019-10-31T19:13:23","guid":{"rendered":"https:\/\/prohoster.info\/blog\/eshhe-odno-mnenie-o-raznitse-mezhdu-bin-sbin-usr-bin-usr-sbin\/"},"modified":"2019-10-31T22:13:23","modified_gmt":"2019-10-31T19:13:23","slug":"eshhe-odno-mnenie-o-raznitse-mezhdu-bin-sbin-usr-bin-usr-sbin","status":"publish","type":"post","link":"https:\/\/prohoster.info\/pt\/blog\/administrirovanie\/eshhe-odno-mnenie-o-raznitse-mezhdu-bin-sbin-usr-bin-usr-sbin","title":{"rendered":"Mais uma opini\u00e3o sobre a diferen\u00e7a entre bin, sbin, usr\/bin, usr\/sbin","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Recentemente encontrei este artigo: <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/143614\/\">A diferen\u00e7a entre bin, sbin, usr\/bin, usr\/sbin<\/a><\/noindex>. Gostaria de compartilhar minha vis\u00e3o sobre o padr\u00e3o.<\/p>\n<h2>\/bin<\/h2>\n<p>\nCont\u00e9m comandos que podem ser usados tanto pelo administrador do sistema quanto por usu\u00e1rios, mas que s\u00e3o necess\u00e1rios quando nenhum outro sistema de arquivos est\u00e1 montado (por exemplo, no modo de \u00fanico usu\u00e1rio). Tamb\u00e9m pode conter comandos que s\u00e3o usados indiretamente por scripts.<\/p>\n<p>Esperam-se comandos como:<\/p>\n<p><b>cat<\/b>, <b>chgrp<\/b>, <b>chmod<\/b>, <b>chown<\/b>, <b>cp<\/b>, <b>date<\/b>, <b>dd<\/b>, <b>df<\/b>, <b>dmesg<\/b>, <b>echo<\/b>, <b>falso<\/b>, <b>hostname<\/b>, <b>kill<\/b>, <b>ln<\/b>, <b>login<\/b>, <b>ls<\/b>, <b>mkdir<\/b>, <b>mknod<\/b>, <b>more<\/b>, <b>mount<\/b>, <b>mv<\/b>, <b>ps<\/b>, <b>pwd<\/b>, <b>rm<\/b>, <b>rmdir<\/b>, <b>sed<\/b>, <b>sh<\/b>, <b>stty<\/b>, <b>su<\/b>, <b>sync<\/b>, <b>verdadeiro<\/b>, <b>umount<\/b>, <b>uname<\/b>.<\/p>\n<p>\u00c9 poss\u00edvel criar links simb\u00f3licos para \/usr, mas embora na \u00e9poca do systemd \/usr em um dispositivo separado n\u00e3o seja comum, ainda pode ser encontrado em sistemas integrados, sem\u00e1foros, moedores de caf\u00e9 e PDP-11 servindo um equipamento importante em um dos laborat\u00f3rios da Academia de Ci\u00eancias.<\/p>\n<h2>\/sbin<\/h2>\n<p>\nAs utilidades usadas para administra\u00e7\u00e3o do sistema (e outros comandos apenas para root), \/sbin cont\u00e9m arquivos bin\u00e1rios necess\u00e1rios para inicializa\u00e7\u00e3o, recupera\u00e7\u00e3o e\/ou manuten\u00e7\u00e3o do sistema al\u00e9m dos arquivos bin\u00e1rios em \/bin. Programas que s\u00e3o executados depois que \/usr \u00e9 montado (quando n\u00e3o h\u00e1 problemas) geralmente s\u00e3o colocados em \/usr\/sbin. Programas de administra\u00e7\u00e3o do sistema instalados localmente devem ser colocados em \/usr\/local\/sbin.<\/p>\n<p>Esperam-se:<\/p>\n<p><b>fastboot, fasthalt, fdisk, fsck, getty, halt, ifconfig, init, mkfs, mkswap, reboot, route, swapon, swapoff, update<\/b>.<\/p>\n<p>Uma das maneiras de proteger o sistema contra m\u00e3os curiosas \u00e9 proibir a execu\u00e7\u00e3o dessas utilit\u00e1rios por qualquer um, definindo o atributo x.<br \/>\nAl\u00e9m disso, substituir \/bin e \/sbin por c\u00f3pias de um arquivo (id\u00eantico para todos os sistemas similares) \u00e9 uma maneira r\u00e1pida de consertar sistemas sem gerenciador de pacotes.<br \/>\n<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<h2>\/usr\/bin<\/h2>\n<p>\nAqui \u00e9 simples. Comandos similares, iguais para todos os servidores\/moedores de caf\u00e9 da empresa. E o pr\u00f3prio \/usr pode ser implantado de maneira id\u00eantica para diferentes SOs (para \/bin e \/sbin isso geralmente n\u00e3o funciona), s\u00e3o programas independentes de arquitetura. Pode conter links para interpretadores perl ou python, que ficam em \/opt ou em algum outro lugar da rede.<\/p>\n<h2>\/usr\/sbin<\/h2>\n<p>\nO mesmo que \/usr\/bin, mas para uso apenas por administradores.<\/p>\n<h2>\/usr\/local\/bin \u0438 \/usr\/local\/sbin<\/h2>\n<p>\nUma das localiza\u00e7\u00f5es mais importantes. Ao contr\u00e1rio do restante, \/usr n\u00e3o pode ser o mesmo para toda a organiza\u00e7\u00e3o. Aqui est\u00e3o armazenados os sistemas operacionais, os que dependem do hardware e simplesmente programas que n\u00e3o s\u00e3o necess\u00e1rios em todos os dispositivos. Ao sincronizar \/usr nas m\u00e1quinas, \/usr\/local deve ser exclu\u00eddo.<\/p>\n<h2>\/home\/$USER\/bin<\/h2>\n<p>\nAqui a situa\u00e7\u00e3o \u00e9 similar a \/usr\/local, apenas programas espec\u00edficos para um usu\u00e1rio espec\u00edfico s\u00e3o armazenados. Podem ser transferidos (ou sincronizados) para outra m\u00e1quina ao mudar de usu\u00e1rio. O que n\u00e3o pode ser transferido fica em \/home\/$USER\/.local\/bin. Pode-se usar local sem o ponto. \/home\/$USER\/sbin, por motivos evidentes, est\u00e1 ausente.<\/p>\n<p>Ficarei feliz com corre\u00e7\u00f5es e adi\u00e7\u00f5es.<\/p>\n<p>Fonte: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/462045\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e: \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 bin, sbin, usr\/bin, usr\/sbin. \u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c \u0432\u0437\u0433\u043b\u044f\u0434\u043e\u043c \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442. \/bin \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u043c, \u0442\u0430\u043a \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438, \u043d\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b, \u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043d\u0438\u043a\u0430\u043a\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043e\u0434\u043d\u043e\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435). \u041e\u043d \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u0441\u0432\u0435\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438. \u0422\u0430\u043c [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-36723","post","type-post","status-publish","format-standard","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.3 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e: \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 bin, sbin, usr\/bin, usr\/sbin.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/pt\/blog\/administrirovanie\/eshhe-odno-mnenie-o-raznitse-mezhdu-bin-sbin-usr-bin-usr-sbin\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.3\" \/>\n\t\t<meta property=\"og:locale\" content=\"pt_PT\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0415\u0449\u0435 \u043e\u0434\u043d\u043e \u043c\u043d\u0435\u043d\u0438\u0435 \u043e \u0440\u0430\u0437\u043d\u0438\u0446\u0435 \u043c\u0435\u0436\u0434\u0443 bin, sbin, usr\/bin, usr\/sbin | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e: \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 bin, sbin, usr\/bin, usr\/sbin.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/pt\/blog\/administrirovanie\/eshhe-odno-mnenie-o-raznitse-mezhdu-bin-sbin-usr-bin-usr-sbin\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T19:13:23+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T19:13:23+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Mais uma opini\u00e3o sobre a diferen\u00e7a entre bin, sbin, usr\/bin, usr\/sbin | ProHoster","description":"Recentemente encontrei este artigo: A diferen\u00e7a entre bin, sbin, usr\/bin, usr\/sbin.","canonical_url":"https:\/\/prohoster.info\/pt\/blog\/administrirovanie\/eshhe-odno-mnenie-o-raznitse-mezhdu-bin-sbin-usr-bin-usr-sbin","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"pt_PT","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0415\u0449\u0435 \u043e\u0434\u043d\u043e \u043c\u043d\u0435\u043d\u0438\u0435 \u043e \u0440\u0430\u0437\u043d\u0438\u0446\u0435 \u043c\u0435\u0436\u0434\u0443 bin, sbin, usr\/bin, usr\/sbin | ProHoster","og:description":"\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e: \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 bin, sbin, usr\/bin, usr\/sbin.","og:url":"https:\/\/prohoster.info\/pt\/blog\/administrirovanie\/eshhe-odno-mnenie-o-raznitse-mezhdu-bin-sbin-usr-bin-usr-sbin","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T19:13:23+00:00","article:modified_time":"2019-10-31T19:13:23+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"36723","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-22 04:34:22","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 01:40:22","updated":"2026-01-22 04:34:22","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/posts\/36723","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/comments?post=36723"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/posts\/36723\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/media?parent=36723"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/categories?post=36723"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/tags?post=36723"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}