TYEYDY

快樂生活 | 身體健康

0%

前言:

每次在安裝 Linux 設定 sudo 時都會預設使用nano編輯器 ,

進入編輯器又不熟悉怎離開的情況下金魚腦忘記指令都必須要查資料才能離開

如果不小心進入 nano 編輯器怎離開

Ctrl + X 之後會問是否存檔 按下 Y / N

設定 Vim為預設編輯器

1
$ sudo update-alternatives --config editor
1
2
3
4
5
6
7
8
9
  Selection    Path                Priority   Status
------------------------------------------------------------
* 0 /bin/nano 40 auto mode
1 /bin/ed -100 manual mode
2 /bin/nano 40 manual mode
3 /usr/bin/vim.basic 30 manual mode
4 /usr/bin/vim.tiny 15 manual mode

Press <enter> to keep the current choice[*], or type selection number:

尋找 vim.basic 或 vim.tiny 並將 Selection 輸入並按下Enter,

下次打開的時候就會使用預設的 Vim

參考網站:
https://askubuntu.com/questions/539243/how-to-change-visudo-editor-from-nano-to-vim

如果這一篇文章有幫助到你的話,
請您幫忙點選廣告,都是以不擾人與不強迫的方式呈現

每次安裝新的主機環境都會漏東漏西或是到處查資料,在此紀錄以方便以後使用

  • Ubuntu 20.04
  • Godaddy VPS

    基本設定

    關閉user sudo 權限

    這次安裝跟之前的不太一樣,官方GUI介面並沒有給我設定Root帳號密碼的地方, 直接創立一個使用者並且擁有sudo權限

sudo 切換成 root 後 更改密碼並關閉 sudo

閱讀全文 »

安裝Hexo

使用 Mac 環境安裝 Hexo
檢查 Node.js版本是否達建議 10.0 以上版本

1
$ node -v

###安裝 Hexo

1
$ npm install -g hexo-cli
閱讀全文 »

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment