{"id":304947,"date":"2020-06-06T21:00:51","date_gmt":"2020-06-06T21:00:51","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=304947"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=304947","title":{"rendered":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0440\u043e\u043a\u0441\u0438 \u0434\u043b\u044f WSL (Ubuntu)"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/505634\/\">\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0432 WSL \u0438\u0437-\u043f\u043e\u0434 \u043f\u0440\u043e\u043a\u0441\u0438 \u0434\u043b\u044f:<\/p>\n<p>  <\/p>\n<ul>\n<li>apt-get<\/li>\n<li>curl<\/li>\n<li>wget<\/li>\n<li>git<\/li>\n<li>npm<a name=\"habracut\"><\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"apt-get\">Apt-get<\/h2>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u0437\u0434\u0435\u0441\u044c \u0438 \u0434\u0430\u043b\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u043a\u0441\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li>host: <code>http:\/\/proxy.example.com<\/code><\/li>\n<li>port: <code>7777<\/code><\/li>\n<li>login: <code>user@example.com<\/code><\/li>\n<li>password: <code>somePassword<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b <code>apt-get<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u0444\u0430\u0439\u043b <code>\/etc\/apt\/apt.conf.d\/proxy.conf<\/code> \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 <code>Acquire::http::Proxy &quot;http:\/\/user@example.com:somePassword@proxy.example.com:7777&quot;;<\/code><br \/>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">sudo cat &lt;&lt;&lt;EOF &gt;&gt;\/etc\/apt\/apt.conf.d\/proxy.conf Acquire::http::Proxy &quot;http:\/\/user@example.com:somePassword@proxy.example.com:7777&quot;;` EOF<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">cat \/etc\/apt\/apt.conf.d\/proxy.conf<\/code><\/pre>\n<p>  <\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">Acquire::http::Proxy &quot;http:\/\/user@example.com:somePassword@proxy.example.com:7777&quot;;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0439\u0442\u0438 \u0438\u0437 WSL \u0438 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0432\u0445\u043e\u0434\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">sudo apt-get update -y<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"curl\">Curl<\/h2>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043b\u043e\u0433\u0438\u043d \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 <code>@<\/code>, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u044b <code>http_proxy<\/code> \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <code>http:\/\/user:somePassword@proxy.example.com:7777<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u043a\u0441\u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0442\u043e <code>http:\/\/proxy.example.com:7777<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">cat &lt;&lt;EOF &gt;&gt; ~\/.profile export http_proxy=http:\/\/user:somePassword@proxy.example.com:7777 EOF<\/code><\/pre>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c WSL \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">source ~\/.profile<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u043e \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b <code>~\/.curlrc<\/code> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">proxy-user=user@example.com:somePassword proxy=http:\/\/proxy.example.com:7777<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">cat &lt;&lt;EOF &gt;&gt; ~\/.curlrc proxy-user=user@example.com:somePassword proxy=http:\/\/proxy.example.com:7777 EOF<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"wget\">Wget<\/h2>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043b\u043e\u0433\u0438\u043d \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 <code>@<\/code> \u0438\u043b\u0438 \u043f\u0440\u043e\u043a\u0441\u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u0448\u0430\u0433\u0430\u043c\u0438 \u0434\u043b\u044f <code>curl<\/code>, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0435 \u0431\u044b\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u044b \u0440\u0430\u043d\u044c\u0448\u0435.<br \/>  \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b <code>~\/.wgetrc<\/code> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">proxy-user=user@example.com proxy-password=somePassword http_proxy=http:\/\/proxy.example.com:7777 use_proxy=on<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">cat &lt;&lt;EOF &gt;&gt; ~\/.wgetrc proxy-user=user@example.com proxy-password=somePassword http_proxy=http:\/\/proxy.example.com:7777 use_proxy=on EOF<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0435\u0449\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f <code>git<\/code> \u0438 <code>npm<\/code>.<\/p>\n<p>  <\/p>\n<h2 id=\"git\">Git<\/h2>\n<p>  <\/p>\n<pre><code class=\"bash\">git config --global http.proxy &quot;http:\/\/user@example.com:somePasswrod@proxy.example.com:7777&quot;<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"npm\">Npm<\/h2>\n<p>  <\/p>\n<pre><code class=\"bash\">npm set proxy http:\/\/user@example.com:somePassword@proxy.example.com:7777\/ npm set https-proxy http:\/\/user@example.com:somePassword@proxy.example.com:7777\/<\/code><\/pre>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/505634\/\"> https:\/\/habr.com\/ru\/post\/505634\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/505634\/\">\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0432 WSL \u0438\u0437-\u043f\u043e\u0434 \u043f\u0440\u043e\u043a\u0441\u0438 \u0434\u043b\u044f:<\/p>\n<p>  <\/p>\n<ul>\n<li>apt-get<\/li>\n<li>curl<\/li>\n<li>wget<\/li>\n<li>git<\/li>\n<li>npm<br \/>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-304947","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304947","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=304947"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304947\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=304947"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=304947"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=304947"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}