What is the difference between opening new tab of terminal in same window and opening new window of terminal?
Taking in consideration
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
what about the application running it will be seen running in the same terminal or another pts ?
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