liunx记录

ctr1+F1GUI切换到f1控制台
ctrl+alt+F1-6窗口切换
alt+f7---GUI切换
startx -- :0启动x-window
skill -9 pts/2杀死进程
SSHSecureShellClient
putty,securetCRT
konghao:
目录查看:ls -l -a  ll
进入某个目录:cd /etc
当前所在目录:pwd(path where dir)
文件和文件夹
    创建文件夹:mkdir test
    删除文件夹:rmdir test  或者rm -r test 或者rm -rf test
    创建文件:touch abc.txt
    写入内容:echo "hello world" >>abc.txt
    删除文件:rm abc.txt
    查看文件内容:cat abc.txt
    cp aaa.txt b.txt
    mv aaa.txt aaaa1.txt
    mv aaa.txt abc.txt
    分页查看:more abc.txt 空格下一页,回车下一行
    文件软连接(快捷方式):
    ln -s abc.txt link.txt
    ln abc.txt link2.txt
用户操作:useradd test
查看cd /home
    ll
查看密码:cat /etc/passwd
删除用户:userdel test
groupadd zcl;
useradd test1 -g zcl
cat /etc/group
chown zcl aaa.txt修改文件所有者
chgrp student aaa.txt 修改文件所属组
chown -r zcl aaa.txt 递归修改文件夹所有者
chgrp  -R test    递归修改文件夹所属组

cp -pr /test/test1 /test/test2 带权限负责
chmod u+x aaa.txt
chmod g-x aaa.txt
chmod o+w aaa.txt
chmod -R g+w /test/test1
passwd zhchl(修改用户密码)
whoami
su -  zhchl(切换b用户)
基于二进制权限管理
chmod 777 aaa.txt  
chmod 750 aaa.txt


你可能感兴趣的:(liunx记录)