中文字幕亚洲第一精品|精品国产免费一区二区|久久婷婷五月六月综合版|中文字幕熟妇久久久人妻|久久综合精品国产一区无码|国产成人精品永久免费视频|午夜亚洲国产精品理论片a级|久久精品一区二区三区无码护土

 訪問手機(jī)版  

Linux常用命令|Linux培訓(xùn)學(xué)習(xí)|考試認(rèn)證|工資待遇與招聘,認(rèn)準(zhǔn)超級(jí)網(wǎng)工!

招聘|合作 登陸|注冊(cè)

網(wǎng)絡(luò)工程師培訓(xùn)

當(dāng)前位置:網(wǎng)絡(luò)工程師 > 技術(shù)課程 > linux > 熱點(diǎn)關(guān)注 > linux常用命令

linux 常用命令及實(shí)例

時(shí)間:2019-10-28

linux命令windows命令_linux壓縮命令zip命令_linux常用命令

在linux中,絕大多數(shù)命令都參照命令 選項(xiàng) 參數(shù)

選項(xiàng):適用于調(diào)整命令的功能的

參數(shù):指的是命令的操作對(duì)象linux常用命令,如果省略參數(shù)linux常用命令,是由于有默認(rèn)參數(shù)的

ls 顯示目錄下的內(nèi)容

# ls 
[root@localhost ~]# ls
anaconda-ks.cfg  install.log  install.log.syslog
# ls --color=never  不顯示顏色的顯示目錄下的文件名
[root@localhost ~]# ls --color=never
anaconda-ks.cfg  install.log  install.log.syslog
# ls -a 顯示所有文件(包含隱藏文件)
[root@localhost ~]# ls -a
.  ..  anaconda-ks.cfg  .bash_logout  .bash_profile  .bashrc  .cshrc  install.log  install.log.syslog  .pki  .tcshrc
# ls -l 以長格式顯示文件
[root@localhost ~]# ls -l
總用量 16
-rw-------. 1 root root 1098 6月   8 19:38 anaconda-ks.cfg
-rw-r--r--. 1 root root 8025 6月   8 19:38 install.log
-rw-r--r--. 1 root root 3384 6月   8 19:38 install.log.syslog
# ls -d 只顯示目錄
[root@localhost ~]# ls -l
總用量 16
-rw-------. 1 root root 1098 6月   8 19:38 anaconda-ks.cfg
-rw-r--r--. 1 root root 8025 6月   8 19:38 install.log
-rw-r--r--. 1 root root 3384 6月   8 19:38 install.log.syslog
# ls -i 查看inode節(jié)點(diǎn)號(hào)
[root@localhost ~]# ls -i
260965 anaconda-ks.cfg  260611 install.log  260612 install.log.syslog

cd 切換所在目錄

# cd
[root@localhost ~]# cd /tmp/
[root@localhost tmp]# 
# 進(jìn)入相對(duì)路徑
[root@localhost /]# cd /tmp/
[root@localhost tmp]# cd ../etc/yum.repos.d/
# 進(jìn)入絕對(duì)路徑
[root@localhost yum.repos.d]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ll
總用量 36
drwxr-xr-x. 2 root root 4096 6月   8 19:58 backup
-rw-r--r--. 1 root root 1991 3月  28 2017 CentOS-Base.repo
-rw-r--r--. 1 root root  647 3月  28 2017 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root  289 3月  28 2017 CentOS-fasttrack.repo
-rw-r--r--. 1 root root  630 3月  28 2017 CentOS-Media.repo
-rw-r--r--. 1 root root 7989 3月  28 2017 CentOS-Vault.repo
-rw-r--r--. 1 root root  957 11月  5 2012 epel.repo
-rw-r--r--. 1 root root 1056 11月  5 2012 epel-testing.repo
# cd -  返回上次所在目錄
[root@localhost yum.repos.d]# pwd
/etc/yum.repos.d
[root@localhost yum.repos.d]# cd /
[root@localhost /]# cd -
/etc/yum.repos.d
[root@localhost yum.repos.d]# 
# cd ~  進(jìn)入當(dāng)前用戶的家目錄
[root@localhost yum.repos.d]# cd ~
[root@localhost ~]# 
# cd .. 進(jìn)入上一級(jí)目錄
[root@localhost ~]# cd /tmp/
[root@localhost tmp]# pwd
/tmp
[root@localhost tmp]# cd ..
[root@localhost /]# pwd
/