Tuesday, January 21, 2025

For me only


If I want to change the root directory for docker images, I can have the below /etc/docker/daemon.json file.


  1. {
  2. "data-root" : "/my/path/to/docker/images"
  3. }

If I want to change the root directory for docker images, I can have the below /etc/docker/daemon.json file. Before doing these changes, stop docker by
$  sudo systemctl stop docker

Then update the /etc/dicker/daemon.json file 

And then:
$ sudo systemctl start  docker


If I want to kill all the bash process except the current bash process, use the below the below bash function:

  1. kallbatch() {
  2. for i in ` ps -ef | grep bash | grep -v grep | grep -v libexec | awk ' { print $2 } ' `
  3. do
  4. if [ $$ -ne $i ] ; then
  5. sudo kill -9 $i
  6. fi
  7. done
  8. }

No comments:

Post a Comment