【Linux基础】 基本命令

基本命令

$>ls     			            #当前目录
$>ls -l    		            	#列表显示
$>ls --help  		            #帮助
$>ls -a -l -h					#查看当前目录 -h:人性化 -l:列表 -a:显示开头

$>clear						    #清屏

$>cd /home						#切换目录
$>cd .							#进入当前目录
$>cd ..							#进入上级目录
$>pwd							#显示当前目录

$>whoami						#显示当前用户
$>su root						#切换用户,输入密码
$>passwd						#修改当前用户密码
$>ifconfig						#查看ip地址
/*启动桌面板的网卡:on*/

$>su centos
 >cd /home/centos				#回到主目录
 >cd ~							#回到主目录
 >cd -							#后退,返回之前的目录(上次的)

$>ll							#别名,ls -l --autocolor
$>alias							#查看所有的别名

$>mkdir ~/Downloads/a			#创建目录
$>touch ~/Downloads/a/1.txt		#创建文件
$>echo hello word > 1.txt		#重定向输出  > >>添加,追加
$>cat 1.txt						#查看文件 type 1.txt

猜你喜欢

转载自blog.csdn.net/qq_40298670/article/details/89508747