Whatever I did, it didn't work, tty
command would always return not a tty
response and exit non-0, i.e. nothing that require tty
would work on my terminal.
I'm making an ephemeral workstation with persistent disk as my $HOME
with Ubuntu Bionic Beaver
on GKE
.
Since I had brew
installed in my PD
mounted $HOME
and brew
was in my $PATH
, following worked for me:
brew install tmux
tmux new -d -s <some arbitrary session name here> ### i.e.> tmux new -d -s tty
tmux ls # Lists your sessions
tmux a # Attach to first available session
Then inside tmux:
$ tty
Voila
/dev/pts/0
My agnoster is b0rkz but now I can do stuff that prompts for interactive password entry, i.e. gcloud auth
.

PS: For those curious, I mounted /etc/shadow
, /etc/group
, /etc/passwd
into /etc
with configmap