How to kill all the `buffers` in emacs at once?

emacs, keyboard-shortcuts

Solution

I am using this function to kill all the buffers in emacs

(defun nuke-all-buffers ()
  (interactive)
  (mapcar 'kill-buffer (buffer-list))
  (delete-other-windows))

(global-set-key (kbd "C-x K") 'nuke-all-buffers)

Works fine for me :-)

Problem

Is there a command to kill all buffers in my emacs? instead of having me doing 'Ctrl -k ' one by one until there is no more buffer? Thank you.

Original source