Search Engine

Loading

Sallar

Sallar
RedhatEnterpriseLinux Blog
Showing posts with label Basic. Show all posts
Showing posts with label Basic. Show all posts

How to Create ISO Images from Command-Line



For this tutorial we’ll use the genisoimage utility, developed as part of the cdrkit project. genisoimage is a command-line tool for creating ISO 9660 filesystem images, which can be burnt after to a CD or DVD using some other burning tool. To install it open a terminal and type the following as root:

Ubuntu and Debain
$ sudo apt-get install genisoimage (for Centos and redhat )

For Redhat and Centos
$ yum -y install genisoimage

How to Detecting Hardware in Linux


After the installation program probes for hardware and maps the IDs to the appropriate kernel module (if available), the kernel module information is written to the /etc/ modprobe.conf file so it can be used on subsequent boots.
               
But, what should you do if a device is not configured by the installation program? You can use tools to probe the hardware and discover information that can be used to manually configure the device. This section discusses two tools for this purpose: Kudzu and ddcprobe.

How to Listing USB Devices

Because USB devices are connected to a separate controller, a different command, lsusb, must be used to list them. The lsusb utility is provided by the usbutils package. Install this package via Red Hat Network.
If executed without arguments, the lsusb command displays each USB bus and any devices attached to them on a separate line as shown.
USB Device List
Bus 002 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000

How to Query RPM Package Files


You now know that an RPM database on the system keeps track of which files are associated with each RPM installed, but how do you know which files are associated with which RPM packages? You can query the RPM database and find out with the following command:

rpm -qf <filename>

The <filename> must be the full path to the file. If the file is associated with an RPM package installed, the name of the package and the version installed is displayed. For example, if the
rpm -qf /etc/crontab command is issued, the output is crontabs <version>-<release>, where <version>-<release> is the version and release of the crontabs package installed.

How to Removing Software /RPM


To remove a package, issue the following command:
rpm -e <packagename>
Notice that this time, only <packagename> is used, not the full name of the file used to install the software. When this command is issued, the RPM database is searched for the files associated with this package, and they are removed.
If multiple versions of a package are installed, such as the kernel, the package version can also be specified to make sure the correct version is removed:
rpm -e <packagename>-<version>-<release>

How to Updating Software/ RPM


If an RPM package is already installed, it can be updated to a newer version. With RPM, there isn’t the concept of using a different file or set of files to perform a software upgrade. The same RPM file or files used to install a program can be used to update the program as well.
To update to a newer version of a package already installed:
rpm -Uvh <packagename>-<version>-<release>.<arch>.rpm

Installing RPM Package Software


Installing an RPM package can be done via the command line or a graphical program. Because some systems such as servers do not always have a graphical desktop installed, it is important to learn at least the basics of how to use the command-line version of RPM. The command is simple to remember: It is the rpm command.
Before installing any software, confirm that it was packaged by a trusted source and has not been altered since the trusted source built it. This process is done by checking the GPG signature of the package.

Understanding How RPM Works


How does RPM work? Each software program consists of files and directories, most of which must be located in a particular place on the filesystem. If the software program is distributed in RPM format, these files are compressed together into one RPM file along with instructions on where the files should be located on the filesystem and any additional scripts or executables that must be run before or after the files are installed. These RPM files are often referred to as packages.
A software program, such as the Firefox web browser, might consist of one RPM file. However, some programs are divided into multiple RPM files to allow the administrator to customize which parts are necessary for the system’s usage. For example, the GNOME graphical desktop is divided into many packages that contain parts of the overall desktop.

How to Finds File in linux


There are two invaluable commands that can be used to find files on the filesystem: locate and find. The locate command is the easier of the two to use. Just type the command followed by part or all of the filename you are searching for such as locate .odt to find all OpenOffice.org text files or locate compare to find all filenames that contain the word compare. Notice that no wildcard characters are used. It is assumed that what you type may only be part of the filename you are looking for.
The only catch to this command is that it relies on the generation of a database file so it can quickly display results. The locate command is provided by the mlocate package, which also provides the cron script /etc/cron.daily/mlocate.cron to

How to Find Commands


If you know a command exists on the system but keep getting the error message command not found, check to make sure you are typing the command correctly. Otherwise, it might not be in your PATH environment variable. To view the value of your PATH, execute the command echo $PATH from the command line. As you can see, your PATH is a list of directories. When you execute a command without providing its full path, it must be in one of the directories listed in your PATH. Otherwise, the command not found error is displayed. You can provide the full path to the command if you know it, such as /sbin/lspci to execute the command to list the PCI devices. If you use the command often, but it is not in your PATH, you can add the directory to your PATH.

How to Read Text Files in linux


Sometimes you want to quickly read a text file such as a configuration file without having to open a text editor. This is possible with the less, more, and cat command-line utilities. All three have the same basic syntax but work differently and have different commandline options. To use them in their default modes, type the command followed by the text file to read such as less output.txt, more /var/loasg/messages, or cat /etc/sysconfig/ network.

How to Configure the Runlevels In Redhat Enterprise linux


To configuring which services are started for a runlevel, use one of three programs: chkconfig (command line only), ntsysv (simple text-based application that doesn’t require a graphical desktop), or the Service Configuration Tool (graphical application).
The chkconfig command can be used to configure runlevels and list the current runlevel configuration. It must be run as root if modifying a runlevel. Otherwise commands such as listing whether a service is started at boot time can be run as a non-root user.
To list the status of all services, execute the chkconfig --list command. A line is output for each service such as the following for the Apache HTTP Server:

Powered by Blogger.

Ads

 
Copyright © Redhat Enterprise linux. Original Concept and Design by My Blogger Themes
My name is Abdul Razaq but people call me Raziq. Here is my home page: www.redhatenterpriselinux.blogspot.com I live in Quetta, Pakistan and work as an IT-Engineer.