As I was going through it, it is possible in Ubuntu 20.04 LTS by using command
gnome-terminal
?
Is it any command in Windows For the Same. Explain the OS Scenario behind it.
It's not entirely clear what you're asking, but here's a few pointers for Windows:
If you're using regular console windows (conhost.exe
):
To open another cmd.exe
console window from cmd.exe
(run start /?
for help):
start cmd
start
by itself.To open another PowerShell console window from PowerShell (run help
Start-Process
for help; alias start
works too):
Start-Process powershell
(Windows PowerShell)Start-Process pwsh
(PowerShell (Core) 7)Of course, you're free to open a PowerShell window from cmd.exe
and vice versa; just use the executable names shown above.
If you're using Windows Terminal (run wt -h
for help or see the CLI documentation):
wt cmd
/ wt powershell
/ wt pwsh
-p <profileName>
instead of the executable name; e.g., wt -p myCmd
instead of wt cmd
, but be sure to specify the profile name exactly as defined, case-sensitively, otherwise the default profile is quietly used.wt -w 0 cmd
/ wt -w 0 powershell
/ wt -w 0 pwsh
As for the relationship between the original and the new console window:
While the process associated with the new window is a child process (that therefore inherits the caller's environment variables)...
... it lives on independently of its parent; that is, terminating the parent process (such as by closing the original console window) has no impact on the child process (and its window).