docker-compose 生成卻立刻結束 exited with code 0 的解法

開發環境想要一次開啟多台機器,可以互相串連使用,若有功能的開起來沒問題,但是若只想開純粹只有 tty 的,就會立刻被結束掉,要怎麼解決呢?

閱讀全文〈docker-compose 生成卻立刻結束 exited with code 0 的解法〉

Linux 如何離開、關閉 VIM

於 Linux 最常使用的編輯器就是 VI、VIM,但是之前有流傳著,非常多人在 Stack Overflow 裡面發問,而問題就是如何離開 VIM。

  • 如果是不小心進入,想離開 VIM 的:ESC 多按幾下,然後輸入 :q! ENTER 即可

下述摘錄自此篇:vi - How do I exit the Vim editor? - Stack Overflow

  • :q to quit (short for :quit)
  • :q! to quit without saving (short for :quit!)
  • :wq to write and quit
  • :wq! to write and quit even if file has only read permission (if file does not have write permission: force write)
  • 😡 to write and quit (similar to :wq, but only write if there are changes)
  • :exit to write and exit (same as :x)
  • :qa to quit all (short for :quitall)
  • :cq to quit without saving and make Vim return non-zero error (i.e. exit with error)

閱讀全文〈Linux 如何離開、關閉 VIM〉