Use following command to start HP-UX network service:
/etc/init.d/net start OR /sbin/init.d/net start Please note that your network configuration file is /etc/rc.config.d/netconf . Here is my sample /etc/rc.config.d/netconf file:
# cat /etc/rc.config.d/netconf Output: HOSTNAME=deephpux < --change hostname here
IP_ADDRESS=192.168.1.100 <--change IP address here
SUBNET_MASK=255.255.255.0 <--change subnet mask here
DHCP_ENABLE="0" <--Do you wanna DHCP? set 1 to use DHCP
You can also set IP address using ifconfig command: # ifconfig lan0 192.168.1.200 netmask 255.255.255.0 up
See or get current IP address information with ifconfig command: # ifconfig lan0
The resolv.conf file is the resolver configuration file. It is use to configure client side access to the Internet Domain Name System (DNS). This file defines which name servers to use.
The resolver is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). The resolver configuration file contains information that is read by the resolver routines the first time they are invoked by a process. The file is designed to be human readable and contains a list of keywords with values that provide various types of resolver information
Note: File name is /etc/resolv.conf and not /etc/resolve.conf.
search domain.com: The search list is normally determined from the local domain name; by default, it contains only the local domain name. So when you type nslookup www, it will be matched to www.cyberciti.biz
nameserver Name-server-IP-address: Point out to your your own nameserver or to ISP’s name server. Up to 3 name servers may be listed.
But how do I edit the /etc/resolv.conf file?
Use text editor such as vi or gedit from Linux desktop: # vi /etc/resolv.conf
Default /etc/resolv.conf file
Following file should be work with any ISP in the world :) # cat /etc/resolv.conf Output:
/etc/modules file contain the names of kernel modules that are to be loaded at boot time, one per line. Lines beginning with “#” are ignored.Parameters can be specified after the module name $ cat /etc/modules Sample outputs:
# /etc/modules: kernel modules to load at boot time.
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.
However, modern Linux distribution uses the following location or configuration directory/file for modprobe kernel device driver:
How do I install latest kernel version?
Find out if latest version available or not via following command: apt-cache search kernel-image| grep VERSION An example to see if 2.6.xx.xx series new kernel available or not (Debian Linux): apt-cache search kernel-image| grep 2.6 Compare version with existing running kernel if it is greater than running kernel, run following command to install new kernel (run it as a root user and assuming that 188.8.131.52 is latest the kernel available): apt-get install linux-image-2.6.12-1-386
Difference between Monolithic and Modular kernel:
Single binary file [ directory ls -d /lib/modules/$(uname -r) does NOT exists ]
All drivers included in kernel itself
Multiple files for kernel
Drivers can be loaded or unloaded into kernel using modprob command, see man page of lsmod, modprob etc [directory ls -d /lib/modules/$(uname -r) exists to store drivers]
Almost all drivers are build and linked against kernel
How do I build modular kernel?
You can built modular kernel by setting option in kernel configuration option: Enable loadable module support (CONFIG_MODULES) [Y/n/?] If you set above option to Y then kernel becomes modular and three possibilities occurs for each and every feature/driver:
m – you can compile driver as module
y – built into kernel itself
n – Don’t include feature/driver
Type the command make menuconfig: make menuconfig 1) Select Loadable module support and press enter/return key:
Loadable module support
2) Select Enable Loadable module support option and other options, see following figure:
This book covers Memory management including file buffering, process swapping, and Direct memory Access (DMA), The Virtual Filesystem and the Second Extended Filesystem, Process creation and scheduling, Signals, interrupts, and the essential interfaces to device drivers, Timing, Interprocess Communication (IPC), Program execution etc. A must read to master kernel concepts
If you wants starting hacking kernel then this perfect book for you. This book can be also use with your CS (college course) to get more indepth information on operating systems – it helps gain a better idea of kernel conepts. Try following book: