<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                **1.** # **sudo命令** “sudo”(super user do)命令允許授權用戶執行超級用戶或者其它用戶的命令。通過在sudoers列表的安全策略來指定。 ~~~ root@tecmint:~# sudo add-apt-repository ppa:tualatrix/ppa ~~~ 注意:sudo 允許用戶借用超級用戶的權限,然而"su"命令實際上是允許用戶以超級用戶登錄。所以sudo比su更安全。 并不建議使用sudo或者su來處理日常用途,因為它可能導致嚴重的錯誤如果你意外的做錯了事,這就是為什么在linux社區流行一句話: > “To err is human, but to really foul up everything, you need root password.” > “人非圣賢孰能無過,但是擁有root密碼就真的萬劫不復了。” * * * * * * * * * * **2.**# **mkdir命令** “mkdir”(Make directory)命令在命名路徑下創建新的目錄。然而如果目錄已經存在了,那么它就會返回一個錯誤信息"不能創建文件夾,文件夾已經存在了"("cannot create folder, folder already exists") ~~~ root@tecmint:~# mkdir tecmint ~~~ 注意:目錄只能在用戶擁有寫權限的目錄下才能創建。mkdir:不能創建目錄`tecmint`,因為文件已經存在了。(上面的輸出中不要被文件迷惑了,你應該記住我開頭所說的-在linux中,文件,文件夾,驅動,命令,腳本都視為文件) * * * * * * * * * * **3.**# **chown命令** “chown”命令就是改變文件擁有者和所在用戶組。每個文件都屬于一個用戶組和一個用戶。在你的目錄下,使用"ls -l",你就會看到像這樣的東西。 ~~~ root@tecmint:~# ls -l drwxr-xr-x 3 server root 4096 May 10 11:14 Binary drwxr-xr-x 2 server server 4096 May 13 09:42 Desktop ~~~ 在這里,目錄Binary屬于用戶"server",和用戶組"root",而目錄"Desktop"屬于用戶“server”和用戶組"server" “chown”命令用來改變文件的所有權,所以僅僅用來管理和提供文件的用戶和用戶組授權。 ~~~ root@tecmint:~# chown server:server Binary drwxr-xr-x 3 server server 4096 May 10 11:14 Binary drwxr-xr-x 2 server server 4096 May 13 09:42 Desktop ~~~ 注意:“chown”所給的文件改變用戶和組的所有權到新的擁有者或者已經存在的用戶或者用戶組。 * * * * * * * * * * **4.**# **apt命令** Debian系列以“apt”命令為基礎,“apt”代表了Advanced Package Tool。APT是一個為Debian系列系統(Ubuntu,Kubuntu等等)開發的高級包管理器,在Gnu/Linux系統上,它會為包自動地,智能地搜索,安裝,升級以及解決依賴。 ~~~ root@tecmint:~# apt-get install mplayer Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: java-wrappers Use 'apt-get autoremove' to remove it. The following extra packages will be installed: esound-common libaudiofile1 libesd0 libopenal-data libopenal1 libsvga1 libvdpau1 libxvidcore4 Suggested packages: pulseaudio-esound-compat libroar-compat2 nvidia-vdpau-driver vdpau-driver mplayer-doc netselect fping The following NEW packages will be installed: esound-common libaudiofile1 libesd0 libopenal-data libopenal1 libsvga1 libvdpau1 libxvidcore4 mplayer 0 upgraded, 9 newly installed, 0 to remove and 8 not upgraded. Need to get 3,567 kB of archives. After this operation, 7,772 kB of additional disk space will be used. Do you want to continue [Y/n]? y ~~~ ~~~ root@tecmint:~# apt-get update Hit http://ppa.launchpad.net raring Release.gpg Hit http://ppa.launchpad.net raring Release.gpg Hit http://ppa.launchpad.net raring Release.gpg Hit http://ppa.launchpad.net raring Release.gpg Get:1 http://security.ubuntu.com raring-security Release.gpg [933 B] Hit http://in.archive.ubuntu.com raring Release.gpg Hit http://ppa.launchpad.net raring Release.gpg Get:2 http://security.ubuntu.com raring-security Release [40.8 kB] Ign http://ppa.launchpad.net raring Release.gpg Get:3 http://in.archive.ubuntu.com raring-updates Release.gpg [933 B] Hit http://ppa.launchpad.net raring Release.gpg Hit http://in.archive.ubuntu.com raring-backports Release.gpg ~~~ 注意:上面的命令會導致系統整體的改變,所以需要root密碼(查看提示符為"#",而不是“$”).和yum命令相比,Apt更高級和智能。 見名知義,apt-cache用來搜索包中是否包含子包mplayer, apt-get用來安裝,升級所有的已安裝的包到最新版。 * * * * * * * * * * **5.**# **tar命令** “tar”命令是磁帶歸檔(Tape Archive),對創建一些文件的的歸檔和它們的解壓很有用。 ~~~ root@tecmint:~# tar -zxvf abc.tar.gz (記住'z'代表了.tar.gz) root@tecmint:~# tar -jxvf abc.tar.bz2 (記住'j'代表了.tar.bz2) root@tecmint:~# tar -cvf archieve.tar.gz(.bz2) /path/to/folder/abc ~~~ 注意: "tar.gz"代表了使用gzip歸檔,“bar.bz2”使用bzip壓縮的,它壓縮的更好但是也更慢。 * * * * * * * * * * **6.**# **cat命令** cat”代表了連結(Concatenation),連接兩個或者更多文本文件或者以標準輸出形式打印文件的內容。 ~~~ root@tecmint:~# cat a.txt b.txt c.txt d.txt abcd.txt root@tecmint:~# cat abcd.txt .... contents of file abcd ... ~~~ 注意:“>>”和“>”調用了追加符號。它們用來追加到文件里,而不是顯示在標準輸出上。“>”符號會刪除已存在的文件,然后創建一個新的文件。所以因為安全的原因,建議使用“>>”,它會寫入到文件中,而不是覆蓋或者刪除。 * * * * * * * * * * **7.**# **cd 命令** 經常使用的“cd”命令代表了改變目錄。它在終端中改變工作目錄來執行,復制,移動,讀,寫等等操作。 ~~~ root@tecmint:~# cd /home/user/Desktop server@localhost:~$ pwd /home/user/Desktop ~~~ 注意: 在終端中切換目錄時,cd就大顯身手了。“cd ~”會改變工作目錄為用戶的家目錄,而且當用戶發現自己在終端中迷失了路徑時,非常有用。“cd ..”從當前工作目錄切換到(當前工作目錄的)父目錄。 * * * * * * * * * * **8.**# **pwd 命令** pwd”(print working directory),在終端中顯示當前工作目錄的全路徑。 ~~~ root@tecmint:~# pwd /home/user/Desktop ~~~ 注意: 這個命令并不會在腳本中經常使用,但是對于新手,當從連接到nux很久后在終端中迷失了路徑,這絕對是救命稻草。 * * * * * * * * * * **9.**# **ls命令** ls命令是列出目錄內容(List Directory Contents)的意思。運行它就是列出文件夾里的內容,可能是文件也可能是文件夾。 ~~~ root@tecmint:~# ls Android-Games Music Pictures Public Desktop Tecmint.com Documents TecMint-Sync Downloads Templates ~~~ “ls -l”命令以詳情模式(long listing fashion)列出文件夾的內容。 ~~~ root@tecmint:~# ls -l total 40588 drwxrwxr-x 2 ravisaive ravisaive 4096 May 8 01:06 Android Games drwxr-xr-x 2 ravisaive ravisaive 4096 May 15 10:50 Desktop drwxr-xr-x 2 ravisaive ravisaive 4096 May 16 16:45 Documents drwxr-xr-x 6 ravisaive ravisaive 4096 May 16 14:34 Downloads drwxr-xr-x 2 ravisaive ravisaive 4096 Apr 30 20:50 Music drwxr-xr-x 2 ravisaive ravisaive 4096 May 9 17:54 Pictures drwxrwxr-x 5 ravisaive ravisaive 4096 May 3 18:44 Tecmint.com drwxr-xr-x 2 ravisaive ravisaive 4096 Apr 30 20:50 Templates ~~~ "ls -a"命令會列出文件夾里的所有內容,包括以"."開頭的隱藏文件。 ~~~ root@tecmint:~# ls -a . .gnupg .dbus .goutputstream-PI5VVW .mission-control .adobe deja-dup .grsync .mozilla .themes .gstreamer-0.10 .mtpaint .thumbnails .gtk-bookmarks .thunderbird .HotShots .mysql_history .htaccess .apport-ignore.xml .ICEauthority .profile .bash_history .icons .bash_logout .fbmessenger .jedit .pulse .bashrc .liferea_1.8 .pulse-cookie .Xauthority .gconf .local .Xauthority.HGHVWW .cache .gftp .macromedia .remmina .cinnamon .gimp-2.8 .ssh .xsession-errors .compiz .gnome teamviewer_linux.deb .xsession-errors.old .config .gnome2 .zoncolor ~~~ 注意:在Linux中,文件以“.”開頭的就是隱藏文件,并且每個文件,文件夾,設備或者命令都是以文件對待。ls -l 命令輸出: 1.d (代表了是目錄). 2.rwxr-xr-x 是文件或者目錄對所屬用戶,同一組用戶和其它用戶的權限。 3.上面例子中第一個ravisaive 代表了文件文件屬于用戶ravisaive 4.上面例子中的第二個ravisaive代表了文件文件屬于用戶組ravisaive 5.4096 代表了文件大小為4096字節. 6.May 8 01:06 代表了文件最后一次修改的日期和時間. 7.最后面的就是文件/文件夾的名字 * * * * * * * * * * **10.**# **uname命令** "uname"命令就是Unix Name的簡寫。顯示機器名,操作系統和內核的詳細信息。 ~~~ root@tecmint:~# uname -a Linux tecmint 3.8.0-19-generic #30-Ubuntu SMP Wed May 1 16:36:13 UTC 2013 i686 i686 i686 GNU/Linux ~~~ 注意: uname顯示內核類別, uname -a顯示詳細信息。上面的輸出詳細說明了uname -a 1. “Linux“: 機器的內核名 2.“tecmint“: 機器的節點名 3.“3.8.0-19-generic“: 內核發布版本 4.“#30-Ubuntu SMP“: 內核版本 5.“i686“: 處理器架構 6.“GNU/Linux“: 操作系統名 * * * * * * * * * * **上面的內容來自oschina的66號公路, 趙亮-碧海情天同學,再次感謝他們**
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看