PRACTICAL NO - 5: Execute Process Commands:
X.
1. What is the process id of your login shell ?
2. What is the difference between wait and sleep ?
wait command will suspend execution of the calling thread until one of its children terminate. It will
return the exit status of that command. The sleep command is used to delay the execution of the next
command for a given number of seconds, hours, minutes.
XI. Result (Output of command )
XII. Practical Related questions :
1. How to give name of login shell ?
->The chsh command changes the login shell of your username. When altering a login shell, the chsh
command displays the current login shell and then prompts for the new one.
2. What are the various options of kill commands ?
--
kill [OPTIONS] [PID]...
kill signals available.
kill to check user access to a specific process.
kill to terminate a process gently.
kill to force termination.
kill -9 -1 terminates all running processes.
3. Various options of ps commands ?
--
ps Command Options
ps -ef or ps -aux − List currently running processes in full format.
ps -ax − List currently running processes.
ps -u <username> − List processes for a specific user.
ps -C <command> − List processes for a given command.
ps -p <PID> − List processes with a given PID.
4. Explain about exit commands ?
--- The command causes the shell or program to terminate. If performed within an
interactive command shell, the user is logged out of their current session, and/or user's current
console or terminal connection is disconnected.