Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am starting a server via ssh from various locations, and i want the terminal printout to be able to be viewed locally on the server, is there any way to do this?

share|improve this question
up vote 0 down vote accepted

There are certainly a lot of ways to be able to view the output of a session that is being run from a different terminal session.

One simple way is to log the output using a command like tee. This will write the output of a command both to your terminal and to a file at the same time. To capture all output and errors from starting a server, run

server_cmd 2>&1 | tee /path/to/logfile

To read the saved output in another session, simply read the saved log file /path/to/logfile.

Another more flexible way is to use a terminal multiplexer program such as screen Install screen, tmux Install tmux, or byobu Install byobu. A terminal multiplexer allows you to attach to and detach from running terminal sessions. This gives you the ability to do view the output of running programs from more than one attached session, and much more. See Ubuntu's help page on Byobu.

share|improve this answer
Thanks, I wanted a terminal multiplexer, I'll try them out once I get home. – coolwithpie May 6 '14 at 14:44
@coolwithpie, great, definitely try byobu if you haven't tried any of them before, it is a wrapper around screen or tmux, it is very easy to get started with. Let me know if I can add anything to my answer to expand on what you're looking for. – Mike Miller May 6 '14 at 14:49
I got tmux and it works great. Thanks so much. – coolwithpie May 6 '14 at 15:55
@coolwithpie If this answer solves your problem perfectly, would you mind marking it as the accepted answer? Thanks. – Mike Miller May 6 '14 at 17:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.