Showing posts with label Unix. Show all posts
Showing posts with label Unix. Show all posts

Saturday, July 14, 2012

How to set default printer in Linux or Unix

If you are using terminal setup in Unix systems like Linux, you can configure your default printer by:

1. csh shell version (by editing ~/.cshrc or ~/.tcshrc configuration files%2y
setenv PRINTER your-printer-name
2. bash shell version (by editing ~/.bashrc configuration file)
export PRINTER=your-printer-name

Saturday, June 30, 2012

How to restart CUPS in Linux

Simply execute the following command will restart CUPS (Common UNIX Printing System) service in Linux like Ubuntu:
#/etc/init.d/cupsys restart
By the way, CUPS is the standards-based, open source printing system developed by Apple Inc. for Mac OS X and other UNIX-like operating systems.

Tuesday, June 12, 2012

How to use RPM in Fedora Linux

RPM is used to build, install, query, verify, update, and erase individual software packages. It was originally designed to work with Red Hat / Fedora Linux. Currently it also works on other rpm-based distributions: Suse, Mandriva Linux, Conectiva and etc.

To install software packages, use the following command:
rpm -i foobar.rpm
To uninstall a software package:
rpm -e foobar.rpm

Friday, April 20, 2012

yum update Red Hat Linux / Fedora

Yum (Yellowdog Updater Modified) is a powerful automatic updater and package installer/remover on RPM-based Linux distributions like Red Hat / Fedora.

Yum automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm.

The main Yum configuration file is /etc/yum.conf. Basic repository listings are located in the /etc/yum.repos.d/ directory. Unless you plan on adding other repositories or have a need to tweak certain configuration settings, these configuration files work as-is. Please refer to yum.conf manual page to find out the various options for this configuration file. You may like to take note about the keepcache option in this file. Set keepcache=1 if you want to keep the downloaded RPM files from erased after they are installed. However, make sure the cachedir directory has enough space to save the downloaded files.

How to determine / find CUPS version

Simply execute the following command in your Unix machine to determine what version of CUPS running on your system.
# cups-config --version

cups-config is the CUPS program configuration utility. Some of the option available for this utility include:

--api-version: current API version (major.minor).

--cflags: necessary compiler options.

Tuesday, December 16, 2008

How to enable CUPS remote administration

CUPS (Common UNIX Printing System) is the standards-based, open source printing system developed by Apple Inc. for Mac OS X and other UNIX-like operating systems.

The default installation of CUPS only enable you to manage it from localhost computer. However, if you are interested in remotely administering CUPS, you need to grant access from other systems than just localhost to the CUPS administration.

To do so, edit the /etc/cups/cupsd.conf and have it explicitly grant access to the systems you want. as for example, to grant access to the system with IP address of 10.0.0.1:

Sunday, December 7, 2008

Eth0 is not active at Linux Fedora Startup

Sometimes even though you have configure such that "Activate device when computer starts" for eth0 in Linux Fedora, it appears to do nothing - eth0 is not active at startup.

This maybe a bug with Fedora. One way to overcome this issue is to execute the following command:

chkconfig network on


This will enable the network service to be started on every time the machine boot.

Monday, December 1, 2008

How to add static route to your Linux Fedora machine

To add a default route into your Linux box,
route add -net 0.0.0.0 netmask 0.0.0.0 gw 10.0.0.1
However, if you only execute this command, the route will disappears if you reboot your system.

So, what would be the best way to permanently add that route to your system?

You may add or edit the default gateway on /etc/sysconfig/network file, to make sure your default route setting is preserve after your system boot.

Configuration example on network file:
NETWORKING=yes
HOSTNAME=fedora.frontier.com
GATEWAY=10.0.0.1

Saturday, October 11, 2008

How to find port number

In our previous post on How to test if a port is open on a server or PC, we have indicated that in TCP/IP networking,  port 25 is used in SMTP (Simple Mail Transfer Protocol), port 110 is for POP3 (Post Office Protocol) and so on. Anyway, where can a user find the port number information?


Of course, the easiest way is to get this information by using search engine like Google, Yahoo or MSN. However, this information is also available in your computer too. The list of port number information can be found in a services file available in Windows and Unix systems.

In Windows, the services information file is available at the following location in your computer hard disk:
C:\Windows\System32\drivers\etc\services

There are other important files located here too, however, we will go through it in our future posts.

hosts file