# Day 21: Informix(2)
## 環境設定
### 查詢自己帳號預設的登入 shell 設定
對於 Informix DB 而言,是`ksh`
- 顯示目前正在執行的 shell 名稱
```shell
echo $0
```
- 終端介面**輸入**:
- 環境為 `ksh`
- 我常用的(紅框已框):

- 游標移到最後: shift + $
- click `R` then **取代**游標上的字 by 新的字
- click `A` then 在游標後**append**字
- click `I` : **insert mode**
- More information:
- [每個開發者都應該要會用的編輯器–Vim](https://medium.com/@jinghua.shih/%E6%AF%8F%E5%80%8B%E9%96%8B%E7%99%BC%E8%80%85%E9%83%BD%E6%87%89%E8%A9%B2%E8%A6%81%E6%9C%83%E7%94%A8%E7%9A%84%E7%B7%A8%E8%BC%AF%E5%99%A8-vim-5f83349973a3)
- [Vim Cheat Sheet](https://vim.rtorr.com/)
- [Vim Editor Modes Explained](https://www.freecodecamp.org/news/vim-editor-modes-explained/)
### .profile
- (A) [.profile file](https://www.ibm.com/docs/en/aix/7.2?topic=files-profile-file)
- (B) [Automate startup and shutdown on UNIX](https://www.ibm.com/docs/en/informix-servers/14.10?topic=configuration-automate-startup-shutdown-unix)
- **environment variable**
- INFORMIXDIR
> the full path name of the directory in which **the database server is installed**
- INFORMIXSERVER
> the sysmaster database can be updated (or created, if necessary)
[The sysmaster Database](https://www.ibm.com/docs/en/informix-servers/12.10?topic=database-sysmaster)
- INFORMIXSQLHOSTS
> If you store the information in another location, you must set the INFORMIXSQLHOSTS environment variable.
[The sqlhosts file and the SQLHOSTS registry key](https://www.ibm.com/docs/en/informix-servers/12.10?topic=files-sqlhosts-file-sqlhosts-registry-key)
- (A+B) What's in `.profile`?
```shell
export INFORMIXDIR=/usr/ifx_instance/informix_X
export INFORMIXSQLHOSTS=$INFORMIXDIR/etc/sqlhost_X
export INFORMIXSERVER=[主機]
```