1、將/etc/DIR_COLORS文件cp到~/下,并改名為.dir_colors。

網(wǎng)站建設(shè)哪家好,找成都創(chuàng)新互聯(lián)!專注于網(wǎng)頁設(shè)計、網(wǎng)站建設(shè)、微信開發(fā)、微信小程序定制開發(fā)、集團(tuán)企業(yè)網(wǎng)站建設(shè)等服務(wù)項目。為回饋新老客戶創(chuàng)新互聯(lián)還提供了冊亨免費(fèi)建站歡迎大家使用!
2、編輯.dir_colors文件,找到“DIR 01;34 # directory”,將34改為36。
你可以找到文件的兩行注釋:
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
按照顏色對應(yīng)的數(shù)字,你還可以把目錄顯示顏色改成其他的。
同樣其他的顯示效果(包括背景)也可以參照說明進(jìn)行修改。
這樣你就可以定制自己的linux下命令行方式下的個性化顯示效果了。
3、重新登錄,就可以看到修改后的效果了。
Linux下修改root密碼方法以root身份登陸,執(zhí)行:
passwd
用戶名
然后根據(jù)提示,輸入新密碼,再次輸入新密碼,系統(tǒng)會提示成功修改密碼。
找回root的密碼
(一)Linux
系統(tǒng)密碼破解在grub選項菜單按e進(jìn)入編輯模式編輯kernel那行
/init
1
(或/single)按B重啟進(jìn)入后執(zhí)行下列命令root@#passwd
root
(配置root的密碼)
Enter
new
unix
password:輸入新的密碼
root@#init
6
(二)Debian
linux
系統(tǒng)密碼破解在grub選項菜單’Debian
GNU/Linux,…(recovery
mode)’,按e進(jìn)入編輯模式編輯kernel那行面的
ro
single
改成
rw
single
init=/bin/bash,按b執(zhí)行重啟進(jìn)入后執(zhí)行下列命令
root@(none)#mount
-a
root@(none)#passwd
root
root@(none)#reboot
(三)FreeBSD
系統(tǒng)密碼破解開機(jī)進(jìn)入引導(dǎo)菜單選擇每項(按4)進(jìn)入單用戶模式進(jìn)入之后輸入一列命令
root@#mount
-a
root@#fsck
-y
root@#passwd(修改密碼命令)
root@#root(要破解密碼的用戶名)
Enter
new
unix
password:
root@#init
6
(重啟)
(四)Solaris
系統(tǒng)密碼破解
bitscn.com在grub選項菜中選擇solaris
failasfe
項系統(tǒng)提示Do
you
wish
to
have
it
mounted
read-write
on
/a
?[y,n,?]
選擇y就進(jìn)入單用戶模式輸入下列命令
#passwd
#New
passwd:輸入新的密碼
#Re-enter
New
passwd:在次輸入新的密碼
#init
6
(重啟)
bitscn.com
(五)NetBsd
系統(tǒng)密碼破解1.開機(jī):當(dāng)出現(xiàn)提示符號并開始倒數(shù)五秒時,
鍵入以下指令:
boot
-s
(進(jìn)入單用戶模式命令)
2.在以下的提示符號中
Enter
pathname
of
shell
or
RETURN
for
sh:
按下Enter.3.鍵入以下指令:
#
mount
-a
#
fsck
-y
4.使用
passwd
更改
root
的密碼.
5.使用
exit
指令進(jìn)入多人模式.
Linux提供了大量的命令,利用它可以有效地完成大量的工作,如磁盤操作、文件存取、目
錄操作、進(jìn)程管理、文件權(quán)限設(shè)定等。所以,在Linux系統(tǒng)上工作離不開使用系統(tǒng)提供的命
令。要想真正理解Linux系統(tǒng),就必須從Linux命令學(xué)起,通過基礎(chǔ)的命令學(xué)習(xí)可以進(jìn)一步理
解Linux系統(tǒng)。
不同Linux發(fā)行版的命令數(shù)量不一樣,但Linux發(fā)行版本最少的命令也有200多個。這里筆者
把比較重要和使用頻率最多的命令,按照它們在系統(tǒng)中的作用分成下面六個部分一一介紹。
◆ 安裝和登錄命令:login、shutdown、halt、reboot、install、mount、umount、chsh、
exit、last;
◆ 文件處理命令:file、mkdir、grep、dd、find、mv、ls、diff、cat、ln;
◆ 系統(tǒng)管理相關(guān)命令:df、top、free、quota、at、lp、adduser、groupadd、kill、
crontab;
◆ 網(wǎng)絡(luò)操作命令:ifconfig、ip、ping、netstat、telnet、ftp、route、rlogin、rcp、
finger、mail、 nslookup;
◆ 系統(tǒng)安全相關(guān)命令:passwd、su、umask、chgrp、chmod、chown、chattr、sudo ps、
who;
◆ 其它命令:tar、unzip、gunzip、unarj、mtools、man、unendcode、uudecode。
本文以Mandrake Linux 9.1(Kenrel 2.4.21)為例,介紹Linux下的安裝和登錄命令。
login
1.作用
login的作用是登錄系統(tǒng),它的使用權(quán)限是所有用戶。
2.格式
login [name][-p ][-h(huán) 主機(jī)名稱]
3.主要參數(shù)
-p:通知login保持現(xiàn)在的環(huán)境參數(shù)。
-h(huán):用來向遠(yuǎn)程登錄的之間傳輸用戶名。
如果選擇用命令行模式登錄Linux的話,那么看到的第一個Linux命令就是login:。
一般界面是這樣的:
Manddrake Linux release 9.1(Bamboo) for i586
kennel 2.4.21-0.13mdk on i686 / tty1
localhost login:root
password:
上面代碼中,第一行是Linux發(fā)行版本號,第二行是內(nèi)核版本號和登錄的虛擬控制臺,我們
在第三行輸入登錄名,按“Enter”鍵在Password后輸入賬戶密碼,即可登錄系統(tǒng)。出于安
全考慮,輸入賬戶密碼時字符不會在屏幕上回顯,光標(biāo)也不移動。
登錄后會看到下面這個界面(以超級用戶為例):
[root@localhost root]#
last login:Tue ,Nov 18 10:00:55 on vc/1
上面顯示的是登錄星期、月、日、時間和使用的虛擬控制臺。
4.應(yīng)用技巧
Linux是一個真正的多用戶操作系統(tǒng),可以同時接受多個用戶登錄,還允許一個用戶進(jìn)行多
次登錄。這是因為Linux和許多版本的Unix一樣,提供了虛擬控制臺的訪問方式,允許用戶
在同一時間從控制臺(系統(tǒng)的控制臺是與系統(tǒng)直接相連的監(jiān)視器和鍵盤)進(jìn)行多次登錄。每
個虛擬控制臺可以看作是一個獨(dú)立的工作站,工作臺之間可以切換。虛擬控制臺的切換可以
通過按下Alt鍵和一個功能鍵來實現(xiàn),通常使用F1-F6 。
例如,用戶登錄后,按一下“Alt F2”鍵,用戶就可以看到上面出現(xiàn)的“l(fā)ogin:”提示符,
說明用戶看到了第二個虛擬控制臺。然后只需按“Alt F1”鍵,就可以回到第一個虛擬控
制臺。一個新安裝的Linux系統(tǒng)允許用戶使用“Alt F1”到“Alt F6”鍵來訪問前六個虛擬
控制臺。虛擬控制臺最有用的是,當(dāng)一個程序出錯造成系統(tǒng)死鎖時,可以切換到其它虛擬控
制臺工作,關(guān)閉這個程序。
shutdown
1.作用
shutdown命令的作用是關(guān)閉計算機(jī),它的使用權(quán)限是超級用戶。
2.格式
shutdown [-h(huán)][-i][-k][-m][-t]
3.重要參數(shù)
-t:在改變到其它運(yùn)行級別之前,告訴init程序多久以后關(guān)機(jī)。
-k:并不真正關(guān)機(jī),只是送警告信號給每位登錄者。
-h(huán):關(guān)機(jī)后關(guān)閉電源。
-c:cancel current process取消目前正在執(zhí)行的關(guān)機(jī)程序。所以這個選項當(dāng)然沒有時間
參數(shù),但是可以輸入一個用來解釋的訊息,而這信息將會送到每位使用者。
-F:在重啟計算機(jī)時強(qiáng)迫fsck。
-time:設(shè)定關(guān)機(jī)前的時間。
-m: 將系統(tǒng)改為單用戶模式。
-i:關(guān)機(jī)時顯示系統(tǒng)信息。
4.命令說明
shutdown命令可以安全地將系統(tǒng)關(guān)機(jī)。有些用戶會使用直接斷掉電源的方式來關(guān)閉Linux系
統(tǒng),這是十分危險的。因為Linux與Windows不同,其后臺運(yùn)行著許多進(jìn)程,所以強(qiáng)制關(guān)機(jī)可
能會導(dǎo)致進(jìn)程的數(shù)據(jù)丟失,使系統(tǒng)處于不穩(wěn)定的狀態(tài),甚至在有的系統(tǒng)中會損壞硬件設(shè)備(
硬盤)。在系統(tǒng)關(guān)機(jī)前使用 shutdown命令,系統(tǒng)管理員會通知所有登錄的用戶系統(tǒng)將要關(guān)
閉,并且login指令會被凍結(jié),即新的用戶不能再登錄。
5.舉例
shutdown -h 3:40
說明 3:40開始關(guān)機(jī)。
halt
1.作用
halt命令的作用是關(guān)閉系統(tǒng),它的使用權(quán)限是超級用戶。
2.格式
halt [-n] [-w] [-d] [-f] [-i] [-p]
3.主要參數(shù)說明
-n:防止sync系統(tǒng)調(diào)用,它用在用fsck修補(bǔ)根分區(qū)之后,以阻止內(nèi)核用老版本的超級塊覆
蓋修補(bǔ)過的超級塊。
-w:并不是真正的重啟或關(guān)機(jī),只是寫wtmp(/var/log/wtmp)紀(jì)錄。
-f:沒有調(diào)用shutdown,而強(qiáng)制關(guān)機(jī)或重啟。
-i:關(guān)機(jī)(或重啟)前,關(guān)掉所有的網(wǎng)絡(luò)接口。
-f:強(qiáng)迫關(guān)機(jī),不呼叫shutdown這個指令。
-p: 當(dāng)關(guān)機(jī)的時候順便做關(guān)閉電源的動作。
-d:關(guān)閉系統(tǒng),但不留下紀(jì)錄。
4.命令說明
halt就是調(diào)用shutdown -h(huán)。halt執(zhí)行時,殺死應(yīng)用進(jìn)程,執(zhí)行sync(將存于buffer中的資
料強(qiáng)制寫入硬盤中)系統(tǒng)調(diào)用,文件系統(tǒng)寫操作完成后就會停止內(nèi)核。若系統(tǒng)的運(yùn)行級別為
0或6,則關(guān)閉系統(tǒng);否則以shutdown指令(加上-h(huán)參數(shù))來取代。
reboot
1.作用
reboot命令的作用是重新啟動計算機(jī),它的使用權(quán)限是系統(tǒng)管理者。
2.格式
reboot [-n] [-w] [-d] [-f] [-i]
3.主要參數(shù)
-n: 在重開機(jī)前不做將記憶體資料寫回硬盤的動作。
-w: 并不會真的重開機(jī),只是把記錄寫到/var/log/wtmp文件里。
-d: 不把記錄寫到/var/log/wtmp文件里(-n這個參數(shù)包含了-d)。
-i: 在重開機(jī)之前先把所有與網(wǎng)絡(luò)相關(guān)的裝置停止。
install
1.作用
install命令的作用是安裝或升級軟件或備份數(shù)據(jù),它的使用權(quán)限是所有用戶。
2.格式
(1)install [選項]... 來源 目的地
(2)install [選項]... 來源... 目錄
(3)install -d [選項]... 目錄...
在前兩種格式中,會將
如何使用Linux命令
dhclient
The
Internet Systems Consortium DHCP Client, dhclient, provides a means for
configuring one or more network interfaces using the Dynamic Host Configuration
Protocol, BOOTP protocol, or if these protocols fail, by statically assigning an
address.
linux
dhclient 的語法
dhclient
[ -p port ] [ -d ] [ -e VAR=value ] [ -q ] [ -1 ] [ -r ] [ -lf lease-file ] [
-pf pid-file ] [ -cf config-file ] [ -sf script-file ] [ -e ENVVAR=value ] [ -s
server ] [ -g relay ] [ -n ] [ -nw ] [ -w ] [ if0 [ ...ifN ] ]
-p port
If the DHCP client should listen and transmit on a port other
than the standard (port 68), the -p flag may used. It should be followed by the
udp port number that dhclient should use. This is mostly useful for debugging
purposes. If a different port is specified for the client to listen on and
transmit on, the client will also use a different destination port - one greater
than the specified destination port.
-s
The DHCP client normally transmits any protocol messages it sends
before acquiring an IP address to, 255.255.255.255, the IP limited broadcast
address. For debugging purposes, it may be useful to have the server transmit
these messages to some other address. This can be specified with the -s flag,
followed by the IP address or domain name of the destination.
-g
For testing purposes, the giaddr field of all packets that the
client sends can be set using the -g flag, followed by the IP address to send.
This is only useful for testing, and should not be expected to work in any
consistent or useful way.
-d
The DHCP client will normally run in the foreground until it has
configured an interface, and then will revert to running in the background. To
run force dhclient to always run as a foreground process, the -d flag should be
specified. This is useful when running the client under a debugger, or when
running it out of inittab on System V systems.
-e
The dhclient daemon creates its own environment when executing
the dhclient-script to do the grunt work of interface configuration. To define
extra environment variables and their values, use the -e flag, followed by the
environment variable name and value assignment, just as one would assign a
variable in a shell. Eg: -e IF_METRIC=1
-r
The client normally doesn't release the current lease as it is
not required by the DHCP protocol. Some cable ISPs require their clients to
notify the server if they wish to release an assigned IP address. The -r flag
explicitly releases the current lease, and once the lease has been released, the
client exits.
-1
The -1 flag cause dhclient to try once to get a lease. If it
fails, dhclient exits with exit code two.
-cf, -lf, -pf, and -sf
The DHCP client normally gets its configuration information from
/etc/dhcp3/dhclient.conf, its lease database from
/var/lib/dhcp3/dhclient.leases, stores its process ID in a file called
/var/run/dhclient.pid, and configures the network interface using
/sbin/dhclient-script To specify different names and/or locations for these
files, use the -cf, -lf, -pf and -sf flags, respectively, followed by the name
of the file. This can be particularly useful if, for example, /var/lib/dhcp3 or
/var/run has not yet been mounted when the DHCP client is started.
-w
The DHCP client normally exits if it isn't able to identify any
network interfaces to configure. On laptop computers and other computers with
hot-swappable I/O buses, it is possible that a broadcast interface may be added
after system startup. The -w flag can be used to cause the client not to exit
when it doesn't find any such interfaces. The omshell (1) program can then be
used to notify the client when a network interface has been added or removed, so
that the client can attempt to configure an IP address on that
interface.
-n
The DHCP client can be directed not to attempt to configure any
interfaces using the -n flag. This is most likely to be useful in combination
with the -w flag.
-nw
The client can also be instructed to become a daemon immediately,
rather than waiting until it has acquired an IP address. This can be done by
supplying the -nw flag.
-e
The client runs child processes (scripts) with a clean
environment. Use the -e flag to specify additional environment variables to pass
to child processes.
linux
dhclient 的演示示例:
dhclient
eth0
Renews
the IP address.
Linux
renew ip command
$
sudo dhclient -r //release ip 釋放IP
$
sudo dhclient //獲取IP
可以找個支持這種文件系統(tǒng)的機(jī)器把硬盤掛上,chroot過去改密碼
Linux 系統(tǒng)密碼破解
1.在grub選項菜單按E進(jìn)入編輯模式
2.編輯kernel那行 /init 1 (或/single)
3.按B重啟
4.進(jìn)入后執(zhí)行下列命令
root@#passwd root (設(shè)置root的密碼)
Enter new unix password:輸入新的密碼
root@#init 6
(二)debian linux 系統(tǒng)密碼破解
1.在grub選項菜單'Debian GNU/Linux,...(recovery mode)',按e進(jìn)入編輯模式
2.編輯kernel那行最后面的 ro single 改成 rw single init=/bin/bash,按b執(zhí)行重啟
3.進(jìn)入后執(zhí)行下列命令
root@(none)#mount -a
root@(none)#passwd root
root@(none)#reboot
(三)Freebsd 系統(tǒng)密碼破解
1.開機(jī)進(jìn)入引導(dǎo)菜單
2.選擇每項(按4)進(jìn)入單用戶模式
3.進(jìn)入之后輸入一列命令
root@#mount -a
root@#fsck -y
root@#passwd(修改密碼命令)
root@#root(要破解密碼的用戶名)
Enter new unix password:
root@#init 6 (重啟)
(四)Solaris 系統(tǒng)密碼破解
1.在grub選項菜中選擇solaris failasfe 項
2.系統(tǒng)提示Do you wish to have it mounted read-write on /a ?[y,n,?] 選擇y
3.就進(jìn)入單用戶模式
4.輸入下列命令
#passwd
#New passwd:輸入新的密碼
#Re-enter New passwd:在次輸入新的密碼
#init 6 (重啟)
(五)NetBsd 系統(tǒng)密碼破解
1.開機(jī):當(dāng)出現(xiàn)提示符號并開始倒數(shù)五秒時, 鍵入以下指令:
boot -s (進(jìn)入單用戶模式命令)
2.在以下的提示符號中
Enter pathname of shell or RETURN for sh:
按下 Enter。
3.鍵入以下指令:
# mount -a
# fsck -y
4.使用 passwd 更改 root 的密碼。
5.使用 exit 指令進(jìn)入多人模式。
1,啟動虛擬機(jī),出現(xiàn)下面的倒計時界面時,按鍵盤上的e鍵
(說明:要確保光標(biāo)此時已經(jīng)在虛擬機(jī)內(nèi)了,要不然,按了e鍵,也是在windows內(nèi),無效。e代表edit,啟動前編輯)?
2,進(jìn)入如下后界面,再按e鍵?
3,進(jìn)入如下界面后,使用鍵盤上的上下鍵,選中第二項以kernel開頭的項。選中后,再次按e鍵
4,進(jìn)入以下界面后,在最后面輸入空格和s,然后回車。(注意:有的系統(tǒng)顯示的內(nèi)容可能和我下面出現(xiàn)的這一行不一樣,沒關(guān)系,直接加空格和s就行,不影響的;也就說什么呢,只要進(jìn)入到這個頁面,直接加空格和s,不要管他顯示的是什么;)?
5,接著會回到如下界面,然后按下b鍵(b代表boot啟動)?
6,進(jìn)入如下界面:?
7,此時輸入passwd root回車,?
8,輸入密碼,回車,確認(rèn)密碼,回車,輸入reboot,回車;?
(聲明:輸入的密碼不會顯示出來,如果密碼中想要帶數(shù)字的話,不要使用鍵盤右邊的number pad欄,要使用字母鍵盤上的數(shù)字,因為你不確定此時num lock是否鎖定(針對筆記本而言))?
step_9:最后就可以使用新密碼登錄了;?
本文標(biāo)題:linuxwish命令 linux wifi連接命令
本文網(wǎng)址:http://www.chinadenli.net/article10/hpihgo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供虛擬主機(jī)、移動網(wǎng)站建設(shè)、App設(shè)計、電子商務(wù)、品牌網(wǎng)站建設(shè)、網(wǎng)站設(shè)計公司
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)