如何改变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,可以仔细的研究一下!)
键盘驱动将检 ......
关键字: shell
转自:http://fanqiang.chinaunix.net/program/code/2006-06-27/4695.shtml
Ruby代码
删除 core 文件
# find ~ -name core -exec file {} \; -exec rm -i {} \;
&nbs ......
在/etc/rc.d/rc.local文件里添加一行命令:echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
这样每次启动系统后都将自动运行,可以阻止你的系统响应任何从外部/内部来的ping请求,
就没有人能ping通你的机器并收到响应,可以大大增强站点和系统的安全性。 ......
前提:
1. 下载ubuntu并安装
2. 知道常用的linux命令
3. 能看英文
摘要:
对新手来说
,驱动就是一个程序,通过调用注册函数和修改makefile使linux内核能加载它,于是它在接受操作的时候能有点反应;其与应用程序的主要区别在于其权限高,跑在kernel space里。
开动:
* 下载《Linux Device Drivers 3rd Edition》
......