friend of mine is a linux admin, would be nice if we could share a terminal session so he could teach me stuff without having to run something like VNC or some sort of screen share.
You can do this using tmux. I've never tried it, so I'm not going to look up the answer and pretend that I knew how. I'll let you figure out the details.
Setup SSH and then use screen.
setup a screen and give it a name,,,
screen -L -S [SESSIONNAME]
and then the person SSH'ing once connected will type
screen -x [SESSIONNAME]
Tmux is basically screen. But without the ability to attach multiple terminal views to one screen (unless they have recently added it)
Awesome, going to try this out
I'm not sure what it means to "attach multiple terminal views to one screen," but I had some time on my hand so I created a vm and installed tmux and openssh. I was able to connect a remote user to the same tmux session as the local user using a shared socket.
"attach multiple terminal views to one screen"
Terminals being a terminal emulation program itself, screen being the view that the terminal is looking at. For example when you open terminal, it bolts to 'tty0' whilst another one will not. Screen separates it from the terminal and allows multiple connections.
Seeing as its built into screen and does not require the shared socket route (which may have security implications) I would advise the use of screen.
The shared sockets route was the round about way to do it with TMUX and the last time I used it, I personally thought it was clunky and process heavy in comparison.
Thanks for explaining that.
I just tried using screen and it was easier to get working. Using your instructions, both users must be logged into the same account. I tried to get multiuser to work, but could seem to get the remote user to see the screen the local user created. For OP's case, that probably doesn't matter anyway. I would recommend OP use screen rather than doing what I did to make tmux work.
Tmux is actually really easy to use
Here's the instructions.
The admin runs the following commands:
tmux -S /tmp/share new -s share -d
chmod 777 /tmp/share
tmux -S /tmp/share attach
Then the user just runs
tmux -S /tmp/share
And voila. Shared tmux session. I do this all the time when programming in vim or teaching my friends how to use linux.