27

Let's say we do:

tail -f  /var/log/apache2/error.log

Then we see what we want to see, and then, we want to quit, so that we can navigate to other directories and so on... So, the question is:

How can we quit tail ?

I've tried to type: 'q', and 'exit', and 'quit', and 'kill', no luck.

2 Answers 2

43

The answer to your query is to hit Ctrl + C together

3
  • :) I was used to Control-B Thanks. :)
    – MEM
    Apr 24, 2011 at 16:20
  • 1
    In general pressing Ctrl-C sends the 'interrupt' signal, aka SIGINT, to whatever is running. It tells the application that that the user wants to interrupt whatever it is currently doing. Many applications will exit when the get that signal, as tail does, others may stop doing something but continue running.
    – bdsl
    Aug 25, 2015 at 10:38
  • 2
    I'm looking for an alternative. If you run a multi-command line like start daemon; tail -F logfile; stop daemon (in bash or fish), pressing Ctrl+C aborts mission early (without running stop daemon as intended). Jul 20, 2017 at 13:08
3

In Linux Mint 18 the answer actually is q to quit out of a tail view in terminal

1
  • life saver.. got inside by touch config.json and the prompt with "?" came up. So frustrating.
    – Max
    Jan 12, 2017 at 19:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .