windows_用命令行/终端打开网页(url)(launch a webpage by winodws CLI)

在powershell/cmd下

  • 使用start 打开http
    start http://www.baidu.com
    更短的:
  • start www.baidu.com
  • 用explorer
    explorer https://www.baidu.com

powershell 函数来打开

可以将以下函数写入到模块中(或者配置文件$profile),以便使用

function https
{
    param(
        $domain
    )
    Start-Process $domain
}
function httpsw
{
    param (
        $domain
    )
    $url = "www.$domain"
    Start-Process $url
    Write-Output "try to open https url:🎶 $url"
}

在这里插入图片描述

posted @ 2024-09-12 20:50  xuchaoxin1375  阅读(370)  评论(0)    收藏  举报  来源