Why is it possible to create symbolic links across file system boundaries?

last updated in Categories

Symbolic links link by pathname rather than inode number. As you know, each pathname is a unique file on a system. Because of this, it is possible to create symbolic links across file system boundaries. Try to create symbolic links using following command:

$ touch /home/you/file1
# ln -s /home/you/file1 /tmp/file2

Find out inode of both file1 and file2

# ls -i /home/you/file1


# ls -i /tmp/file2

As you can see inode number are unique to each file. So it is possible to create symbolic links across file system boundaries. Please note that in above example both /tmp and /home are two different file systems.

See also:

Howto: Prevent root user from being able to log in via SSH service

last updated in Categories , , ,

Securing root account is one of the main tasks. Most systems have a password assigned to the root account. The first thing you do is assume that the password is always compromised. This does not mean that you should remove the password. The password is almost always necessary for console access to the machine. What it does mean is that you should not make it possible to use the password outside of the console. Direct root logins should only be allowed via the system console.

1) Login as a root user

2) Open /etc/ssh/sshd_config file
# vi /etc/ssh/sshd_config

3) Make changes to ssh server configuration find the following line or edit the line from:
PermitRootLogin yes

Change it to:
PermitRootLogin no

4) Save the changes

5) Restart sshd service
# /etc/init.d/sshd restart

The option PermitRootLogin specifies whether root can log in using ssh.

How can I find out if my Ethernet card (NIC) is being recognized or not?

last updated in Categories

Ethernet card is lifeline of any Linux server. So if you need to find out find out if your Ethernet card is being recognized or not then use dmesg, ifconfig, or netstat command. Command ifconfig can be use to configure a network interface card as well as to find out information about Ethernet card. If you want find out NIC Ethernet chip set then you can use lspci command (see below for an example of lspci).

# /sbin/ifconfig


eth0      Link encap:Ethernet  HWaddr 00:0F:EA:91:04:07
    inet addr:  Bcast:  Mask:
    inet6 addr: fe80::20f:eaff:fe91:407/64 Scope:Link
    RX packets:64874 errors:0 dropped:0 overruns:0 frame:0
    TX packets:65189 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:50448703 (48.1 MiB)  TX bytes:13648924 (13.0 MiB)
    Interrupt:18 Base address:0xc000

Note If you get output eth0 then your card is being recognized.
The dmesg program helps users to print out their bootup messages. Messages are stored in /var/log/dmesg (Debian Linux):
# cat /var/log/dmesg |grep -i eth0


eth0: RealTek RTL8139 at 0xc000, 00:0f:ea:91:04:07, IRQ 18
eth0:  Identified 8139 chip type 'RTL-8100B/8139D'
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1


# dmesg | grep -i eth0

Display a table of all network interfaces:
# netstat -i


eth0   1500 0     64858      0      0      0    65172      0      0      0 BMRU
eth0:  1500 0       - no statistics available -                            BMRU
lo    16436 0      8133      0      0      0     8133      0      0      0 LRU

Find out NIC chipset
For further troubleshooting of your Ethernet card (NIC) I recommend to use lspci command. lspci is a utility for displaying information about all PCI buses in the system and all devices connected to them.
lspci | less
lspci | grep Ethernet


0000:01:05.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

In above example I have “Realtek Semiconductor” NIC with RTL-8139/8139C/8139C chip set.

How do I find out screen resolution of my Linux desktop?

last updated in Categories

It refers to the clarity of an image on screen. Screen resolution suggests the number of dots or pixels on the entire computer screen. For example, when you say a 640 x 480 screen resolution then all you means is individual 640 dots on each 480 lines i.e. 307K pixels.

Use xdpyinfo command to find out current screen resolution:

$ xdpyinfo  | grep 'dimensions:'

dimensions: 800×600 pixels (283×212 millimeters)

You can also use xrandr command:

$ xrandr | grep '*'

*0 1024 x 768 ( 283mm x 212mm ) *61

You can also use Desktop tools to find out current desktop screen resolution:

(A) Gnome Desktop

Click Gnome Desktop menu > Preferences > Screen resolution

(B) KDE Desktop

  1. Click on K desktop Icon > Select Control Center
  2. Select Peripherals (under Index tab) > Select Display
  3. It will display Screen resolution or size

See Screen resolution at wikipedia.