{"id":38520,"date":"2019-10-31T22:24:16","date_gmt":"2019-10-31T19:24:16","guid":{"rendered":"https:\/\/prohoster.info\/blog\/integriruem-komandy-linux-v-windows-s-pomoshhyu-powershell-i-wsl\/"},"modified":"2019-10-31T22:24:16","modified_gmt":"2019-10-31T19:24:16","slug":"integriruem-komandy-linux-v-windows-s-pomoshhyu-powershell-i-wsl","status":"publish","type":"post","link":"https:\/\/prohoster.info\/it\/blog\/administrirovanie\/integriruem-komandy-linux-v-windows-s-pomoshhyu-powershell-i-wsl","title":{"rendered":"Integrando i comandi Linux in Windows tramite PowerShell e WSL","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>\u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043f\u043e\u0434 Windows: \u00ab\u041f\u043e\u0447\u0435\u043c\u0443 \u0437\u0434\u0435\u0441\u044c \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0435\u0442 <code>&lt;\u0412\u0421\u0422\u0410\u0412\u042c\u0422\u0415 \u0422\u0423\u0422 \u041b\u042e\u0411\u0418\u041c\u0423\u042e \u041a\u041e\u041c\u0410\u041d\u0414\u0423 LINUX&gt;<\/code>?\u00bb. \u0411\u0443\u0434\u044c \u0442\u043e \u043c\u043e\u0449\u043d\u043e\u0435 \u043f\u0440\u043e\u043b\u0438\u0441\u0442\u044b\u0432\u0430\u043d\u0438\u0435 <code>less<\/code> \u0438\u043b\u0438 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b <code>grep<\/code> \u0438\u043b\u0438 <code>sed<\/code>, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u043e\u0434 Windows \u0445\u043e\u0442\u044f\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043b\u0451\u0433\u043a\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u0442\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c \u0432 \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435.<\/p>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/wsl\/about\">\u041f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 Windows \u0434\u043b\u044f Linux (WSL)<\/a><\/noindex> \u0441\u0434\u0435\u043b\u0430\u043b\u0430 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u0448\u0430\u0433 \u0432\u043f\u0435\u0440\u0451\u0434 \u0432 \u044d\u0442\u043e\u043c \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438. \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b Linux \u0438\u0437 Windows, \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u044f \u0438\u0445 \u0447\u0435\u0440\u0435\u0437 <code>wsl.exe<\/code> (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>wsl ls<\/code>). \u0425\u043e\u0442\u044f \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435, \u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441\u0442\u0440\u0430\u0434\u0430\u0435\u0442 \u043e\u0442 \u0440\u044f\u0434\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432.<br \/>\n<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<ul>\n<li>\u041f\u043e\u0432\u0441\u0435\u043c\u0435\u0441\u0442\u043d\u043e\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 <code>wsl<\/code> \u0443\u0442\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u043d\u0435\u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e.\n<\/li>\n<li>\u041f\u0443\u0442\u0438 Windows \u0432 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0435 \u0441\u043b\u044d\u0448\u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043a\u0430\u043a escape-\u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u0430 \u043d\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432.\n<\/li>\n<li>\u041f\u0443\u0442\u0438 Windows \u0432 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u043d\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 WSL.\n<\/li>\n<li>\u041d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u044f\u0445 WSL \u0441 \u0430\u043b\u0438\u0430\u0441\u0430\u043c\u0438 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.\n<\/li>\n<li>\u041d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043f\u0443\u0442\u0435\u0439 Linux.\n<\/li>\n<li>\u041d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434.\n<\/li>\n<li>\u041d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/li>\n<\/ul>\n<p>\n\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b Linux \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0434 Windows \u043a\u0430\u043a \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0435 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043e\u0440\u0442\u0430 \u2014 \u0438 \u0438\u0445 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0447\u0435\u043c \u0440\u043e\u0434\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0427\u0442\u043e\u0431\u044b \u0443\u0440\u0430\u0432\u043d\u044f\u0442\u044c \u0438\u0445 \u0432 \u043f\u0440\u0430\u0432\u0430\u0445, \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<h1>\u041e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 PowerShell<\/h1>\n<p>\nC \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0431\u043e\u043b\u043e\u0447\u0435\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0439 PowerShell \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430\u0445 <code>wsl<\/code>, \u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u0443\u044f \u043f\u0443\u0442\u0438 Windows \u0432 \u043f\u0443\u0442\u0438 WSL. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0430\u043c:<\/p>\n<ul>\n<li>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b Linux \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043e\u0434\u043d\u0430 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u0442\u0435\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c.\n<\/li>\n<li>\u041e\u0431\u043e\u043b\u043e\u0447\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u043f\u0443\u0442\u0438 Windows, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u043f\u0443\u0442\u0438 WSL.\n<\/li>\n<li>\u041e\u0431\u043e\u043b\u043e\u0447\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c <code>wsl<\/code> \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 Linux \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u0432\u0445\u043e\u0434 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u043b\u044e\u0431\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/li>\n<\/ul>\n<p>\n\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0451\u043d \u043a \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0430\u0431\u0441\u0442\u0440\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u043e\u0431\u043e\u043b\u043e\u0447\u0435\u043a \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0430.<\/p>\n<pre><code class=\"plaintext\"># The commands to import.\n$commands = \"awk\", \"emacs\", \"grep\", \"head\", \"less\", \"ls\", \"man\", \"sed\", \"seq\", \"ssh\", \"tail\", \"vim\"\n \n# Register a function for each command.\n$commands | ForEach-Object { Invoke-Expression @\"\nRemove-Alias $_ -Force -ErrorAction Ignore\nfunction global:$_() {\n    for (`$i = 0; `$i -lt `$args.Count; `$i++) {\n        # If a path is absolute with a qualifier (e.g. C:), run it through wslpath to map it to the appropriate mount point.\n        if (Split-Path `$args[`$i] -IsAbsolute -ErrorAction Ignore) {\n            `$args[`$i] = Format-WslArgument (wsl.exe wslpath (`$args[`$i] -replace \"\", \"\/\"))\n        # If a path is relative, the current working directory will be translated to an appropriate mount point, so just format it.\n        } elseif (Test-Path `$args[`$i] -ErrorAction Ignore) {\n            `$args[`$i] = Format-WslArgument (`$args[`$i] -replace \"\", \"\/\")\n        }\n    }\n \n    if (`$input.MoveNext()) {\n        `$input.Reset()\n        `$input | wsl.exe $_ (`$args -split ' ')\n    } else {\n        wsl.exe $_ (`$args -split ' ')\n    }\n}\n\"@\n}<\/code><\/pre>\n<p>\n\u0421\u043f\u0438\u0441\u043e\u043a <code>$command<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0430. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043e\u0431\u0451\u0440\u0442\u043a\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u043d\u0438\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>Invoke-Expression<\/code> (\u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0434\u0430\u043b\u0438\u0432 \u043b\u044e\u0431\u044b\u0435 \u0430\u043b\u0438\u0430\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432\u0430\u0442\u044c \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439).<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u0442 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043f\u0443\u0442\u0438 Windows \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434 <code>Split-Path<\/code> \u0438 <code>Test-Path<\/code>, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u044d\u0442\u0438 \u043f\u0443\u0442\u0438 \u0432 \u043f\u0443\u0442\u0438 WSL. \u041c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0443\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>Format-WslArgument<\/code>, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043f\u043e\u0437\u0436\u0435. \u041e\u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u0438 \u0441\u043a\u043e\u0431\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u044b\u043b\u0438 \u0431\u044b \u043d\u0435\u0432\u0435\u0440\u043d\u043e \u0438\u0441\u0442\u043e\u043b\u043a\u043e\u0432\u0430\u043d\u044b.<\/p>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c <code>wsl<\/code> \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 \u0438 \u043b\u044e\u0431\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0430\u043a\u0438\u0445 \u043e\u0431\u0451\u0440\u0442\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b Linux \u0431\u043e\u043b\u0435\u0435 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u043f\u0440\u0435\u0444\u0438\u043a\u0441 <code>wsl<\/code> \u0438 \u043d\u0435 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u044f\u0441\u044c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0443\u0442\u0438:<\/p>\n<ul>\n<li><code>man bash<\/code>\n<\/li>\n<li><code>less -i $profile.CurrentUserAllHosts<\/code>\n<\/li>\n<li><code>ls -Al C:Windows | less<\/code>\n<\/li>\n<li><code>grep -Ein error *.log<\/code>\n<\/li>\n<li><code>tail -f *.log<\/code><\/li>\n<\/ul>\n<p>\n\u0417\u0434\u0435\u0441\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u043c\u0430\u043d\u0434, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b Linux, \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0435\u0451 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a. \u0415\u0441\u043b\u0438 \u0432\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0432 \u0441\u0432\u043e\u0439 <noindex><a rel=\"nofollow\" href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/module\/microsoft.powershell.core\/about\/about_profiles?view=powershell-6\">\u043f\u0440\u043e\u0444\u0438\u043b\u044c<\/a><\/noindex> PowerShell, \u044d\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432\u0430\u043c \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0441\u0435\u0430\u043d\u0441\u0435 PowerShell, \u043a\u0430\u043a \u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b!<\/p>\n<h1>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/h1>\n<p>\n\u0412 Linux \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0430\u043b\u0438\u0430\u0441\u044b \u0438\/\u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u044f\u0445 (login profile), \u0437\u0430\u0434\u0430\u0432\u0430\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>alias ls=ls -AFh<\/code> \u0438\u043b\u0438 <code>export LESS=-i<\/code>). \u041e\u0434\u0438\u043d \u0438\u0437 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443 <code>wsl.exe<\/code> \u2014 \u0442\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u043d\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u0442\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b (\u0442. \u0435. <code>ls<\/code> \u0432 WSL \u0438 <code>wsl ls<\/code> \u0431\u0443\u0434\u0443\u0442 \u0432\u0435\u0441\u0442\u0438 \u0441\u0435\u0431\u044f \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443 \u0441 \u0430\u043b\u0438\u0430\u0441\u043e\u043c, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c \u0432\u044b\u0448\u0435).<\/p>\n<p>PowerShell \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 <noindex><a rel=\"nofollow\" href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/module\/microsoft.powershell.core\/about\/about_parameters_default_values?view=powershell-6\">$PSDefaultParameterValues<\/a><\/noindex>, \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u043e\u0432 \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 \u043e\u0431\u043e\u043b\u043e\u0447\u0435\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u043e \u044d\u0442\u043e \u0432\u043d\u043e\u0441\u0438\u0442 \u043b\u0438\u0448\u043d\u0438\u0435 \u043e\u0441\u043b\u043e\u0436\u043d\u0435\u043d\u0438\u044f (\u0442\u0430\u043a, PowerShell \u0441\u043e\u043e\u0442\u043d\u043e\u0441\u0438\u0442 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>-a<\/code> \u0441\u043e\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0441 <code>-ArgumentList<\/code>), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432\u0430\u0442\u044c \u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438 Linux, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0438\u043c\u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432), \u0430 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0441\u0430\u043c\u044b\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c (\u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u043c\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0432 \u043a\u043b\u044e\u0447\u0435, \u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b).<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043d\u0430\u0448\u0438\u0445 \u043e\u0431\u043e\u043b\u043e\u0447\u0435\u043a \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0443\u044e <code>$PSDefaultParameterValues<\/code>, \u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434 Linux!<\/p>\n<pre><code class=\"plaintext\">function global:$_() {\n    \u2026\n \n    `$defaultArgs = ((`$WslDefaultParameterValues.$_ -split ' '), \"\")[`$WslDefaultParameterValues.Disabled -eq `$true]\n    if (`$input.MoveNext()) {\n        `$input.Reset()\n        `$input | wsl.exe $_ `$defaultArgs (`$args -split ' ')\n    } else {\n        wsl.exe $_ `$defaultArgs (`$args -split ' ')\n    }\n}<\/code><\/pre>\n<p>\n\u041f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f <code>$WslDefaultParameterValues<\/code> \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443, \u043c\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0447\u0435\u0440\u0435\u0437 <code>wsl.exe<\/code>. \u041d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u044c PowerShell \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c!<\/p>\n<pre><code class=\"plaintext\">$WslDefaultParameterValues[\"grep\"] = \"-E\"\n$WslDefaultParameterValues[\"less\"] = \"-i\"\n$WslDefaultParameterValues[\"ls\"] = \"-AFh --group-directories-first\"<\/code><\/pre>\n<p>\n\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 <code>$PSDefaultParameterValues<\/code>, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 <noindex><a rel=\"nofollow\" href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/module\/microsoft.powershell.core\/about\/about_parameters_default_values?view=powershell-6#how-to-disable-and-re-enable-psdefaultparametervalues\">\u043b\u0435\u0433\u043a\u043e \u0438\u0445 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c<\/a><\/noindex> \u043d\u0430 \u0432\u0440\u0435\u043c\u044f, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432 \u043a\u043b\u044e\u0447 <code>\"Disabled\"<\/code> \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>$true<\/code>. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0445\u044d\u0448-\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c <code>$WslDefaultParameterValues<\/code> \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442 <code>$PSDefaultParameterValues<\/code>.<\/p>\n<h1>\u0410\u0432\u0442\u043e\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432<\/h1>\n<p>\nPowerShell \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0435\u043b\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>Register-ArgumentCompleter<\/code>. \u0412 Bash \u0435\u0441\u0442\u044c \u043c\u043e\u0449\u043d\u044b\u0435 <noindex><a rel=\"nofollow\" href=\"https:\/\/www.gnu.org\/software\/bash\/manual\/html_node\/Programmable-Completion.html\">\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f<\/a><\/noindex>. WSL \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c bash \u0438\u0437 PowerShell. \u0415\u0441\u043b\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0435\u043b\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u043e\u0431\u043e\u043b\u043e\u0447\u0435\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0439 PowerShell \u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c bash \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0439, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043f\u043e\u043b\u043d\u043e\u0435 \u0430\u0432\u0442\u043e\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 \u0442\u043e\u0439 \u0436\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e, \u0447\u0442\u043e \u0438 \u0432 \u0441\u0430\u043c\u043e\u043c bash!<\/p>\n<pre><code class=\"plaintext\"># Register an ArgumentCompleter that shims bash's programmable completion.\nRegister-ArgumentCompleter -CommandName $commands -ScriptBlock {\n    param($wordToComplete, $commandAst, $cursorPosition)\n \n    # Map the command to the appropriate bash completion function.\n    $F = switch ($commandAst.CommandElements[0].Value) {\n        {$_ -in \"awk\", \"grep\", \"head\", \"less\", \"ls\", \"sed\", \"seq\", \"tail\"} {\n            \"_longopt\"\n            break\n        }\n \n        \"man\" {\n            \"_man\"\n            break\n        }\n \n        \"ssh\" {\n            \"_ssh\"\n            break\n        }\n \n        Default {\n            \"_minimal\"\n            break\n        }\n    }\n \n    # Populate bash programmable completion variables.\n    $COMP_LINE = \"`\"$commandAst`\"\"\n    $COMP_WORDS = \"('$($commandAst.CommandElements.Extent.Text -join \"' '\")')\" -replace \"''\", \"'\"\n    for ($i = 1; $i -lt $commandAst.CommandElements.Count; $i++) {\n        $extent = $commandAst.CommandElements[$i].Extent\n        if ($cursorPosition -lt $extent.EndColumnNumber) {\n            # The cursor is in the middle of a word to complete.\n            $previousWord = $commandAst.CommandElements[$i - 1].Extent.Text\n            $COMP_CWORD = $i\n            break\n        } elseif ($cursorPosition -eq $extent.EndColumnNumber) {\n            # The cursor is immediately after the current word.\n            $previousWord = $extent.Text\n            $COMP_CWORD = $i + 1\n            break\n        } elseif ($cursorPosition -lt $extent.StartColumnNumber) {\n            # The cursor is within whitespace between the previous and current words.\n            $previousWord = $commandAst.CommandElements[$i - 1].Extent.Text\n            $COMP_CWORD = $i\n            break\n        } elseif ($i -eq $commandAst.CommandElements.Count - 1 -and $cursorPosition -gt $extent.EndColumnNumber) {\n            # The cursor is within whitespace at the end of the line.\n            $previousWord = $extent.Text\n            $COMP_CWORD = $i + 1\n            break\n        }\n    }\n \n    # Repopulate bash programmable completion variables for scenarios like '\/mnt\/c\/Program Files'\/&lt;TAB&gt; where &lt;TAB&gt; should continue completing the quoted path.\n    $currentExtent = $commandAst.CommandElements[$COMP_CWORD].Extent\n    $previousExtent = $commandAst.CommandElements[$COMP_CWORD - 1].Extent\n    if ($currentExtent.Text -like \"\/*\" -and $currentExtent.StartColumnNumber -eq $previousExtent.EndColumnNumber) {\n        $COMP_LINE = $COMP_LINE -replace \"$($previousExtent.Text)$($currentExtent.Text)\", $wordToComplete\n        $COMP_WORDS = $COMP_WORDS -replace \"$($previousExtent.Text) '$($currentExtent.Text)'\", $wordToComplete\n        $previousWord = $commandAst.CommandElements[$COMP_CWORD - 2].Extent.Text\n        $COMP_CWORD -= 1\n    }\n \n    # Build the command to pass to WSL.\n    $command = $commandAst.CommandElements[0].Value\n    $bashCompletion = \". \/usr\/share\/bash-completion\/bash_completion 2&gt; \/dev\/null\"\n    $commandCompletion = \". \/usr\/share\/bash-completion\/completions\/$command 2&gt; \/dev\/null\"\n    $COMPINPUT = \"COMP_LINE=$COMP_LINE; COMP_WORDS=$COMP_WORDS; COMP_CWORD=$COMP_CWORD; COMP_POINT=$cursorPosition\"\n    $COMPGEN = \"bind `\"set completion-ignore-case on`\" 2&gt; \/dev\/null; $F `\"$command`\" `\"$wordToComplete`\" `\"$previousWord`\" 2&gt; \/dev\/null\"\n    $COMPREPLY = \"IFS=`$'n'; echo `\"`${COMPREPLY[*]}`\"\"\n    $commandLine = \"$bashCompletion; $commandCompletion; $COMPINPUT; $COMPGEN; $COMPREPLY\" -split ' '\n \n    # Invoke bash completion and return CompletionResults.\n    $previousCompletionText = \"\"\n    (wsl.exe $commandLine) -split 'n' |\n    Sort-Object -Unique -CaseSensitive |\n    ForEach-Object {\n        if ($wordToComplete -match \"(.*=).*\") {\n            $completionText = Format-WslArgument ($Matches[1] + $_) $true\n            $listItemText = $_\n        } else {\n            $completionText = Format-WslArgument $_ $true\n            $listItemText = $completionText\n        }\n \n        if ($completionText -eq $previousCompletionText) {\n            # Differentiate completions that differ only by case otherwise PowerShell will view them as duplicate.\n            $listItemText += ' '\n        }\n \n        $previousCompletionText = $completionText\n        [System.Management.Automation.CompletionResult]::new($completionText, $listItemText, 'ParameterName', $completionText)\n    }\n}\n \n# Helper function to escape characters in arguments passed to WSL that would otherwise be misinterpreted.\nfunction global:Format-WslArgument([string]$arg, [bool]$interactive) {\n    if ($interactive -and $arg.Contains(\" \")) {\n        return \"'$arg'\"\n    } else {\n        return ($arg -replace \" \", \" \") -replace \"([()|])\", ('$1', '`$1')[$interactive]\n    }\n}<\/code><\/pre>\n<p>\n\u041a\u043e\u0434 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043b\u043e\u0442\u043d\u044b\u0439 \u0431\u0435\u0437 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 bash, \u043d\u043e \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ul>\n<li>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0442\u0435\u043b\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043d\u0430\u0448\u0438\u0445 \u043e\u0431\u0451\u0440\u0442\u043e\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u0441\u043f\u0438\u0441\u043e\u043a <code>$commands<\/code> \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>-CommandName<\/code> \u0434\u043b\u044f <code>Register-ArgumentCompleter<\/code>.\n<\/li>\n<li>\u0421\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 bash \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f (\u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0439 \u0430\u0432\u0442\u043e\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0432 bash \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <code>$F<\/code>, \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043e\u0442 <code>complete -F &lt;FUNCTION&gt;<\/code>).\n<\/li>\n<li>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b PowerShell <code>$wordToComplete<\/code>, <code>$commandAst<\/code> \u0438 <code>$cursorPosition<\/code> \u0432 \u0444\u043e\u0440\u043c\u0430\u0442, \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 \u0430\u0432\u0442\u043e\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f bash \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f\u043c\u0438 <noindex><a rel=\"nofollow\" href=\"https:\/\/www.gnu.org\/software\/bash\/manual\/html_node\/Programmable-Completion.html\">\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f<\/a><\/noindex> bash.\n<\/li>\n<li>\u0421\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0432 <code>wsl.exe<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0441\u0440\u0435\u0434\u044b, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0430\u0432\u0442\u043e\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435\u043c \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c.\n<\/li>\n<li>\u0417\u0430\u0442\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c <code>wsl<\/code> \u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439, \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c \u0432\u044b\u0434\u0430\u0447\u0443 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f\u043c\u0438 \u0441\u0442\u0440\u043e\u043a \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 <code>CompletionResults<\/code>, \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u044f \u0438\u0445 \u0438 \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u0443\u044f \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u0438 \u0441\u043a\u043e\u0431\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u044b\u043b\u0438 \u0431\u044b \u043d\u0435\u0432\u0435\u0440\u043d\u043e \u0438\u0441\u0442\u043e\u043b\u043a\u043e\u0432\u0430\u043d\u044b.<\/li>\n<\/ul>\n<p>\n\u0412 \u0438\u0442\u043e\u0433\u0435 \u043d\u0430\u0448\u0438 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 \u043a\u043e\u043c\u0430\u043d\u0434 Linux \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u0436\u0435 \u0430\u0432\u0442\u043e\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435, \u043a\u0430\u043a \u0432 bash! \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ul>\n<li><code>ssh -c &lt;TAB&gt; -J &lt;TAB&gt; -m &lt;TAB&gt; -O &lt;TAB&gt; -o &lt;TAB&gt; -Q &lt;TAB&gt; -w &lt;TAB&gt; -b &lt;TAB&gt;<\/code><\/li>\n<\/ul>\n<p>\n\u041a\u0430\u0436\u0434\u043e\u0435 \u0430\u0432\u0442\u043e\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430, \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u0445\u043e\u0441\u0442\u044b, \u0438\u0437 WSL!<\/p>\n<p><code>&lt;TAB&gt;<\/code> \u0431\u0443\u0434\u0435\u0442 \u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. <code>&lt;Ctrl + \u043f\u0440\u043e\u0431\u0435\u043b&gt;<\/code> \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043e\u043f\u0446\u0438\u0438.<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0442\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 bash, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0430\u0432\u0442\u043e\u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u043f\u0443\u0442\u0438 Linux \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 PowerShell!<\/p>\n<ul>\n<li><code>less \/etc\/&lt;TAB&gt;<\/code>\n<\/li>\n<li><code>ls \/usr\/share\/&lt;TAB&gt;<\/code>\n<\/li>\n<li><code>vim ~\/.bash&lt;TAB&gt;<\/code><\/li>\n<\/ul>\n<p>\n\u0412 \u0442\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u0430\u0432\u0442\u043e\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 bash \u043d\u0435 \u0434\u0430\u0451\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432, PowerShell \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441 \u043f\u0443\u0442\u044f\u043c\u0438 Windows. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u044b \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0442\u0435, \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0443\u0442\u0438 \u043d\u0430 \u0441\u0432\u043e\u0451 \u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435.<\/p>\n<h1>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h1>\n<p>\n\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PowerShell \u0438 WSL \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b Linux \u0432 Windows \u043a\u0430\u043a \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0441\u043a\u0430\u0442\u044c \u0431\u0438\u043b\u0434\u044b Win32 \u0438\u043b\u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u044b Linux \u0438\u043b\u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044f \u0432 Linux-\u0448\u0435\u043b\u043b. \u041f\u0440\u043e\u0441\u0442\u043e <noindex><a rel=\"nofollow\" href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/wsl\/install-win10\">\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 WSL<\/a><\/noindex>, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 <noindex><a rel=\"nofollow\" href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/module\/microsoft.powershell.core\/about\/about_profiles?view=powershell-6\">\u043f\u0440\u043e\u0444\u0438\u043b\u044c PowerShell<\/a><\/noindex> \u0438 <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/mikebattista\/PowerShell-WSL-Interop#usage\">\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/a><\/noindex>! \u0411\u043e\u0433\u0430\u0442\u043e\u0435 \u0430\u0432\u0442\u043e\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u043f\u0443\u0442\u0435\u0439 \u043a \u0444\u0430\u0439\u043b\u0430\u043c Linux \u0438 Windows\u00a0\u2014 \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043d\u0435\u0442 \u0434\u0430\u0436\u0435 \u0432 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445 Windows.<\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u0435\u0433\u043e \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044e \u0432 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/mikebattista\/PowerShell-WSL-Interop\">\u0437\u0434\u0435\u0441\u044c<\/a><\/noindex>.<\/p>\n<p>\u041a\u0430\u043a\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b Linux \u0432\u044b \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c\u0438? \u041a\u0430\u043a\u0438\u0445 \u0435\u0449\u0451 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0445 \u0432\u0435\u0449\u0435\u0439 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0432 Windows? \u041f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u0438\u043b\u0438 <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/mikebattista\/PowerShell-WSL-Interop\">\u043d\u0430 GitHub<\/a><\/noindex>!<br \/>\n<br \/>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/469257\/\">habr.com<\/a><\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043f\u043e\u0434 Windows: \u00ab\u041f\u043e\u0447\u0435\u043c\u0443 \u0437\u0434\u0435\u0441\u044c \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0435\u0442 &lt;\u0412\u0421\u0422\u0410\u0412\u042c\u0422\u0415 \u0422\u0423\u0422 \u041b\u042e\u0411\u0418\u041c\u0423\u042e \u041a\u041e\u041c\u0410\u041d\u0414\u0423 LINUX&gt;?\u00bb. \u0411\u0443\u0434\u044c \u0442\u043e \u043c\u043e\u0449\u043d\u043e\u0435 \u043f\u0440\u043e\u043b\u0438\u0441\u0442\u044b\u0432\u0430\u043d\u0438\u0435 less \u0438\u043b\u0438 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b grep \u0438\u043b\u0438 sed, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u043e\u0434 Windows \u0445\u043e\u0442\u044f\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043b\u0451\u0433\u043a\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u0442\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c \u0432 \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435. \u041f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 Windows \u0434\u043b\u044f Linux (WSL) \u0441\u0434\u0435\u043b\u0430\u043b\u0430 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u0448\u0430\u0433 \u0432\u043f\u0435\u0440\u0451\u0434 \u0432 \u044d\u0442\u043e\u043c \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438. \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c [&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-38520","post","type-post","status-publish","format-standard","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043f\u043e\u0434 Windows: \u00ab\u041f\u043e\u0447\u0435\u043c\u0443 \u0437\u0434\u0435\u0441\u044c \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0435\u0442 ?\u00bb. \u0411\u0443\u0434\u044c \u0442\u043e \u043c\u043e\u0449\u043d\u043e\u0435 \u043f\u0440\u043e\u043b\u0438\u0441\u0442\u044b\u0432\u0430\u043d\u0438\u0435 less \u0438\u043b\u0438 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b grep \u0438\u043b\u0438 sed, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u043e\u0434 Windows \u0445\u043e\u0442\u044f\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043b\u0451\u0433\u043a\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u0442\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c \u0432 \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435. \u041f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 Windows \u0434\u043b\u044f Linux (WSL) \u0441\u0434\u0435\u043b\u0430\u043b\u0430 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u0448\u0430\u0433 \u0432\u043f\u0435\u0440\u0451\u0434 \u0432 \u044d\u0442\u043e\u043c \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438. \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\" \/>\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\/it\/blog\/administrirovanie\/integriruem-komandy-linux-v-windows-s-pomoshhyu-powershell-i-wsl\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"it_IT\" \/>\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\u0418\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b Linux \u0432 Windows \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PowerShell \u0438 WSL | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043f\u043e\u0434 Windows: \u00ab\u041f\u043e\u0447\u0435\u043c\u0443 \u0437\u0434\u0435\u0441\u044c \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0435\u0442 ?\u00bb. \u0411\u0443\u0434\u044c \u0442\u043e \u043c\u043e\u0449\u043d\u043e\u0435 \u043f\u0440\u043e\u043b\u0438\u0441\u0442\u044b\u0432\u0430\u043d\u0438\u0435 less \u0438\u043b\u0438 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b grep \u0438\u043b\u0438 sed, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u043e\u0434 Windows \u0445\u043e\u0442\u044f\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043b\u0451\u0433\u043a\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u0442\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c \u0432 \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435. \u041f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 Windows \u0434\u043b\u044f Linux (WSL) \u0441\u0434\u0435\u043b\u0430\u043b\u0430 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u0448\u0430\u0433 \u0432\u043f\u0435\u0440\u0451\u0434 \u0432 \u044d\u0442\u043e\u043c \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438. \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/it\/blog\/administrirovanie\/integriruem-komandy-linux-v-windows-s-pomoshhyu-powershell-i-wsl\" \/>\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:24:16+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T19:24:16+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\udd47Integra i comandi Linux in Windows con PowerShell e WSL | ProHoster","description":"Una domanda tipica degli sviluppatori Windows \u00e8: \u00abPerch\u00e9 qui non ci sono ancora ?\u00bb. Che si tratti di un potente scroll con less o di strumenti familiari come grep o sed, gli sviluppatori Windows desiderano avere facile accesso a questi comandi nella loro routine quotidiana. La sottosistema Windows per Linux (WSL) ha fatto enormi progressi in questo senso. Permette di invocare","canonical_url":"https:\/\/prohoster.info\/it\/blog\/administrirovanie\/integriruem-komandy-linux-v-windows-s-pomoshhyu-powershell-i-wsl","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"it_IT","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\u0418\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b Linux \u0432 Windows \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PowerShell \u0438 WSL | ProHoster","og:description":"\u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043f\u043e\u0434 Windows: \u00ab\u041f\u043e\u0447\u0435\u043c\u0443 \u0437\u0434\u0435\u0441\u044c \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0435\u0442 ?\u00bb. \u0411\u0443\u0434\u044c \u0442\u043e \u043c\u043e\u0449\u043d\u043e\u0435 \u043f\u0440\u043e\u043b\u0438\u0441\u0442\u044b\u0432\u0430\u043d\u0438\u0435 less \u0438\u043b\u0438 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b grep \u0438\u043b\u0438 sed, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u043e\u0434 Windows \u0445\u043e\u0442\u044f\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043b\u0451\u0433\u043a\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u0442\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c \u0432 \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435. \u041f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 Windows \u0434\u043b\u044f Linux (WSL) \u0441\u0434\u0435\u043b\u0430\u043b\u0430 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u0448\u0430\u0433 \u0432\u043f\u0435\u0440\u0451\u0434 \u0432 \u044d\u0442\u043e\u043c \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438. \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c","og:url":"https:\/\/prohoster.info\/it\/blog\/administrirovanie\/integriruem-komandy-linux-v-windows-s-pomoshhyu-powershell-i-wsl","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:24:16+00:00","article:modified_time":"2019-10-31T19:24:16+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"38520","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-23 22:21:20","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 01:08:30","updated":"2026-01-23 22:21:20"},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/posts\/38520","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/comments?post=38520"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/posts\/38520\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/media?parent=38520"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/categories?post=38520"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/tags?post=38520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}