Linux下的各種小技巧

來源:互聯網
上載者:User

標籤:小技巧   linux   檔案夾   

啟動xwindow介面   

#startx

啟動第二個xwindow介面   

#startx  --  :1     #啟動第三個介面使用:2依此類推!

 

查看並斷開某個終端

#w

#skill  -9   pts/2(這是終端名)

 

殺掉某個使用者的所有進程

#skill  [-9]  使用者名稱

#pkill  [-9]  -u  使用者名稱

 

查看某命令/程式的所有進程號

#pgrep   命令名

 

tips

修改Linux下ls命令顯示的檔案夾名以及檔案名稱的預設顏色:

#修改/etc/DIR_COLORS檔案

650) this.width=650;" style="background-image: none; border-right- 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://img1.51cto.com/attachment/201407/21/7628670_140591002282GG.png" width="244" height="41" />

 

在圖形介面控制遠端任意一台機器

2#xinit;xhost+

1#export  DISPLAY=“x.x.x.x:x”   (IP  :  port-----主機2的IP,port為xwindow的編號,指第幾個xwindow)

1#startkde或者啟動gnome

 

關掉系統電源的命令

#halt  -pf

 

讓修改過的inittab檔案立刻生效,不用重啟系統

#init  q

 

硬碟對拷

#dd if=/dev/sda  of=/dev/sdb  bs=1024  [count=XXX]

 

開機自動載入模組

#grep  modprobe  /etc/rc.d/rc.sysinit

#modprobe  -C  會自動讀取/etc/modprobe.conf  並載入其中的模組。

 

PAM機制

 

Xwindow

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.