Tricks

KDE - Do not show windows from all the Desktops

By default the Windows from all the Desktops are displayed in all the KDE Desktops. You can disable this feature by following the below mentioned step.

1. Go to Control Center > Desktop > Taskbar
2. Under Taskbar section uncheck the checkbox "Show windows from all desktops"

IP Tables - Secure your Linux computer

Secure your computer using IP Tables. Click on the link below. It has a nice tutorial on IP Tables.

http://www.itech7.com/Security/Secure-your-Linux-Box-using-IPTables-Fire...

Re-Mount /etc/fstab without Restarting

You have added new entry in your /etc/fstab file to mount a drive or partition. To mount those new partitions you would normally reboot your PC. There is a simple way which will Re-Mount the drives in your /etc/fstab file. Run as root.
mount -a

BASH - Display date/time, hostname and current directory

To display date/time, hostname and current directory use the following command in your BASH prompt and press enter.
PS1="[\d \t \u@\h:\w ] $ "
After pressing enter your BASH prompt will look like this.
[Mon Apr 28 14:04:48 ravisa@incgnddw0062:/cygdrive/e/myfiles/] $
I used this command on Cygwin running on Window XP. The hostname and current directory will be different in your case.

Current working directory in BASH

For all those newbies in the world of Linux here is a very useful linux command.

[root@localhost practice]# pwd
/home/ravi/windows/d/myfiles/tutorials/c++/practice

pwd will print the current working directory in the konsole.

uname - print system information

If you want the know your system information like the Kernel name, Kernel Release, Kernel Version etc then you can issue uname command.

Here is the details of the command along with the arguments. This information is fetched from manual pages.


NAME
       uname - print system information

SYNOPSIS
       uname [OPTION]...

DESCRIPTION
       Print certain system information.  With no OPTION, same as -s.

       -a, --all
              print all information, in the following order, 
              except omit -p and -i if unknown:

       -s, --kernel-name
              print the kernel name

       -n, --nodename
              print the network node hostname

       -r, --kernel-release
              print the kernel release

       -v, --kernel-version
              print the kernel version

       -m, --machine
              print the machine hardware name

       -p, --processor
              print the processor type or "unknown"

       -i, --hardware-platform
              print the hardware platform or "unknown"

       -o, --operating-system
              print the operating system

       --help display this help and exit

       --version
              output version information and exit


uptime - Tell how long the system has been running

uptime gives a one line display of the following information. The current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes.

$ uptime
09:44:28 up 1 day, 1:10, 1 user, load average: 0.00, 0.00, 0.00

Syndicate content