本文共 419 字,大约阅读时间需要 1 分钟。
vim相关命令
1.将windows下文本拷贝到linux下,编译源文件有时会报错“-bash: ./db.py: /usr/bin/python^M: bad interpreter: No such file or directory”,这是因为windows和unix的编码方式不一致造成的,在linux下vim打开源文件,执行
:set ff查看文件格式(ff即fileformat)
然后执行:set ff=unix将文件的编码格式更改为unix的编码格式即可
:wq报错文件,重新编译
2.添加sudo命令:
安装sudo apt-get isntall sudo
然后将系统其他用户加到/etc/sudoers文件中开启非root用户的sudo权限,具体是vim /etc/sudoers,在““root ALL=(ALL) ALL”后添加"admin ALL=(ALL) ALL",admin为你的系统的非root用户名;
转载地址:http://fpztb.baihongyu.com/