Operating Systems
How to configure a network interface in Linux
Aug 27th
Linux provides “ifconfig” command to configure network interfaces.
To display list of available interfaces:
[root@techpulp ~]# ifconfig eth0 Link encap:Ethernet HWaddr 00:65:23:5E:D4:3C inet addr:192.168.191.1 Bcast:192.168.191.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:261958 errors:0 dropped:0 overruns:0 frame:0 TX packets:201967 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:322195982 (307.2 MiB) TX bytes:18627969 (17.7 MiB) Interrupt:21 Base address:0x2000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:4 errors:0 dropped:0 overruns:0 frame:0 TX packets:4 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:240 (240.0 b) TX bytes:240 (240.0 b) [root@techpulp ~]#
To bring down an interface “eth0″:
[root@techpulp ~]# ifconfig eth0 down
To More >
How to lock and unlock an user account in Linux
Aug 25th
Any user account can be locked or unlocked only by Administrator (i.e root user). This is done using passwd command as explained below. When an user account is locked, Linux sets a irrecoverable password for that account so that login always fails. However Linux still stores the original password of the account before locking so that unlocking such account retains its original password.
To lock a user account (liz) from logging in:
[root@techpulp ~]# passwd -l liz Locking password for user liz. passwd: Success [root@techpulp ~]#
To unlock a user account (liz):
[root@techpulp ~]# passwd -u liz Unlocking password for user liz. passwd: Success [root@techpulp More >
How to get standard 80×25 console instead of SVGA console in Fedora Linux
Aug 24th
If you want to get good old 80×25 console in text mode of Fedora, you need to pass “nomodeset” option to the kernel.
Open the file /etc/grub.conf or /boot/grub/grub.conf file and “nomodeset” option to the “kernel” line of the active boot entry.
kernel /vmlinuz-2.6.28.24 ro root=/dev/sda2 rhgb quiet nomodeset
How to disable graphical boot in Fedora
Aug 23rd
To disable graphical boot in Fedora, you need to modify system configuration.
Open the file “/etc/sysconfig/init” and change the line “GRAPHICAL=yes” to “GRAPHICAL=no“. This only disables Fedora from using graphics mode during start up. So Fedora shows the text bar during start up.
However if you want to disable graphical login screen and move to text mode completely, you need to edit the following line in “/etc/inittab” file.
Change
id:5:initdefault:
to
id:3:initdefault:
In the above line, “5″ means graphical mode login and “3″ means text mode login.
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 > What is the best alternative to WinZip
Jan 18th
If you are tired of commerical software WinZip, The best free software alternative to WinZip is 7-zip.
In fact 7-zip is better than WinZip as it supports more formats like BZIP2, RPM etc along with its own format 7z.
7-zip in Windows
The 7-zip can create archives of following formats.
- 7z, ZIP, GZIP, BZIP2 and TAR
The 7-zip application can unzip following formats
- 7z, ZIP, GZIP, BZIP2 and TAR
- ARJ, CAB, CHM, CPIO, DEB, DMG, HFS, ISO, LZH, LZMA, MSI, NSIS, RAR, RPM, UDF, WIM, XAR and Z.
This is best compatible with UNIX flavours as it supports the archives seen on UNIX systems like GZIP, TAR, BZIP2, 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 >


Recent Comments