1. vi编辑: #sh>vi filename 2. 查看文件格式 :set ff 或 :set fileformat 能够看到以下信息 fileformat=dos 或 fileformat=unix 3. 修改文件格式 :set ff=unix 或 :set fileformat=unix :wq (存盘退出)