关于Linux操做系统中的一些易忘记的命令与做用

1.改变文件或文件夹的权限,例如:chmod options mode file ;[ugoa...] [+-=] [rwxXstugo],其中字符的含义以下:linux

第一组[ugoa...]:文件(夹)权限分三组:u+g+o,u表明用户,g表明组,o表明其余用户,a表示以上全部,权限改变能够使用八进制或者或者符号模式;windows

第二组[+-=]:分别表示增长权限、移除权限、将权限设置成后面的值;ide

第三组[rwxXstugo]:rwx:读写执行。spa

          X:若是对象是目录或者它有执行权限,赋予执行权限。对象

          s:运行时从新设置UID或GID。ci

          t:保留文件或目录。get

          u:将权限设置为跟属主同样。it

          g:将权限设置为跟属组同样。io

          o:将权限设置为跟其余用户同样。class

如:chmod 760 newfile ;chmod o+r newfile;

2.没法使用sudo命令。提示xxx is not in the sudoers file. Thsi incident will be reported

解决方案:将用户添加到wheel组中,修改/etc/sudoers文件,步骤以下:

切换到root,使用以下命令,

$ usermod -G wheel username         将要使用sudo命令的用户名username添加到wheel

以后经过visudo命令在sudoers文件中对wheel用户组进行受权,分为须要密码和无需密码两种方式,取消掉任意一种受权前面的注释即可:

## Allow people in group wheel to run all commands
%wheel ALL=(ALL) ALL

## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
保存文件并退出,问题解决。

3.咱们每次打开linux下文件夹时都会新开一个窗体,如何设置成与window下模式同样的呢,设置以下:

勾选 Edit -> Preferences -> Behavior -> Always open in browser windows

而在Ubuntu中, 这个是默认勾选的, 从这个小细节能够看出, CentOS 确实不过重视桌面应用。

相关文章
相关标签/搜索