Linux基础操作(第一章)

实验-切换台

ctrl+alt+F2
alt+F1

实验-查看帮助

(1.)man
(2.)help
(3.)百度
(4.)vim /usr/share/doc  #帮助文档
man date
pinfo date
ping -h
ping --help
date+%F
date+%D

实验-基础命令

pwd          #当前目录
cd /root     #进入root家目录
cd -         #返回上一次的目录
cd ~         #返回家目录
ls -l ==ll   #列出
ls -l /
ls -a        #列出(包括隐藏文件)
ls /tec/
ll -d /home
ll -h /home
ll /etc/*.conf  #查看/etc下以.conf结尾的文件,*表示多个
ll /etc/r??     #查看以r开头的两位的,?表示一位
touch 1         #创建文件
touch 1 2 3
touch {1..99}   #一次创建多个文件
touch {1,2,3}{a,b,c}
touch .2        #创建隐藏文件
mkdir /123       #创建目录
mkdir -p /1/2/3/4/5/6  #级联创建目录
cat /etc/passwd        #查看
cp /etc/passwd /han    #复制
cp file1 file2 file3 /home  #一次复制多个
cp /etc/pssswd ./
cp -r 123/ /tec        
mv 123/ /tmp          #移动或重命名
rm file1              #删除
rm -f file*
rm -rf 123/

猜你喜欢

转载自blog.csdn.net/hankunfa/article/details/80459875