Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/unix/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows powershell:更改默认工作目录_Powershell - Fatal编程技术网

Windows powershell:更改默认工作目录

Windows powershell:更改默认工作目录,powershell,Powershell,每次打开Windows powerShell时,我都需要将cd刻录到特定文件夹 有没有办法在powerShell参数中对其进行配置(例如,我考虑的是Json参数) 我发现设置位置是有用的。我在参数json中尝试了“Set Location”:“c:/”,但似乎不起作用 有什么想法吗 汤姆舒马赫评论后更新: 我想我已经有了一个profile,我对第一个profile很感兴趣:(我参数json的一部分) 在此profil中添加“设置位置”:“/home/aalidra”没有成功 Thx看看这篇关于P

每次打开Windows powerShell时,我都需要将cd刻录到特定文件夹

有没有办法在powerShell参数中对其进行配置(例如,我考虑的是Json参数)

我发现设置位置是有用的。我在参数json中尝试了“Set Location”:“c:/”,但似乎不起作用

有什么想法吗

汤姆舒马赫评论后更新: 我想我已经有了一个profile,我对第一个profile很感兴趣:(我参数json的一部分)

在此profil中添加“设置位置”:“/home/aalidra”没有成功


Thx

看看这篇关于Powershell配置文件的文章。。如果添加配置文件,则可以添加所需的CD:

这是最好的方法。您也可以修改快捷方式,以便将“起始位置”设置为有问题的文件夹。Thx TOM以获取您的答案。我已根据你的建议更新了我的问题
 "profiles":
    {
        "defaults":
        {
            // Put settings here that you want to apply to all profiles.
        },
        "list":
        [
            {
                "guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
                "hidden": false,
                "name": "Ubuntu-20.04",
                "source": "Windows.Terminal.Wsl",
                "startingDirectory":"//wsl$/Ubuntu-20.04/home/vmelin",
                "colorScheme": "Solarized Dark",
                "fontFace": "Cascadia Code PL"
            },
...