Linux
How to find how much disk space a directory is consuming in Linux
Jan 23rd
The Linux command line utility “du” (disk usage) tells you how much space a file or a directory is taking on the disk. Just run the command against a file or a directory. If a directory is specified it determines disk space used by all files and sub directories recursively. By default it displays number in KB (kilo bytes) and the option “-h” makes it show the sizes in human-readable format.
[neo@techpulp ~]# du -h Videos/ 59M Videos/Animals 4.0K Videos/Funny 59M Videos/ [neo@techpulp ~]#
You might be wondering what is the use of “du” command against a single file as “ls -l” on More >
How to disable Ads using HOSTS file in Microsoft Windows/Linux/UNIX
Jan 21st
One way of avoiding online advertisements is to redirect all requests to Ad sites to locahost so that bandwidth is well utilized. It also results in faster browsing as it eliminates Domain Name Service (DNS) requests. For this you need to define custom entries for Ad servers in system HOSTS file to redirect them to localhost (127.0.0.1). The browser first looks at the system HOSTS file for known hosts and if it doesn’t fin it there it will contact the DNS server to resolve IP address of the host name.
The Location of HOSTS file in various operating systems:
Windows 95/98/Me:
The HOSTS More >
How to change host name from command line in Fedora Core Linux
Jan 16th
One can use “hostname” command to find out the host name of a Linux system.
[neo@techpulp ~]# hostname neo.techpulp.com [neo@techpulp ~]#
The same command can be used to set a new host name as well but it requires super user privileges.
[root@techpulp ~]# hostname pc1.techpulp.com [root@techpulp ~]# hostname pc1.techpulp.com [root@techpulp ~]#
There is an another way to change the host name using PROC file system. The Linux kernel supports proc interface for host name using “/proc/sys/kernel/hostname” file. You can directly write new host name in that file as shown below:
[root@techpulp ~]# echo pc2.techpulp.com > /proc/sys/kernel/hostname [root@techpulp ~]# hostname pc2.techpulp.com [root@techpulp ~]#
However any changes made More >
What to do if my X server stops responding
Jan 14th
Sometimes moue/keyboard in X server stops responding due to bugs in the software. There is a better way to recover if you are planning to hard reboot the system.
You can press Ctrl+Alt+Backspace which will kill the current X session and takes you to the initial login screen.
Another way is to move to text login screen using Ctrl+Alt+F2 and then kill the X session after logging in. Later move back to the graphical screen which will be typically present at Ctrl+Alt+F7 or Ctrl+Alt+F1 on Fedora Linux systems.
killall -KILL X
How to disable Firewall in Fedora or Debian Linux systems
Jan 14th
If you have come across a problem of not able to access a service like httpd even if the server is running, most probably the Firewall is blocking the port. The quick way of checking it is to disable Firewall and try again. However this method of disabling firewall may not be recommended on production servers.
The following command tells you if firewall (iptables) is active on the Fedora Linux system.
[root@techpulp ~]# /sbin/service iptables status Table: filter Chain INPUT (policy ACCEPT) num target prot opt source destination 1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED 2 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 More >
How to safely reboot a frozen Linux system
Jan 14th
If your Linux system is frozen completely and there is absolutely no response and you are planning to unplug the power cable for hard reboot, there is a way to graciously reboot the system without unplugging the cable.
First of all ensure that your system is actually frozen:
Try Ctrl+Alt+Backspace combination if you are using graphical mode. If it doesn’t work, then try “Ctrl+Alt+F1“, “Ctrl+Alt+F2” etc to see if you can get to a shell in text mode.
If the Linux system doesn’t respond to any of the above attempts, you can do the following to graciously reboot the system.
- Press Alt+SysReq
- Press the following sequence More >
How to control system services in Fedora Linux
Jan 14th
Fedora Linux systems come with a command called “service” which can be used to control the system-wide services while the system is running. Typically each system service provides at least four operations: start, stop, restart, status. Using the “service” command, you can start, stop or restart a system service as shown below. The following example shows how to start and web server (httpd service).
[root@techpulp ~]# /sbin/service httpd start
Starting httpd: [ OK ]
[root@techpulp ~]#
Similarly you can stop a service (httpd in this case) as shown below.
[root@techpulp ~]# /sbin/service httpd stop
Stopping httpd: [ OK ]
[root@techpulp ~]#
To know if More >
How to move icons/components/widgets on KDE4 panel
Jan 10th
You can move panel components like start menu button, task bar, pager, system tray, clock and other widgets on the panel and rearrange them to suit your needs. The same can be done not only on the main panel of KDE4 but also with any new panel that you might have created. Follow these steps to do it.
- Click on the far right plasma button to open panel settings.
- Now move the mouse cursor back on to the panel and drag which ever widget you want to move. Typically whenever a widget become movable, it shows four-arrowed image on the widget. Then More >


Recent Comments