Skip to content

-nologo should be the default #15644

Closed
Closed

Description

Steps to reproduce

Launch PowerShell in your favorite terminal.

Expected behavior

The prompt I've set up in my PowerShell profile.

Actual behavior

I get the following boilerplate:

PowerShell 7.1.3
Copyright (c) Microsoft Corporation.

https://aka.ms/powershell
Type 'help' to get help.

"But Immo, you can turn this off by using -nologo". Yes. But I have to do this in every single one of the places that launches the shell: shortcuts in the start menu, pinned task bar entries, the Windows Terminal commands, the VS Code integrated terminal, the Visual Studio terminal, Git GUI clients etc. It's tiring. If there would be a user wide setting, that might be an OK workaround, but every time I set up a new machine I have to add these extra arguments -- just to get a shell that is ready for use.

The year is 2021. We're embracing command line stuff and simple text files for the modern dev environment (really, we're just rediscovering Unix philosophy, but that's a different rant 😄). It seems the default shell behavior should optimize for this kind of user, rather than forcing this boilerplate on everyone that arguably adds zero value to their experience.

Activity

  1. bergmeister commented on Jun 22, 2021

    @bergmeister
    Contributor

    The point around configuration in multiple places is a good one. Being able to override the default (whatever it is now or will be) via an environment variable seems like a good addition.

  2. kilasuit commented on Jun 22, 2021

    @kilasuit
    Collaborator

    I do like this idea but don't think this should be an environmental variable but should be instead added as a configurable option (defaulted as on) in the powershell.config.json file as documented at https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_powershell_config?view=powershell-7.1

    Configuration files for PowerShell, replacing Registry configuration.

    This would then tooling like choco/winget/etc to turn it off as part of their installation & tooling like just MSI/MSIX install leave it for those that are coming to PowerShell 7 for the first time

  3. warrenrumak commented on Jun 23, 2021

    @warrenrumak

    I'm generally in favour of this but the question must be asked -- without any kind of heading, how would a user know whether they're in the CMD or PowerShell environment? (The existence of a space between the > and the cursor is not a satisfactory answer.)

  4. terrajobst commented on Jun 23, 2021

    @terrajobst
    Author

    I don’t believe this to be a general concern as virtually all places show this information contextually (title bar, tab icon etc). In the rare cases where a user might not know, entering commands will make it quite obvious.

  5. rkeithhill commented on Jun 23, 2021

    @rkeithhill
    Collaborator

    I'm not a big fan of all the text but it's not completely without precedent:

    2> python
    Python 2.7.9 (default, Dec 10 2014, 12:28:03) [MSC v.1500 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>>
    

    At least the above is only two lines of extra text. :-) I wouldn't mind seeing just:

    PowerShell 7.1.3
    PS C:\Users\hillr> 
    

    Or if your legal team absolutely requires the copyright:

    PowerShell 7.1.3 - Copyright (c) Microsoft Corporation
    PS C:\Users\hillr>
    
  6. ghost removed
    Needs-TriageThe issue is new and needs to be triaged by a work group.
    on Jun 23, 2021
  7. rkeithhill commented on Jun 23, 2021

    @rkeithhill
    Collaborator

    Argh GH!! There is some keyboard shortcut I keep hitting that presses the Close with comment button. Sorry guys.

  8. Nirmal4G commented on Jun 23, 2021

    @Nirmal4G

    Maybe, if there's a way to check the launch context of the console, we could detect whether it's lauched by the user (interactive) or via script (non-interactive).

    This way we can display the header for the first-time the user launches the console and have a setting that suppress the header afterwards, while suppressing the header in the context of a script launch.

  9. iSazonov commented on Jun 23, 2021

    @iSazonov
    Collaborator

    More than once we have received requests to change default options. We already have several new environment variables (update notifications, telemetry). This is a good way, we just have to be more consistent to have support for these options in all kind of configurations (environment variables, config files, Registry)

  10. added
    Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassif
    on Jun 23, 2021
  11. SteveL-MSFT commented on Jun 23, 2021

    @SteveL-MSFT
    Member

    I think having some cmdlets making it easy to configure powershell.config.json might be the way to do this (since this file is already being read at startup). I'd hate to add more env vars.

  12. 60 remaining items

  13. terrajobst commented on Jan 11, 2022

    @terrajobst
    Author

    Agreed. Until there is a user wide setting to disable the logo entirely I personally don’t think my issue was addressed.

  14. rkitover commented on Jan 12, 2022

    @rkitover
    Contributor

    What about my idea of having an environment variable for this?

    There is already $env:POWERSHELL_UPDATECHECK which is definitely nice to have.

    Maybe we don't want to have 20 environment variables, and maybe we don't want to have $env:POWERSHELL_OPTIONS for security reasons, but this seems like a good solution for this particular problem.

    On Linux this would allow putting this environment variable in pam or systemd environment definitions and use pwsh as a login shell with no options and no startup banner.

    On Windows it would allow setting one machine env var and not have to tweak a bunch of different things to pass -nologo.

  15. kilasuit commented on Jan 13, 2022

    @kilasuit
    Collaborator

    Kenny (@dancojocaru2000) / Immo Landwerth (@terrajobst) - I didn't say I agreed with the close resolution (as I don't) but thoufht it worth mentioning incase it was lost in the midst

    Rafael Kitover (@rkitover) - whilst env vars can work, personally I dislike them and I'd like to see them and this implemented too

  16. m1karii commented on Jan 16, 2022

    @m1karii

    Rafael Kitover (@rkitover) agreed. At least something like $env:POWERSHELL_DISPLAYLOGO would be nice, if nothing else.

  17. SeeminglyScience commented on Jun 7, 2023

    @SeeminglyScience
    Contributor

    Re-opening as I believe this was closed by mistake.

  18. jeremyj563 commented on Jul 10, 2023

    @jeremyj563

    I don't really care that much about which is the default behavior but I definitely agree there should be a global flag of some sort for this. I'd prefer the environment variable approach as I would always know exactly where to look/set the config regardless of host OS.

  19. SteveL-MSFT commented on Oct 11, 2023

    @SteveL-MSFT
    Member

    The default logo has been minimized to just show the version now. I don't think additional work here is needed.

  20. microsoft-github-policy-service commented on Oct 12, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has been marked as won't fix and has not had any activity for 1 day. It has been closed for housekeeping purposes.

  21. JustinGrote commented on Jan 20, 2024

    @JustinGrote
    Contributor

    Sorry to necro this but if you really want a minimal terminal if you are setting PowerShell as your default linux login, you can do these steps:

    1. Create a file /usr/local/bin/pwshlogin, make it executable (chmod +x /usr/local/bin/pwshlogin), and add the following content:
    #!/bin/sh
    pwsh -nologo -l
    
    1. usermod -s /usr/local/bin/pwshlogin YOURUSERNAME

    2. BEFORE YOU CLOSE THE WINDOW, Test with a new ssh login or otherwise to make sure it works.

    3. Voila, clean login:
      image

  22. rdebath commented on Jun 7, 2024

    @rdebath

    Justin Grote (@JustinGrote)

    1. Your script is wrong, it leaves a bourne shell running.
    2. $SHELL is now broken if you manage to make it alogin shell
    3. Most systems allow only root to define shells not in a whitelist.
    4. Using another program to fix inadequacies of your shell should be a serious embarrassment.
  23. m1karii commented on Aug 25, 2026

    @m1karii

    still waiting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Committee-ReviewedPS-Committee has reviewed this and made a decisionIssue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-Won't FixThe issue won't be fixed, possibly due to compatibility reason.WG-Interactive-Consolethe console experience

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions