0% found this document useful (0 votes)
9 views2 pages

Process Commands in Linux Explained

The document discusses various process commands in a shell environment, including the process ID of the login shell, the differences between the 'wait' and 'sleep' commands, and how to change the login shell using the 'chsh' command. It also covers options for the 'kill' command to manage processes and the 'ps' command to list running processes. Additionally, it explains the 'exit' command, which terminates the shell or program and logs the user out of their session.

Uploaded by

humerafatima396
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views2 pages

Process Commands in Linux Explained

The document discusses various process commands in a shell environment, including the process ID of the login shell, the differences between the 'wait' and 'sleep' commands, and how to change the login shell using the 'chsh' command. It also covers options for the 'kill' command to manage processes and the 'ps' command to list running processes. Additionally, it explains the 'exit' command, which terminates the shell or program and logs the user out of their session.

Uploaded by

humerafatima396
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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.

You might also like