Wednesday, June 29, 2022

linux: debian: ubuntu: How to discover an application and its service to handle it


>PROBLEM

Scenario by example:
On a linux(debian, ubuntu, etc) system you want to discover the postgresql service, its version and how to stop/start.


>SOLUTION


Alternative ways to discover a service:

1. whereis

2. locate

3. ps aux 

Ex.: ps aux | grep postgres

/usr/lib/postgresql/13/bin/postgres -D /var/lib/postgresql/13/main -c config_file=/etc/postgresql/13/main/postgresql.conf

4. systemctl

returns all registerd services


Using systemctl (newer)

systemctl stop ssh

systemctl disable ssh

systemctl enable ssh

systemctl start ssh

systemctl status ssh


Using service

service  postgresql status

service  postgresql start

service  postgresql stop


>ENV

linux/debian

No comments:

Post a Comment

eclipse: java: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder" or Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

  >PROBLEM Using Eclipse, you try to run a simple logging test using "org.slf4j.Logger" like the sample below: package Test; im...