close

Linux 有分大小寫,instruction是英文簡寫

Enter commands at the command prompt:

#指令       -->解釋

1. 
#ls          -->list  列出有哪些  file

2.
#pwd      -->目前所在路徑
[root@localhost ~]#pwd    -->顯示root的家
/root

3.
#cd /    -->(change directory改變路徑)  
                cd
到最上層的家

4.
#pwd
/            -->根據第3個步驟 cd  " / " 
       所以 pwd指令顯示目前所在
       路徑就是
 /

5.
#ls --a   -->把隱藏性資料顯示出來
             ex: .bash_history

#ls -l -a
#ls --help  -->去查ls功能
#ls --all

6.
#set  -->環境的架設

7.
#cd /bin    #ls          -->可以看到ls instruction

8.
#which ls          -->找出  instruction  所對應到的檔案    
/bin/ls

9.
#set
可以顯示其中的許多設定,
其中有一項

               ps1='[\u@\h \w]\$ '
對應到             [root@localhost ~]
u=root
h=localhost
w=~            -->w是每個帳號的家

10.
[root@localhost ~]#pwd
/root           -->root的帳號的家在 /root
[root@localhost ~]#cd /         -->cd "/"
[root@localhost /]#pwd         -->localhost後面
/                        變成了
"/"

11.
[root@localhost ~]#ps1='[\u@\h \w]\$ '
[root@localhost ~]#ps1='[\u@Niki \w]\$ '
[root@Niki ~]#ps1='[\u@\t\w]\$'
[root@11:15:12]#

12.
#x=3
#echo x
x
#echo $x
3
#echo $ps1
[\u@\h \w]\$











arrow
arrow
    文章標籤
    Shell
    全站熱搜

    布拉怡 發表在 痞客邦 留言(0) 人氣()