锘??xml version="1.0" encoding="utf-8" standalone="yes"?>
- # locale -a
- # locale -a|grep en
■ 鏌ョ湅褰撳墠鎿嶄綔緋葷粺浣跨敤鐨勮璦
- # echo $LANG
■ 璁劇疆緋葷粺locale璇█涓轟腑鏂囩幆澧冿紙姘鎬箙鐢熸晥錛?/p>
# vi /etc/sysconfig/i18n
- LANG="zh_CN.UTF-8"
■ 璁劇疆緋葷粺locale璇█涓鴻嫳鏂囩幆澧冿紙姘鎬箙鐢熸晥錛?/p>
- LANG="en_US.UTF-8"
■ 涓存椂鏀瑰彉緋葷粺locale璇█錛堥鍑烘湰嬈$櫥褰曠珛鍗沖け鏁堬級
- # export LANG=zh_CN.UTF-8
■ 瀹夎涓枃瀛椾綋
- # yum install fonts-chinese.noarch
■ 鎸囧畾涓枃瀛椾綋璺緞
# vi /etc/X11/fs/config
- catalogue = /usr/X11R6/lib/X11/fonts/misc:unscaled,
- /usr/X11R6/lib/X11/fonts/75dpi:unscaled,
- /usr/X11R6/lib/X11/fonts/100dpi:unscaled,
- /usr/X11R6/lib/X11/fonts/Type1,
- /usr/share/fonts/default/Type1,
- ,
- /usr/share/fonts/zh_CN/TrueType,
- /usr/share/fonts/zh_TW/TrueType
鏂規硶2
淇敼CentOS榪愯鐜鐨勯粯璁よ璦鐜鍙橀噺鍊?/p>
[root@www ~]# vi /etc/profile
鎵懼埌export璇彞錛屽湪璇彞鍓嶉潰鍔犲叆
LANG=”en_US.UTF-8″
鍐嶅湪export鍚庨潰榪藉姞LANG
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC LANG
淇濆瓨閰嶇疆錛屼慨鏀笴entOS璇█瀹屾垚銆?/p>
Linux LAN card: Find out full duplex / half speed or mode
Q. How do I find out if my Lan (NIC) card working at full or halt duplex mode / speed under Linux?
A. LAN card or NIC is use to send and receive data. Technically, we use word Duplex for this functionality. Full duplex means you are able to send and receive data (files) simultaneously. In half duplex, you can either send or receive data at a time (i.e. you cannot send receive data (files) simultaneously). Obviously, full duplex gives you best user experience. However, how can I find out whether I am using full duplex/half duplex speed/mode?
Task: Find full or half duplex speed
You can use dmesg command to find out your duplex mode:
# dmesg | grep -i duplex
Output:
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
ethtool command
Uss ethtool to display or change ethernet card settings. To display duplex speed, enter:
# ethtool eth1
Output:
Settings for eth1:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 10Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: umbg
Wake-on: g
Current message level: 0x00000007 (7)
Link detected: yes
mii-tool command
You can also use mii-tool to find out your duplex mode. Type following command at shell prompt:
# mii-tool
Output:
eth0: negotiated 100baseTx-FD flow-control, link ok
Remember,
1. 100baseTx-FD: 100Mbps full duplex (FD)
2. 100baseTx-HD: 100Mbps half duplex (HD)
3. 10baseT-FD: 10Mbps full duplex (FD)
4. 10baseT-HD: 10Mbps half duplex (HD)
mii-tool utility checks or sets the status of a network interface Media Independent Interface (MII) unit. Most fast ethernet adapters use an MII to autonegotiate link speed and duplex setting. If you are using old card then this utility may not work (use dmesg command).
This utility is useful for forcing specific Ethernet speed and duplex settings too, setup 100Mbps full duplex speed under Linux:
# mii-tool -F 100baseTx-FD
Setup 10Mbps half duplex:
# mii-tool -F 10baseT-HD
source:
http://www.cyberciti.biz/faq/howto-setup-linux-lan-card-find-out-full-duplex-half-speed-or-mode/
str="hello world"
1) cut
Where -cN-M tells the cut command to return columns N to M, inclusive. cut -cN-M
bash
, consider using cut
. ${str:offset}
${str:offset:length}
sub_str=${str:0:5}
output: hello
3) expr
expr substr string position length
sub_str=`expr substr $str 1 5`
output: hello
This is a recording of Richard Stallman saying “GNU” and another with a short explanation about how GNU was named:
How to say “GNU”:
How GNU Was Named: