1

When I using Ubuntu,the first line of terminal is prompt and my command. But on Windows PowerShell,it shows an advertisement firstly each time I run terminal. Is there any method to hide it? I try to add cls command to profile but the effect is quite bad(the screen flicks).

Ubuntu Terminal Windows Terminal PowerShell Advertisement

mklement0
  • 382,024
  • 64
  • 607
  • 775
rpish
  • 31
  • 4
  • 2
    Edit the shortcut: "C:\Users\YourUsername\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Windows PowerShell\Windows PowerShell.lnk" and add ` -NoLogo` to the end of the "Target" – Booga Roo Jul 21 '22 at 17:34

1 Answers1

0

Add a call to the Clear-Host cmdlet as the last statement in your $PROFILE script:

'Clear-Host' |Add-Content $PROFILE -Force

The profile script will run every time you launch PowerShell, and Clear-Host will then scroll the prompt to the top of the screen buffer, giving you a layout identical to the ubuntu terminal.

Mathias R. Jessen
  • 157,619
  • 12
  • 148
  • 206
  • 1
    Thanks for the reply. I've tried this method and the window will blink on startup. I would like to know if there is a better way to solve this problem. – rpish Jul 21 '22 at 17:53