Archive for December, 2008
How to create Fedora Core 6 Virtual Machine using VMWare Server
Dec 17th
If you try to install Fedora Core 6 to a virtual machine in VMWare, installer doesn’t detect the hard drive that is attached with default options. The FC6 installer throws an error saying “No Devices Found”.
To get rid of this problem, you need to select different option for hard drive during virtual machine creation. Do the following during the virtual machine creation using VMWare virtual machine creation wizard.
- In Virtual Machine Configuration page, Select Custom.
- In Guest Operating System page, select Linux and in version combo box select Other Linux 2.6.x kernel
- Select LSI Logic based SCSI hard disk.
With this option, FC6 installer will continue normally.
More >
How to find status of a system service in RedHat Linux/Fedora
Dec 17th
There is a script in “/etc/init.d” directory to control each system service. For example, “/etc/init.d/httpd” script is used to control Apache web service. Typically all the scripts under that directory support basic operations like start, stop, status.
The status of any service can be determined using the “status” option supported by the corresponding script of the system service. For example, to know whether the Apache web service is running or not, the following command can be used.
[neo@techpulp ~]# /etc/init.d/httpd status httpd (pid 4201) is running... [neo@techpulp ~]#
The following command check if SNMP service is active or not.
[neo@techpulp ~]# /etc/init.d/snmpd status snmpd More >
How to get PID of a process by name in bash script
Dec 16th
The following bash shell script looks at the output of “ps” command to identify the PID of a process. This script takes name of the process as command line argument.
[neo@techpulp ~]# cat getpid.sh
#!/bin/bash
ps -e | grep "$1$" | awk '{print $1;}'
[neo@techpulp ~]#
The first part “ps -e” displays the list of all processes in the system. The “grep” command looks for a line ending with the process name supplied as first command line argument to the script. The “awk” command prints the first word in the matching line.
You will see one PID per line if there are multiple More >
How to install a custom font in Microsoft Windows
Dec 16th
Typically font files have .fon or .ttf as file extension. To install a font file, just go to “Start Menu” and type “Run…” as shown below.
This will show the following Run dialog as shown below.
Type “%windir%\fonts\” and click OK. It will open up the system fonts folder as shown below.
Now just drag and drop your font file in to the system fonts folder to install them. If it is properly installed, you should see it in Microsoft Word and Wordpad applications.
How to find list of available drives and partitions in my Linux system
Dec 8th
There is a special file “/proc/partitions” in the proc file system interface exported by Linux kernel. This file contains information of all drives, partitions and their sizes present in the system. A sample file is shown below. This contains only one drive sda which has seven partitions sda1 through sda7 out of which sda4 is Windows extended partition.
[neo@techpulp ~]# cat /proc/partitions major minor #blocks name 8 0 117220824 sda 8 1 13309821 sda1 8 2 34186320 sda2 8 3 18040995 sda3 8 4 1 sda4 8 5 40050013 sda5 8 6 10747453 sda6 8 7 883543 sda7 [neo@techpulp ~]#
If you have More >
How to log all that is displayed in my console to a file
Dec 8th
It is difficult to keep track of all that is printed in the console session especially if you are debugging a program with lots of debug messages. In such cases, you can use “script” command which spawns a new shell and all the activity on that shell is logged to a file until the shell is closed using “exit” command. By default, the “script” command stores the log in a file “typescript” which is stored in the same directory where the “script” command is run. Once you close the shell newly spawed by “script” command you will go back to More >
How to find IP address of DNS Server in Linux
Dec 8th
The file “/etc/resolv.conf” contains IP addresses of DNS servers along with domain name. A example file is shown below.
[neo@techpulp ~]$ cat /etc/resolv.conf nameserver 202.64.38.98 nameserver 202.64.39.98 [neo@techpulp ~]$
In the above example, Two DNS servers are configured in my system. If you find problems in resolving domain names, just check if the DNS server is reachable or not using “ping” program. If the DNS server is up then you should see ping reply from it as shown below.
[neo@techpulp ~]$ ping 202.64.38.98 PING 202.64.38.98 (202.64.38.98) 56(84) bytes of data. 64 bytes from 202.64.38.98: icmp_seq=1 ttl=64 time=0.993 ms 64 bytes from 202.64.38.98: icmp_seq=2 More >
Why GNU make compiles even if there are no modified files
Dec 8th
Some times GNU Make continue to compile some files even if there are no modifications. Typically it happens if you have transferred the files from some other system whose time is set to future. As while transferring files using tarball (archive created by tar command) retains the time stamps of the files, GNU Make thinks that those files are modified and keeps compiling them all the time.
To get rid of this problem, just set time stamp of all source files to current date and time of the system. You can use “touch” command as shown below.
[neo@techpulp ~]# find . -iname More >
Why special keys don’t work in VMWare virtual machine
Dec 8th
The VMWare server requires some keymaps to be defined in its configuration file in Fedora 10 to get the special keys work in virtual machines. Just add the following at the end of “/etc/vmware/config” file. The same solution might work in other distributions like Ubutnu and others.
xkeymap.keycode.108 = 0x138 # Alt_R xkeymap.keycode.106 = 0x135 # KP_Divide xkeymap.keycode.104 = 0x11c # KP_Enter xkeymap.keycode.111 = 0x148 # Up xkeymap.keycode.116 = 0x150 # Down xkeymap.keycode.113 = 0x14b # Left xkeymap.keycode.114 = 0x14d # Right xkeymap.keycode.105 = 0x11d # Control_R xkeymap.keycode.118 = 0x152 # Insert xkeymap.keycode.119 = 0x153 # Delete xkeymap.keycode.110 = 0x147 # More >


Recent Comments