New tab Vs New window in terminal

What is the difference between opening new tab of terminal in same window and opening new window of terminal?

Taking in consideration

  1. user variable if x is defined in terminal and new tab is opened in this this terminal x is going to be passed automatically or not in new tab

  2. what about the application running it will be seen running in the same terminal or another pts ?

0

2 Answers

Tabs and new windows don't differ a lot - they're all a new instance of an interactive shell. There is a set of default variables which will show up in any instance of the shell : PS1 , USER, SHELL , etc. These are all documented in the bash manual , or whichever shell you use.

If you manually declare a variable in a window , it won't be visible to new tab or new window unless you use export keyword. For example, export FOO=BAR will make variable FOO visible to all new tabs or windows. If you declare it as FOO=BAR , it won't be visible.

Nothing. In fact, you can drag a tab outside the window, and it will popup and become its own window.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like