Linux
How to change home directory of a user in Linux
Aug 21st
Ensure you have shadow-utils package installed.
yum install -y shadow-utils
Use the following command to set new home directory /home/newhome for user “myuser”.
usermod -d /home/newhome myuser
How to change user login name in Linux
Aug 20th
Ensure you have shadow-utils package installed
yum install -y shadow-utils
Then run the following command to change an existing login name “olduser” to “newuser”.
usermod -n newuser olduser
How to resolve xinetd startup errors in Linux
Apr 13th
The best way to solve any service start up errors in Linux is to run them manually with debug mode on. The difficulty comes from finding exact command line arguments to be passed (as if it were started by Linux start up scripts) and also disabling default daemon mode for the server command. You can easily find the options to enable debug mode for the server by quickly looking at man page.
For example, you can use following command to run xinetd service in the foreground with debug on.
[root@techpulp ~]# /usr/sbin/xinetd -d -dontfork
10/4/13@00:34:14: DEBUG: 3657 {handle_includedir} Reading included configuration file: /etc/xinetd.d/chargen-dgram More > How to install VLC Media Player on Fedora
Jan 17th
Fedora doesn’t distribute VLC media player as part its core and updates. So you need download rpms from rpmfusion.org as shown below.
[root@techpulp ~]# rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm [root@techpulp ~]# yum install -y vlc [root@techpulp ~]# yum install -y mozilla-vlc
Off the above, installing mozilla-vlc is optional as it installs a browser plug-in for Mozilla/Firefox Browser.
How to retain RPMs downloaded by yum
Jan 16th
Generally yum deletes all RPMs it downloads right after installing them. If you want to save Internet bandwidth and have multiple systems to be updated, you can make yum to keep the RPMs it downloads.
The highlighted line in /etc/yum.conf file can be edited to enable yum keep the cache of RPMs.
[main] cachedir=/var/cache/yum #keepcache=0 keepcache=1 ..
The “keepcache=1” tells yum to not remoe downloaded RPMs. But where are those downloaded RPMS? You can see “cachedir” line in /etc/yum.conf and that is the base directory where yum keeps the RPMs. In this case the cache directory is “/var/cache/yum“.
You can use “find” command as shown below More >
How to solve ‘Stale NFS file handle’ error while accessing or unmounting a NFS volume
May 14th
This error is typically seen in a system which has active NFS mount point. The NFS protocol doesn’t define any automatic way of communication for any change of NFS server configuration. For example, if a client system mounts an NFS volume and the Administrator at the NFS server removes the directory from the NFS exported list, The client system will not know the change of configuration at NFS server side. In such cases, the ‘df’ command starts showing this error ‘Stale NFS file handle’.
Similar error is seen when a file or directory is deleted in the NFS server while the More >
How to change the order of network card detection in Linux
May 14th
There are multiple issues you would notice when you have more than one Ethernet card (NIC) in your system. The NICs may not get detected in the order you want it to be. The on-board Ethernet port may get detected as “eth2″ while you want it to be detected as “eth0″.
Another problem is when you already have 3 Ethernet cards on your system and removed one them (more specifically the one which used to be detected as “eth1″). In such case, you system shows two Ethernet interfaces “eth0″ and “eth2″ while you might like it to be “eth0″ and “eth1″ More >
How to merge two files using text mode in Linux
May 10th
The Linux provides a command “vimdiff” which can open two files using standard “vim” editor but in two separate logical windows. This is a text-mode based tool. This tool highlights the differences between two files so that the user can inspect the differences and change or move the contents from one window to the other.
First of all, the two file which need merging have to be opened with “vimdiff” as shown below.
vimdiff file1.c file2.c
User can type “Ctrl w w” key combination to switch between windows i.e effectively between two files. You can use standard “vim” commands to copy and paste More >
How to export a NFS volume in Fedora or RedHat Linux
May 9th
NFS stands for Network File System and is a easy way to share files across Linux systems. However the downside of NFS file sharing is that shared folder can’t be protected with a password. But you can limit access to particular IP addresses.
The Fedora Linux system comes up with NFS utilities by default. Otherwise you can install them using “yum” as shown below:
[root@techpulp ~]# yum install -y nfs-utils rpcbind
You can enable the NFS service to start at boot time using the following commands. The “rpcbind” service also needs to be enabled as NFS internally using RPC service. But if you More >


Recent Comments