Author Topic: How to start/stop services on Backbox  (Read 14274 times)

ghostdog

  • Guest
on: January 07, 2011, 02:52:55 AM
Hi,

First you should be aware of what services you have installed in your system,
by issuing the command :  service --status-all , your system will show you the services available.

exmpl:
   ghostdog@backbox:~$ service --status-all
 [ ? ]  acpi-support
 [ ? ]  acpid
 [ ? ]  alsa-mixer-save
 [ ? ]  anacron
 [ - ]  apache2
 [ - ]  apparmor
 [ ? ]  apport
 [ ? ]  arpalert
 [ ? ]  atd
 [ ? ]  atftpd
 [ ? ]  avahi-daemon
 [ ? ]  binfmt-support
 [ - ]  bluetooth
 [ - ]  bootlogd
 [ - ]  brltty
 [ - ]  casper
 [ + ]  clamav-freshclam
 [ ? ]  console-setup
 [ ? ]  cron
 [ ? ]  cryptdisks
 [ ? ]  cryptdisks-early
 [ ? ]  cryptdisks-enable
 [ ? ]  cryptdisks-udev
 [ ? ]  cups
 [ ? ]  dbus
 [ - ]  dhcp3-server
 [ ? ]  dmesg
 [ ? ]  dns-clean
 [ ? ]  ecryptfs-utils-restore
 [ ? ]  ecryptfs-utils-save
 [ ? ]  failsafe-x
 [ - ]  fancontrol
 [ ? ]  gdm
 [ + ]  gpsd
 [ - ]  grub-common
 [ ? ]  hostname
 [ ? ]  hwclock
 [ ? ]  hwclock-save
 [ ? ]  irqbalance
 [ - ]  kerneloops
 [ ? ]  killprocs
 [ - ]  lm-sensors
 [ ? ]  miredo
 [ ? ]  miredo-server
 [ ? ]  module-init-tools
 [ ? ]  mysql
 [ ? ]  netdiag
 [ ? ]  network-interface
 [ ? ]  network-interface-security
 [ ? ]  network-manager
 [ ? ]  networking
 [ ? ]  nstxcd
 [ ? ]  nstxd
 [ ? ]  ntop
 [ ? ]  ondemand
 [ + ]  openbsd-inetd
 [ - ]  openvas-server
 [ ? ]  openvpn
 [ ? ]  pcapdump
 [ ? ]  pcmciautils
 [ ? ]  plymouth
 [ ? ]  plymouth-log
 [ ? ]  plymouth-splash
 [ ? ]  plymouth-stop
 [ + ]  postgresql
 [ ? ]  pppd-dns
 [ - ]  privoxy
 [ ? ]  procps
 [ + ]  pulseaudio
 [ ? ]  rc.local
 [ - ]  rsync
 [ ? ]  rsyslog
 [ + ]  saned
 [ ? ]  screen-cleanup
 [ - ]  sendmail
 [ ? ]  sendsigs
 [ - ]  smartmontools
 [ ? ]  speech-dispatcher
 [ + ]  ssh
 [ ? ]  stop-bootlogd
 [ ? ]  stop-bootlogd-single
 [ ? ]  stunnel4
 [ ? ]  sudo
 [ ? ]  tcpspy
 [ ? ]  tinyproxy
 [ - ]  tor
 [ ? ]  ubiquity
 [ ? ]  udev
 [ ? ]  udev-finish
 [ ? ]  udevmonitor
 [ ? ]  udevtrigger
 [ ? ]  ufw
 [ ? ]  umountfs
 [ ? ]  umountnfs.sh
 [ ? ]  umountroot
 [ ? ]  unattended-upgrades
 [ - ]  urandom
 [ ? ]  virtualbox-ose
 [ + ]  winbind
 [ - ]  x11-common
ghostdog@backbox:~$

* To start or stop a service , type :  sudo /etc/init.d/<service_name> start/stop

Exmpl:
  ghostdog@backbox:~$ sudo /etc/init.d/ssh start
 * Starting OpenBSD Secure Shell server sshd                             [ OK ]
ghostdog@backbox:~$




Diavolo_Rosso

  • Newbie
  • *
  • Posts: 14
    • View Profile
Reply #1 on: January 13, 2011, 12:29:33 AM
Se posso fare una precisazione, il richiamo dei lanciatori tramite /etc/init.d/* sta via via diventando sempre più obsoleto a favore dell'utilizzo di service.

Visto che già lo si usa nell'how-to per vedere lo stato dei servizi, perchè non continuare ad usare service anche per le altre operazioni? ;)

Code: [Select]
service <service_name> start/stop/status



JoeBlow

  • Newbie
  • *
  • Posts: 3
    • View Profile
Reply #2 on: October 09, 2013, 08:15:07 AM
THANK YOU SO MUCH for this!
On a similar note, how do I prevent a process from starting up on boot? (and how to restore it later?)
Thanks again!
Best regards -
Joe



b4d_bl0ck

  • Sr. Member
  • ****
  • Posts: 285
    • View Profile
Reply #3 on: October 09, 2013, 08:34:20 AM
Usually it's as easy as:
Code: [Select]
sudo update-rc.d <servicename> disable|enableThis is the basic command and most of the times it's all you'll need. It will use the default runlevels to configure the specified init script.
For more details and a more customized configuration, as usual look at the man page: man update-rc.d

Bye.

bool secure = check_paranoia() ? true : false;


Jobs

  • Newbie
  • *
  • Posts: 1
    • View Profile
Reply #4 on: December 06, 2013, 06:08:57 AM
Exmpl:
1、
alt+F2 open terminal
run the command :  service ssh status/start/stop/restart
2、
run the command : chkconfig ssh on