I need help with these questions for my homework. This is all UNIX/Linux stuff.
ID: 3599284 • Letter: I
Question
I need help with these questions for my homework. This is all UNIX/Linux stuff.
11. If you start a program running and then stop it with ctrl - z, explain the roles of the built-ins fg and bg for running it.
12. The process table usually starts with the init process whose job it is to start other processes. What is init's PID?
13. The read command is an example of a particular kind of command that the shell carries out itself rather than running a program on the disk. We call that kind of command a?
14. Most scripts begin with a special "shebang" line. Give an example of a shebang line and say what information provides the shell.
Explanation / Answer
Dear Student,
here are the naswers..
----------------------------------------------------------------------------------------------------------------------------------------
Ans1:
fg = foreground
bg = background
WHen you start a program is mostly run in the background or foreground, hence to switch between these two we use bg and fg commnads.
-----------------------------------------------------------------------------------------------------------------------------------------
Ans:2: init is the first process which run on the system i.e it's the parent of all the process. The PID of the init is 1.
-----------------------------------------------------------------------------------------------------------------------------------
Ans:3 read command is use to read the input from the keyboard.It raeds the data from the keyboard until you press the enter key.
-------------------------------------------------------------------------------------------------------------------------------------
Ans:4:
#!/bin/bash is an example of shebang line. It indicates that we are working on bash shell i.e we are executing the script under bash shell.
--------------------------------------------------------------------------------------------------------------------------------------
Kindly Check and Verify THanks...!!!