Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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

This is one of my questions for my exam ..

We are not supposed to use mesg y/n for this but we should effectively avoid mesgs along with the problem of not being able to change groups.

share|improve this question
Constraints seem a bit contrived. Perhaps chmod g= "$(tty)"? – jw013 Oct 15 '12 at 17:39
Ummm, its allowed on your exam to have Unix & Linux Stack Exchange answer the question for you? – derobert Oct 15 '12 at 20:43
Yes but my exam is over long back :P – user25795 Dec 7 '12 at 4:22

mesg just changes the permissions on your tty, so mesg y does

chmod 620 `tty`

and mesg n does

chmod 600 `tty`

i.e. enabling and disabling group write access to the tty device.

share|improve this answer

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.