hd 表示ide裝置(並口)
sd 表示scsi裝置
sata 串列埠
設定ip位址
[root@biaozhi ~]# nano /etc/sysconfig/network-scripts/ifcfg-eth0
device=eth0
//裝置名稱
onboot=yes
//開機啟動
bootproto=static
//靜態位址引導
ipaddr=192.168.6.80
//ip位址
netmask=255.255.255.0
//子網掩碼
gateway=192.168.6.1
//閘道器
dns1=222.222.222.222
//dns,網域名稱解析
[root@biaozhi ~]# service network restart
注意:如果網絡卡配置有問題,按照如下步驟處理
1>.centos6.x網絡卡配置時,需要刪除下面檔案:rm -rf /etc/udev/rules.d/70-persistent-net.rules
2>.重啟
reboot
3>.如果重啟服務報錯,那麼新增一塊與現有網絡卡相同型別的網絡卡即可!
4>.再次重新啟動服務
service network restart
init 0 關機
等號左邊大寫等號右邊小寫
if congig 檢視位址
nano /etc/sysconfig/network-scricpts/ifcfg-etch0
內部優先順序100 外部0 dmz 50
訪問:高-》低 nat
低-》高acl
nano /etc/selinux/config
當檔案沒有正常退出時,會產生臨時檔案造成二次開啟失敗。
selinux 必須重新啟動系統
以點開頭的檔案叫隱藏檔案、
rm 檔案路徑 產出檔案
init 6 重啟
service iptables stop 臨時關閉防火牆
service iptables status(狀態)檢視防火牆狀態
chkconfig iptables off 永久關閉防火期
echo "jing mao mao." > lshelp.txt 建立lshelp檔案
cat lshelp.txt 顯示
ls -l lshelp.txt
-rw-r--r--. 1 root root 14 3月 7 18:38 lshelp.txt顯示長檔案
ls -a
. anaconda-ks.cfg .bash_logout .bashrc install.log lshelp.txt .viminfo
.. .bash_history .bash_profile .cshrc install.log.syslog .tcshrc
顯示隱藏檔案
ls -lh lshelp.txt
-rw-r--r--. 1 root root 14 3月 7 18:38 lshelp.txt
顯示檔案大小
ls -ld /etc/
drwxr-xr-x. 107 root root 12288 3月 7 18:33 /etc/
顯示目錄屬性
help 命令 內部 help
man ls | col -b > lshelp.txt
[root@loc ~]# echo "ni si l ." > lshelp.txt
[root@loc ~]# cat lshelp.txt
ni si l .
替換echo "ni mei l ." >> lshelp.txt
[root@loc ~]# cat lshelp.txt
ni si l .
ni mei l .
新增cat -n /etc/sysconfig/network-scripts/ifcfg-eth012
3456
78910
1112
device=eth0
13type=ethernet
14#uuid=7e4f476a-1972-448c-984a-80049f51ef88
15onboot=yes
16#nm_controlled=yes
17bootproto=static
18ipaddr=172.16.1.86
19netmask=255.255.0.0
20gateway=172.16.0.1
21dns1=114.114.114.114
2223
24加n顯示序列號
head 顯示前十行
tail 顯示後十行
head -4 /etc/init.d | tail -1 第四行
學習總結筆記
children child children alloc init mama.ch child child 是指向並存放 children 物件的指標,ch是 mom類中定義的指向 children 類的指標,這句話是將 ch指向 children 的物件,方便 mama 與child傳參 pro...
linux學習筆記總結
for讀取列表中複雜值 for test in i don t konw if this ll work do shell會把列表中的單引號嘗試使用他們來一定乙個單獨的資料 兩種辦法解決 1 使用轉義字元 反斜線 來將單引號轉義 2 使用雙引號來定義用到的單引號 for test in i don ...
NSDate總結 學習筆記
nsdate是用作處理日期的類。1 建立初始化nsdate類的方法 1 當前日期 nsdate date nsdatedate 2 根據當前時間建立,正數是當前時間過多少秒後的時間,負數是當前時間前多少秒的時間 nsdate date1 nsdatedatewithtimeintervalsince...