The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

Views: 2,217β€…    Votes:  2β€…
Tags: command-line   visual-studio-code  
Link: πŸ” See Original Answer on Ask Ubuntu πŸ”—

Title: Can I check if the terminal was started by Visual Studio Code?
ID: /2018/04/03/Can-I-check-if-the-terminal-was-started-by-Visual-Studio-Code_
Created: April 3, 2018
Upload: November 24, 2022    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false

Using this potentially duplicate answer:

rick@alien:~$ echo $$
rick@alien:~$ pstree -aps $$
systemd,1 splash fastboot kaslr
      └─lightdm,1294 --session-child 12 19
          └─upstart,1838 --user
                      └─pstree,5696 -aps 25119

The environment variable $$ returns the current running processes PID (Process ID) which is the bash terminal.

The pstree command shows the entire β€œtree” of commands called.

⇧ Monitoring CPU freq in real time Is there a setting in the startup applications menu item to remember all apps when shutting down?  β‡©