loading...

linux : package and service management

zakiarsyad profile image Zaki Arrozi Arsyad ・1 min read

Package management

  • First, we need to update our repository
$ apt-get update
  • Install a package
$ apt-get install APPNAME
  • Check if a package is already installed
$ dpkg -l | grep APPNAME
  • Remove a package
$ apt-get remove APPNAME
  • Search packages by a keyword
$ apt-cache search “KEYWORD”

Service management

  • Check if a service is running
$ systemctl status APPNAME
  • Start a service
$ systemctl start APPNAME
  • Stop a service
$ systemctl stop APPNAME
  • Restart a service
$ systemctl restart APPNAME 
  • Check autostart enable
$ systemctl is-enabled APPNAME 
  • Enable autostart
$ systemctl enable APPNAME 
  • Disable autostart
$ systemctl disable APPNAME 

Discussion

pic
Editor guide