Skip to content

Latest commit

 

History

History
9 lines (9 loc) · 237 Bytes

get-name-of-shell.md

File metadata and controls

9 lines (9 loc) · 237 Bytes
  • To get the name:
sh -c 'ps -p $$ -o ppid=' | xargs ps -o comm= -p
  • OR to get full path of executable:
sh -c 'ps -p $$ -o ppid=' | xargs -I'{}' readlink -f '/proc/{}/exe'

source: https://askubuntu.com/a/1022440