Pages

Sunday 18 December 2011

Linux basic commands

LINUX BASIC COMMANDS:
Following are some basic commands use in linux system

Terminal:
The terminal is often called the command prompt or the shell. In days gone by, this was the way the user interacted with the computer, however Linux users have found that the use of the shell can be quicker than a graphical method and still holds some merit today.

cd       Change Directory
ls       List information about file(s)
make     Recompile a group of programs
gzip     Compress or decompress named file(s)
install  Copy files and set attributes
kill     Stop a process from running
killall  Kill processes by name
sudo     Execute a command as another user
Wget     Retrieve web pages or files via HTTP, HTTPS or FTP
Apt-get  Search for and install software packages (Debian/Ubuntu):
APT (Advanced Packaging Tool) is a powerful package management
system.APT automatically handles
dependencies and performs other operations on system packages to allow the
installation of the desired package/s.
Some common commands that can be used with APT:
Install packages:
# sudo apt-get install packagename
Remove packages:
# sudo apt-get remove packagename
Retrieve new lists of packages:
# sudo apt-get update
Upgrade system with available updates:
# sudo apt-get upgrade


List further commands and options:
# apt-get help

Root And Sudo
The root user in GNU/Linux is the user which has administrative access to your system. Normal users do not have this access for security reasons. However, Ubuntu does not include the root user. Instead, administrative access is given to individual users, who may use the "sudo" application to perform administrative tasks. The first user account you created on your system during installation will, by default, have access to sudo. You can restrict and enable sudo access to users with the Users and Groups application
When you run an application that requires root privileges, sudo will ask you to input your normal user password. This ensures that rogue applications cannot damage your system, and serves as a reminder that you are about to perform administrative actions which require you to be careful! To use sudo when using the command line, simply type "sudo" before the command you wish to run. Sudo will then prompt you for your password. Sudo will remember your password for a set amount of time. This feature was designed to allow users to perform multiple administrative tasks without being asked for a password each time.


RPM (RPM Package Manager):
The RPM Package Manager (RPM) is a powerful command line driven package management system capable of installing, uninstalling, verifying, querying, and updating computer software packages. Each software package consists of an archive of files along with information about the package like its version, a description, and the like
To install the package:
# rpm -i filename.rpm
To upgrading from an earlier version of the software package:
# rpm –U filename.rpm
Checking for a package:
# rpm –q filename.rpm

YUM:
yum is software installation tool for Red hat linux and Fedora Linux. It is a complete software management system. Other option is to use up2date utility. yum is designed to use over network/internet.
To install a new package:
# yum install filename
To update a package:
# yum update

No comments:

Post a Comment