LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-31-2006, 10:44 AM   #1
dkennedy
LQ Newbie
 
Registered: Jul 2006
Posts: 2

Rep: Reputation: 0
/dev/tty: No such device or address ?


having some issues with /dev/tty. What binds it to the other ttys? Basically, nothing with pipe is working as a result.

when i type cat test > /dev/tty i get silence.
when i type cat test > /dev/tty x (x being the proper term number) it gives me "test".

im using bash. When it opens up, it gives me the message "bash: no job control in this shell". I have a funny feeling this is related. Google hasnt been anny help-can anyone point me in the right direction to resolve this?

thanks-
 
Old 08-01-2006, 03:52 AM   #2
greenleaf
Member
 
Registered: Feb 2004
Location: Chester, UK
Distribution: Linux From Scratch. 64 bit. Kernel 5.8.3. Fluxbox.
Posts: 53

Rep: Reputation: 22
/dev/tty is the controlling terminal for the current process, if there is such a terminal. Do ps -a and look for /dev/tty. If it doesn't appear then that process doesn't have a controlling terminal. To find the terminal associated with a particular terminal just write tty in that shell and press return. You should get the device file name as a result. You can get more information about tty via man tty
It is quite normal for there to be no controlling terminal. So if there is no device associated with it then the kernel will just ignore anything you send to that file. It only cares if it has attached a device (possibly pseudo) to that node. If it does care, and echoing is on (which is a possibility), then anything you send to the (special) file will be echoed.

The second part of your question may be related to the login shell. Check in /etc/passwd and make sure that you really do start bash for the user you are logging in as. Using /bin/sh instead is a likely cause. So do
grep username /etc/passwd
and look for the path to the program that is launched at the end of the text line.
If its /bin/sh then you have the wrong shell. What you should have is /bin/bash
 
Old 08-01-2006, 11:28 AM   #3
dkennedy
LQ Newbie
 
Registered: Jul 2006
Posts: 2

Original Poster
Rep: Reputation: 0
sure enough, i do not have a controlly terminal, although tty does return the proper info.

My real reason for asking the q is that pipe doesnt work in the shell. How do i set the controlling terminal? is it in inittab?

thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/dev/tty0, /dev/tty1, /dev/tty10...and so on...which should be used for a device ??? b0nd Slackware 2 04-02-2006 08:14 AM
cat /dev/tty? yoshiznit123 Linux - Security 3 12-14-2005 12:44 PM
dd: /dev/hda: No such device or address securehack Linux - General 97 06-04-2005 07:27 PM
loop: can't open device /dev/loop0: No such device or address miaviator278 Linux - Security 3 06-09-2004 09:24 PM
remove tty files from /dev kprocter Linux - General 4 06-03-2003 04:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration