The Cookie Machine - Click here to drag window

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

If you can read me, I'm broken!

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

URL: https://askubuntu.com/q/1021556
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: September 15, 2024    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


Using this potentially duplicate answer: https://askubuntu.com/a/1012277/307523

rick@alien:~$ echo $$
25119
───────────────────────────────────────────────────────────────────────────────────────────
rick@alien:~$ pstree -aps $$
systemd,1 splash fastboot kaslr
  └─lightdm,1026
      └─lightdm,1294 --session-child 12 19
          └─upstart,1838 --user
              └─gnome-terminal-,25109
                  └─bash,25119
                      └─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?  β‡©