ÈçºÎ¸Ä±äLinuxÖ÷»úÃû
How to change the hostname of a Linux system
Normally we will set the hostname of a system during the installation process. Many peoples don’t care about this, and don’t change the hostname even if for example this was set to something really stupid by the datacenter that installed the system (most likely they will set this to “debian” on any debian installation, etc). For me, it is important to see on each one of the ssh screens I will have open at any time a different hostname that is relevant and will give me quickly the information on what system I am logged in.
Change the hostname on a running system
On any Linux system you can change its hostname with the command ‘hostname‘ (surprised?)… Here are some quick usages of the command line hostname:
hostname
without any parameter it will output the current hostname of the system.
hostname --fqd
it will output the fully qualified domain name (or FQDN) of the system.
hostname NEW_NAME
will set the hostname of the system to NEW_NAME. This is active right away and will remain like that until the system will be rebooted (because at system boot it will set this from some particular file configurations – see bellow how to set this permanently). You will most probably need to exit the current shell in order to see the change in your shell prompt.
Permanent hostname change on Debian based systems
Debian based systems use the file /etc/hostname to read the hostname of the system at boot time and set it up using the init script /etc/init.d/hostname.sh
/etc/hostname
server
So on a Debian based system we can edit the file /etc/hostname and change the name of the system and then run:
/etc/init.d/hostname.sh start
to make the change active. The hostname saved in this file (/etc/hostname) will be preserved on system reboot (and will be set using the same script we used hostname.sh).
Permanent hostname change on RedHat based systems
RedHat based system use the file
Ïà¹ØÎĵµ£º
Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖÐÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀÐÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......
Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâƪ·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´ËתÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨Õâƪ²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì ......
refer:http://blog.csdn.net/shangguanwaner/archive/2009/08/19/4463875.aspx
Ò»¸öÏîÄ¿µÄ·þÎñÆ÷¶ËÔÚLinuxƽ̨Ï£¬Óõ½ÁË¿ªÔ´ÈÕÖ¾¿âlog4cxx£¬Õâ¸ö¿âÊÇapacheÏîÄ¿µÄÒ»¸ö×Ó¿â¡£¹¦Äܺܲ»´í¡£ÏÂÃæ¼Ç¼ÏÂËüµÄ±àÒëºÍ°²×°¹ý³Ì¡£
log4cxxµÄ¹Ù·½ÏÂÔصØÖ·ÊÇhttp://logging.apache.org/log4cxx/index.html
£¬ÎÒÓõÄÊÇ0.10.0°æ ......
Ç°Ì᣺
1. ÏÂÔØubuntu²¢°²×°
2. ÖªµÀ³£ÓõÄlinuxÃüÁî
3. ÄÜ¿´Ó¢ÎÄ
ͻ񻣼
¶ÔÐÂÊÖÀ´Ëµ
£¬Çý¶¯¾ÍÊÇÒ»¸ö³ÌÐò£¬Í¨¹ýµ÷ÓÃ×¢²áº¯ÊýºÍÐÞ¸ÄmakefileʹlinuxÄÚºËÄܼÓÔØËü£¬ÓÚÊÇËüÔÚ½ÓÊܲÙ×÷µÄʱºòÄÜÓе㷴Ӧ£»ÆäÓëÓ¦ÓóÌÐòµÄÖ÷ÒªÇø±ðÔÚÓÚÆäȨÏ޸ߣ¬ÅÜÔÚkernel spaceÀï¡£
¿ª¶¯£º
* ÏÂÔØ¡¶Linux Device Drivers 3rd Edition¡·
......
LINUX³£ÓÃÃüÁ»ù´¡£©
1. man ¶ÔÄãÊìϤ»ò²»ÊìϤµÄÃüÁîÌṩ°ïÖú½âÊÍ
eg:man ls ¾Í¿ÉÒԲ鿴lsÏà¹ØµÄÓ÷¨
×¢£º°´q¼ü»òÕßctrl+cÍ˳ö£¬ÔÚlinuxÏ¿ÉÒÔʹÓÃctrl+cÖÕÖ¹µ±Ç°³ÌÐòÔËÐС£
2. ls ²é¿´Ä¿Â¼»òÕßÎļþµÄÊô*£¬ÁоٳöÈÎһĿ¼ÏÂÃæµÄÎļþ
eg: ls /usr/man
ls -l
a.d±íʾĿ¼(directory)£¬È ......