Problem

In this hands-on project, you view and create device files. 1. Turn on your computer. A...

In this hands-on project, you view and create device files.

1. Turn on your computer. After your Linux system is loaded, switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and log in to the terminal using the user name of root and the password of secret.

2. At the command prompt, type ls –l /dev/tty6 and press Enter. What device does /dev/tty6 represent? Is this file a block or character device file? Why? What are the major and minor numbers for this file?

3. At the command prompt, type rm –f /dev/tty6 and press Enter. Next, type ls –l /dev/tty6 at the command prompt and press Enter. Was the file removed successfully?

4. Switch to the command-line terminal (tty6) by pressing Ctrl+Alt+F6 and attempt to log in to the terminal using the user name of root and the password of secret. Were you successful?

5. Switch back to the command-line terminal (tty2) by pressing Ctrl+Alt+F2, type the command mknod /dev/tty6 c 4 6 at the command prompt and press Enter. What did this command do? What other command can be used to do the same function? Next, type ls –l /dev/tty6 at the command prompt and press Enter. Was the file re-created successfully?

6. At the command prompt, type reboot and press Enter. After your Linux system has loaded, switch to a command-line terminal (tty6) by pressing Ctrl+Alt+F6 and log in to the terminal using the user name of root and the password of secret. Why were you successful?

7. At the command prompt, type ls –l /dev/tty? and press Enter. What is similar among all these files? Is the major number different for each file? Is the minor number different for each file? Why?

8. At the command prompt, type find /dev and press Enter to list all of the filenames underneath the /dev directory. Are there many files? Next, type du –s /dev at the command prompt and press Enter. How large in Kilobytes are all files within the /dev directory? Why?

9. At the command prompt, type cat /proc/devices | more and press Enter. Which devices and major numbers are present on your system? What character device has a major number of 4? How does this compare with what you observed in Step 2?

10. Type exit and press Enter to log out of your shell.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 5