gpt4 book ai didi

bash - 是否有与 Linux Bash 的 .bashrc 等效的 Windows 10 PowerShell?

转载 作者:行者123 更新时间:2023-12-02 20:51:45 25 4
gpt4 key购买 nike

我想在每次打开 power shell 时默认运行一些命令。 Bash 有一个 .bashrc 文件,它在启动时作为源代码运行。有没有办法用 powershell 来做到这一点?

最佳答案

正如戴老师在评论区指出的,Powershell Profiles听起来与 .bashrc 文件最接近。

A PowerShell profile is a script that runs when PowerShell starts. You can use the profile as a logon script to customize the environment. You can add commands, aliases, functions, variables, snap-ins, modules, and PowerShell drives. You can also add other session-specific elements to your profile so they are available in every session without having to import or re-create them.

关于bash - 是否有与 Linux Bash 的 .bashrc 等效的 Windows 10 PowerShell?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52175669/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com