linux這些都不會如何能夠優雅而害羞的對妹子說:“起開,讓老子來!”(linux之日常之帶你裝逼帶你飛篇(初))

來源:互聯網
上載者:User

標籤:

 

1.shutdown
常用命令:
(1) shutdown -h 1 --一分鐘關機
(2) shutdown -h now --現在關機
(3) shutdown -h 15:30 --定在某一個時間關機
細節: shutdown -r 2 --系統在兩分鐘啟動

2.poweroff命令:
poweroff ---立即關閉電源
3. halt --- 掛起系統
4. reboot ------重新啟動系統

5.***--- init命令 ----***
init [0-停機,1-單一使用者模式,2-多使用者模式]
[3-完全多使用者模式,4-未分配使用,5-圖形介面,6-重新啟動]
當我們忘掉了root命令時,將系統切換至單一使用者模式,
然後重新設定root使用者密碼。

6. 尋找一個我們安裝好的軟體。
rpm -aq | grep gcc --查詢我們是否已經安裝好了gcc軟體
rpm -aq --列出所有已經安裝好的軟體
加上一個通道,來進一步約束查詢條件。

7. 對於一個小問題:
如何將一個內容,編輯到檔案中儲存。
比如 netstate -an >>Gxjun.txt 使用 >> 為追加而使用 > 為覆蓋

8. 對於< 和 << 這兩種操作,也是存在與同上差不多的區別、

9. cd的用法:
(1) : cd /home ---絕對路徑
(2) : cd ../etc ---相對路徑

10: ~ 表示目前使用者的家目錄,因此
[[email protected] etc]# cd ~ --回到家目錄
11. ls --查看檔案清單命令
pwd 查看當前所在目錄
12. touch 建立一個空檔案
touch [option/路徑] filename
touch Gxjun --建立一個名為Gxjun的檔案。
-----------------------修改時間戳記-----------------------------
sh-4.1# touch -d "10/12/10 21:20" gxjun
sh-4.1# ls -l gxjun
-rw-r--r--. 1 root root 0 Oct 12 2010 gxjun

13. mkdir ---建立一個目錄
14. mv res dec ---移動一個檔案
15. 查看檔案類型 file filename
sh-4.1# file gxjun
gxjun: empty
16: 當我們想看一個檔案的內容時,一般有兩種方法。
方法一: vi gxijun.txt 運用vi開啟,然後查看。
方法二: cat gxjun.txt 直接顯示在黑白面板上。
17. tail命令的作用在於從文本最後一行開始查看文本。

[[email protected] ~]# tail -2 Gxjun.txt ---查看Gxjun.txt最後兩行的內容
unix 3 [ ] DGRAM 9115
unix 3 [ ] DGRAM 9114

18. more 命令 經常習慣性的用於查看長檔案。
[[email protected] ~]# more Gxjun.txt
與此同時: less

19. wc --文本統計命令【行數,詞數,位元組數,及檔案名稱】
20. 關於時間的一些基本命令
(1).[[email protected] ~]# date +"%F %T"
2015-03-15 10:49:09
(2).[[email protected] ~]# cal
March 2015
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
(3).
注意: cal命令查看指定的年月 比如查看2009年2月的日曆
[[email protected] ~]# cal 2 2009
February 2009
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
21.需要注意的是:
Linux有兩個時鐘,第一個時鐘為系統內建的系統。第二種為硬體系統。
22.who ---查看當前系統中的使用者
[[email protected] ~]# who
root tty1 2015-03-06 09:25
root pts/0 2015-03-15 10:26 (192.168.0.112)
23. finger --命令查看登入到系統的使用者及相關資訊、
24. w ---查看正在使用系統的使用者。
[[email protected] ~]# w
10:59:19 up 9 days, 34 min, 2 users, load average: 0.00, 0.00, 0.00
USER TTY FROM [email protected] IDLE JCPU PCPU WHAT
root tty1 - 06Mar15 12:57m 0.13s 0.03s bash
root pts/0 192.168.0.112 10:26 0.00s 0.24s 0.04s w
25. wall ---向所有線上的使用者發送公告。

[[email protected] ~]# wall hello world!!
wall hello worldclear

Broadcast message from [email protected] (pts/0) (Sun Mar 15 11:02:09 2015):

hello worldclear
26. write ---向其他使用者【包括root】發送訊息。 【Ctrl+C ---退出即使訊息模式】
27. mesg [n/y] ---該命令為拒絕接受訊息或者接受訊息。
28. fuser --斷開聯絡使用者命令fuser

 

linux這些都不會如何能夠優雅而害羞的對妹子說:“起開,讓老子來!”(linux之日常之帶你裝逼帶你飛篇(初))

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.