fg %3command and it would have the same result.
set +m and set -mcommands.
Nohupstands for no hangup, and that means even if the parent shell is diconnected the job just will continue, The output of the nohup command will write in nohup.out the file if any redirecting filename is not mentioned in nohup command.
bgcommands on that particular job anymore.
nohup bash script.sh > myresult.txt 2>&1
screen -s Session_Nameto start a named session.now lets run a command inside screen:
screen -dr <Screen-ID>command.This means detach the specified screen first and then reattach it.
jobscommand with the
-loption, it will also show process ID.
pswill print four columns of information for minimum two processes running in the current shell, the shell itself, and the processes that run in the shell when the command was invoked.
a= show processes for all users
u= display the process’s user/owner
x= also show processes not attached to a terminal
axare completely equivalent.
ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head -10. With
–formatoptions, ps allows us to build user-defined output formats.
pgrepcommand searches for processes currently running on the system, based on a complete or partial process name, or other specified attributes.
watch -n 1 'ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head'
man 7 signal)
killcommand in Linux (located in /bin/kill), is a built-in command which is used to terminate processes manually . kill command sends a signal to a process which terminates the process.
kill -lto see all signals you can send using kill.
killallis a tool for terminating running processes on your system based on name. In contrast,
killterminates processes based on Process ID number (PID). Like
killallcan also send specific system signals to processes.
freecommand displays the total amount of free space available along with the amount of memory used and swap memory in the system, and also the buffers used by the kernel.
-mfor megabytes, or
-tdisplays an additional line containing the total of the total, used and free columns:
uptimecommand shows you a one-line display that includes the current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes.
uptime -hto see all of