Both of these will have a very large output, so combine with grep to filter for a specific string:
$ ps aux | grep mysql is a good way to see what process represents a MySQL instance, for example.
NOTE: the $ is conventionally used to represent the start of a command you type into your bash terminal and run with return or enter. You don't type out the $ character.
This is useful when your application is not running as expected and you want to check than any requried processes have been started.
You can use this to figure out what is running on a particular port (and kill it if desired):
I end up using these a lot when working with introductory web development students -- they don't know how to check what is running, end up starting 2 or more instances of a server process, and then get confused when they can't connect to their web application.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great post Jérémy!
Some more:
ps aux
will show you the running processes.netstat
will show you the open network ports.Both of these will have a very large output, so combine with
grep
to filter for a specific string:$ ps aux | grep mysql
is a good way to see what process represents a MySQL instance, for example.NOTE: the
$
is conventionally used to represent the start of a command you type into your bash terminal and run withreturn
orenter
. You don't type out the$
character.This is useful when your application is not running as expected and you want to check than any requried processes have been started.
You can use this to figure out what is running on a particular port (and kill it if desired):
stackoverflow.com/questions/115835...
I end up using these a lot when working with introductory web development students -- they don't know how to check what is running, end up starting 2 or more instances of a server process, and then get confused when they can't connect to their web application.