DIR Return Create A Forum - Home
---------------------------------------------------------
Java
HTML https://java.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: General Discussion
*****************************************************
#Post#: 9--------------------------------------------------
Linux Commands
By: shekar Date: September 30, 2014, 7:40 am
---------------------------------------------------------
Linux is a free Unix-type operating system originally developed
by Linus Torvalds.
The source code for Linux is freely available to everyone.
Linux runs on many different hardware platforms including Intel,
SparcŪ, PowerPC, and Alpha Processors.
Hundreds of application programs have been written for Linux,
some of these by the GNU project.
Linux's architecture like LNA creates a more reliable system.
Systems using protected memory and pre-emptive multitasking are
inherently more stable.
Because the source to Linux is open source, it is easy to
customize and to update rapidly (total cost of ownership is also
low). This flexibility has enabled Linux to run on everything
from handheld and embedded systems to clusters of hundreds of
servers.
LNA uses on the server side (Linbox NetServer) an industry-
standard platforms running the Linux operating system.
At the heart of Linux is the kernel which basically runs the
show. The Linux kernel provides the basic services and device
drivers used by all other programs running on a Linux OS system.
Introduction:
Linux is know for its security, performance, reliability. Many
business units are looking towards Linux as it provides low
costs software for them. Earlier Linux used to be difficult to
install and configure. But now a days its simple to install and
configure Linux and this is also a reason why many business are
trying Linux.
Installing Linux:
Insert the Linux bootable CD 1 in the CDROM and restart the
computer.
Computer will boots from the CD and the installation process get
started.
Installation of Linux takes around 30 minutes.
Installer detects the driver for monitor, video board and
keyboard and the first screen is displayed.
Step through the screens and selections, taking the default
settings.
When the Disk Partition Setup screens is displayed, be sure to
choose the "Automatic Partition".
Installer also asks the Admin user/password.
Installer finally asks the use to proceed the installation or
cancel it.
Choose the proceed for installation.
Installer will ask you for all the CDs one by one.
Keep on providing the CDs and watching the installation.
One installed installer will reboot the system.
On reboot Linux will ask you the user name and password. Enter
user name and password and enjoy the world of Linux.
Commands:
pwd - Prints out on the screen the working directory (eg
/etc/ssh)
The directory you are standing in is called the working
directory. To find the name of the working directory, use the
pwd command.
ls - lists the content of the directory
ls /bin
directory you care to specify)
ls -l
ls -l /etc /bin
/etc directory in long format
ls -la ..
a period character, which are normally hidden) in the parent of
the working directory in long format
cd - changes directory
cp
The cp program copies files and directories.
cp file1 file2 :Copies the contents of file1 into file2. If
file2 does not exist, it is created; otherwise, file2 is
overwritten with the contents of file1.
cp file1 dir1 :Copy the contents of file1 (into a file named
file1) inside of directory dir
cp -R dir1 dir2
Copy the contents of the directory dir1. If directory dir2 does
not exist, it is created. Otherwise, it creates a directory
named dir1 within directory dir2.
mv :
The mv command performs two different functions depending on how
it is used. It will either move one or more files to a different
directory, or it will rename a file or directory.
mv file1 file2 :If file2 does not exist, then file1 is renamed
file2. If file2 exists, its contents are replaced with the
contents of file1.
mv file1 file2 file3 dir1 :The files file1, file2, file3 are
moved to directory dir1. dir1 must exist or mv will exit with an
error.
mv dir1 dir2 :If dir2 does not exist, then dir1 is renamed dir2.
If dir2 exists, the directory dir1 is created within directory
dir2.
rm :
The rm command deletes (removes) files and directories.
rm file1 file2 :Delete file1 and file2.
rm -r dir1 dir2 :Directories dir1 and dir2 are deleted along
with all of their contents.
ls -lt | head :Displays the 10 newest files in the current
directory.
Outputs the first few lines of its input. Useful for getting the
header of a file.
tail
Outputs the last few lines of its input. Useful for things like
getting the most recent entries from a log file.
*****************************************************