I use commands like sudo service memcached start to turn on various things after a reboot and I am wondering if it is possible to also tell this service to start memcached to start with certain flags, for example -vvv?

Any ideas? (The 'service' was automatically created when I installed through apt-get)

  • Those services are files inside /etc/init.d/ and /etc/init/. Commented Mar 6, 2012 at 18:04

3 Answers 3


You typically configure services like this using files in /etc. For this particular package, look at


Also, reading the man page for memcached will usually show you the location of the configuration files.


After way too long searching, it seems that you have to add flags to /etc/memcached.conf

  • I would recommend adding more information to your answer. How to add the flags? How does that help? Link the resource where you found this while searching and other relevant points which would help improve the quality of the answer.
    – Aditya
    Commented Aug 9, 2013 at 9:34

Kubernete's documention asks you to pass args to systemd services all the time.

The thing that sucks is that every implementation/flavor/distribution of Linux is different and installs things in different places !
And then on top of that every implementation/flavor/installation method of Kubernetes is different as well !!
And then, because that wasn't enough to deal with systemd has like 5 different methods of passing flags/arguments as well !!!

Thus the best way to do this seems to be:
To use the find command to find where *.service is located, and that won't always work either, because some implementations of systemd don't have you pass arguements in the *.service file, but if you search for the name of the service with the find command, you might find a config file where the EXTRA_ARGs are passed, thus I claim find command is the best method for linux noobs. Other than that you'd need to do a deep dive and truly learning the ins and outs of systemd/all 5ish different methods of passing args.

WorkerNodeBash# find / -name "*.service" | grep -i "kube"
WorkerNodeBash# nano /etc/systemd/system/kubelet.service

Description=Kubernetes Kubelet

ExecStart=/usr/local/bin/kubelet \
  --config=/var/lib/kubelet/kubelet-config.yaml \
  --container-runtime=remote \
  --container-runtime-endpoint=unix:///var/run/containerd/containerd.sock \
  --image-pull-progress-deadline=2m \
  --kubeconfig=/var/lib/kubelet/kubeconfig \
  --network-plugin=cni \
  --register-node=true \
  --pod-manifest-path=/etc/kubernetes/manifests \


(The above comes from Kubernetes the hard way implementation, I've also done kubeadm implementation and looked in this same file and saw no args AND when I tried to pass args they were ignored?, but thanks to learning how to use the find command I was able to search:
WorkerNodeBash# find / -type f -name "*.yaml" | grep "kube"
And I found a config file that mentioned KUBELET_EXTRA_ARGS=, and pass them in there.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .