≡ Menu


Screen Command: Set Baud Rate [ Terminal Communication ]

I need to do router or network switch configuration via a console port such as COM1 (ttyS0 under Linux). How do I use the screen command for a serial terminal emulator network with different baud rates under UNIX or Linux operating systems?
[click to continue…]

Linux KVM: OpenBSD Guest Hangs At Starting tty Flags

OpenBSD version 4.5 and above made changes in kernel which prevents booting OpenBSD using KVM technology. OpenBSD 4.4 runs with mbbios enabled. However, due to some sort of bug in KVM it does not boot and hangs while displaying a message which read as "Starting tty flags". The workaround is to disable mpbios. This may or may not happen with your installation, but if it hanged, use the following procedure.
[click to continue…]

Verify: Keepalived IP Failover Working Or Not With tcpdump Command

I've installed keepalived IP failover software as described here. But how do I verify it is working or not?
[click to continue…]

Linux: Display Binary Object Section Size, Text & Data Segment Information

How do I find out the size of the bss, text segment and data segment for each object or binary file under Linux operating systems?
[click to continue…]

Iptables: Unblock / Delete an IP Address Listed in IPtables Tables

I am a brand new user of a Linux iptables and I can't find how to instruct my iptables to delete or unblock an IP address listed in iptables firewall. I'm using Debian Linux version. Can you help please?
[click to continue…]

Find subnet mask on UNIX

Q. How do I find out subnet mask on UNIX operating system? Can you tell us the name of command and configuration file to store subnetmask under UNIX?

A. A subnetwork/ subnet is a range of logical addresses within the address space that is assigned to an organization. Subnetting is a hierarchical partitioning of the network address space of an organization (and of the network nodes of an autonomous system) into several subnets. Routers constitute borders between subnets. Communication to and from a subnet is mediated by one specific port of one specific router, at least momentarily.

Under UNIX / Linux, you need to use the ifconfig utility to assign an address to a network interface
and/or configure network interface parameters. Same command can display subnet. Just type command ifconfig:
$ ifconfig
$ /sbin/ifconfig
$ /sbin/ifconfig interface-name

lnc0: flags=108843 mtu 1500
        inet netmask 0xfffffff8 broadcast
        ether 00:0c:29:32:8a:8c
plip0: flags=108810 mtu 1500
lo0: flags=8049 mtu 16384
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet6 ::1 prefixlen 128
        inet netmask 0xff000000

Look for inet line you will see an IP address, followed by netmask.

Perl sprintf: How Do I Use sprintf In a Perl Script?

How do I use sprintf() function in a perl script under Linux or UNIX?
[click to continue…]

OpenBSD Change, Add or Display Default Gateway

How do I change existing openbsd gateway (openbsd routing) IP address? How do I see current routing table under OpenBSD?
[click to continue…]

Bash Script Flags

Can you explain me common UNIX / Linux / Mac OS X / BSD bash shell script flags?
[click to continue…]