commands that's are commonly used in linux

27
What is Linux Linux is, in simplest terms, an operating system. It is the software on a computer that enables applications and the computer operator to access the devices on the computer to perform desired functions. The operating system (OS) relays instructions from an application to, for instance, the computer's processor. The processor performs the instructed task, then sends the results back to the application via the operating system. Explained in these terms, Linux is very similar to other operating systems, such as Windows and OS X. But something sets Linux apart from these operating systems. The Linux operating system represented a $25 billion ecosystem in 2008. Since its inception in 1991, Linux has grown to become a force in computing, powering everything from the New York Stock Exchange to mobile phones to supercomputers to consumer devices. As an open operating system, Linux is developed collaboratively, meaning no one company is solely responsible for its development or ongoing support. Companies participating in the Linux economy share research and development costs with their partners and competitors. This spreading of development burden amongst individuals and companies has resulted in a large and efficient ecosystem and unheralded software innovation. Over 1,000 developers, from at least 100 different companies, contribute to every kernel release. In the past two years alone, over 3,200 developers from 200 companies have contributed to the kernel--which is just one small piece of a Linux distribution. This article will explore the various components of the Linux operating system, how they are created and work together, the communities of Linux, and Linux's incredible impact on the IT ecosystem.

Transcript of commands that's are commonly used in linux

Page 1: commands that's are commonly used in linux

What is Linux

Linux is, in simplest terms, an operating system. It is the software on a computer that enables applications and the computer operator to access the devices on the computer to perform desired functions. The operating system (OS) relays instructions from an application to, for instance, the computer's processor. The processor performs the instructed task, then sends the results back to the application via the operating system.Explained in these terms, Linux is very similar to other operating systems, such as Windows and OS X.But something sets Linux apart from these operating systems. The Linux operating system represented a $25 billion ecosystem in 2008. Since its inception in 1991, Linux has grown to become a force in computing, powering everything from the New York Stock Exchange to mobile phones to supercomputers to consumer devices.As an open operating system, Linux is developed collaboratively, meaning no one company is solely responsible for its development or ongoing support. Companies participating in the Linux economy share research and development costs with their partners and competitors. This spreading of development burden amongst individuals and companies has resulted in a large and efficient ecosystem and unheralded software innovation.Over 1,000 developers, from at least 100 different companies, contribute to every kernel release. In the past two years alone, over 3,200 developers from 200 companies have contributed to the kernel--which is just one small piece of a Linux distribution.This article will explore the various components of the Linux operating system, how they are created and work together, the communities of Linux, and Linux's incredible impact on the IT ecosystem.

Where is Linux?

One of the most noted properties of Linux is where it can be used. Windows and OS X are predominantly found on personal computing devices such as desktop and laptop computers. Other operating systems, such as Symbian, are found on small devices such as phones and PDAs, while mainframes and

Page 2: commands that's are commonly used in linux

supercomputers found in major academic and corporate labs use specialized operating systems such as AS/400 and the Cray OS.Linux, which began its existence as a server OS and Has become useful as a desktop OS, can also be used on all of these devices. “From wristwatches to supercomputers,” is the popular description of Linux' capabilities.

The Future of Linux

Linux is already successful on many different kinds of devices, but there are also many technological areas where Linux is moving towards, even as desktop and server development continues to grow faster than any other operating system today.Linux is being installed on the system BIOS of laptop and notebook computers, which will enable users to turn their devices on in a matter of seconds, bringing up a streamlined Linux environment. This environment will have Internet connectivity tools such as a web browser and an e-mail client, allowing users to work on the Internet without having to boot all the way into their device's primary operating system--even if that operating system is Windows.At the same time, Linux is showing up on mobile Internet devices (MIDs). This includes embedded devices such as smart phones and PDAs, as well as net book devices--small laptop-type machines that feature the core functionality of their larger counterparts in a smaller, more energy-efficient package.The growth of cloud computing is a natural fit for Linux, which already runs many of the Internet's web servers. Linux enables cloud services such as Amazon's A3 to work with superior capability to deliver online applications and information to users.Related to Linux' growth in cloud computing is the well-known success of Linux on supercomputers, both in the high-performance computing (HPC) and high-availability (HA) areas, where academic research in physics and bioengineering, and firms in the financial and energy industries need reliable and scalable computing power to accomplish their goals.Many of the popular Web 2.0 services on the Internet, such as Twitter, Linked In, YouTube, and Google all rely on Linux as their operating system. As new web services arrive in the future, Linux will increasingly be the platform that drives these new technologies.

Page 3: commands that's are commonly used in linux

The Birth of Linux

On August 25, 1991, a Finn computer science student named Linus Torvalds made the following announcement to the Usenet group comp.os.minux:"I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones. This has been brewing since april, and is starting to get ready. I'd like any feedback on things people like/dislike in minix, as my OS resembles it somewhat (same physical layout of the file-system (due to practical reasons) (among other things)."The “Minix” Torvalds referred to is a variant of the UNIX operating system, used as a guideline for his the free operating system he wanted to run on the x86-based consumer PCs of the day. “gnu” refers to the set of GNU (GNU Is Not Unix) tools first put together by Richard Stallman in 1983. UNIX, the operating system that started it all, had its origins in the old Bell Labs back in the early 60s.Torvalds built the core of the Linux operating system, known as the kernel. A kernel alone does not make an operating system, but Stallman's GNU tools were from a project to create an operating system as well--a project that was missing a kernel to make Stallman's operating system complete. Torvalds' matching of GNU tools with the Linux kernel marked the beginning of the Linux operating system as it is known today.Linux is in many ways still only at the beginning of its potential, even though it has enjoyed tremendous success since Torvalds' first request for help in 1991.Linux has gained strong popularity amongst UNIX developers, who like it for its portability to many platforms, its similarity to UNIX, and its free software license. Around the turn of the century, several commercial developers began to distribute Linux, including VA Linux, TurboLinux, Mandrakelinux, Red Hat, and SuSE GMbH. IBM's 2000 decision to invest $2 billion in Linux development and sales was a significant positive event to the growth of Linux.Today, Linux is a multi-billion dollar industry, with companies and governments around the world taking advantage of the operating system's security and flexibility. Thousands of companies use Linux for day-to-day use, attracted by the lower licensing and support costs. Governments around the world are deploying Linux to save money and time, with some governments commissioning their own versions of Linux.

Page 4: commands that's are commonly used in linux

The analyst group IDC has projected Linux will be a $49 billion business by 2011, and there are many indications in the market that this figure will be achieved.

The Code

Linux is also unique from other operating systems in that it has no single owner. Torvalds still manages the development of the Linux kernel, but commercial and private developers contribute other software to make the whole Linux operating system.

LINUX COMMANDS Login :-When we start linux then we have to enter login and passwordLogin:- rootPassword :- 12345678

Mkdir :- this command is used to make directory for store data, files, text ,etc. Syntax :- Mkdir directory name

Pwd :-this command is used to know the Present Working Directory used by user

It is used to check location. Pwd is root

Page 5: commands that's are commonly used in linux

Rmdir:-this command is used for Removing a Directory from the database

It is used to remove the existing directory

MV:- sometime we want to change our directory name due o some reason then MV command is used. This command help us to rename directorySyntax:-

Mv oldname new_name

CD (Change Directory ):- in dtatbase we make many directories for the work ,sometime we have to move to one directory to another then this command is used to change directory without exit another one

This command is used to enter inter in child directory

Ls (List directory content)

List information about the files(current directory by default) sort entries alphabetically

Page 6: commands that's are commonly used in linux

Ls-r:- This command is used to display files and directories in reverse order.

LS –s :- This command is used to flag lists file size.

Ls –c:- This command is used to d

LS –a :- This command is used to List all files including hidden file starting with ‘.‘.

Page 7: commands that's are commonly used in linux

Ls –R:- This command is used to list very long listing directory trees.

ls -A:- This command is used to d

Ls -L :- This command is used to shows file or directory, size, modified date and time, file or folder name and owner of file and it’s permission.

Page 8: commands that's are commonly used in linux

Ls-x:- This command is used to display the name of directories in alphabetically

Cat:- (Concatenates)

cat-v:- it use to display text files only it is used with executable files. It displays junk. Non printable characters can be displayed using –v option.

Page 9: commands that's are commonly used in linux

Cat –n:- it display number line where errors are detected. If –n version is not supported by vi pr is used.

Cat >>:-This command is used to enter the data into file

Cat –b:- This command is used to display the data without count any space

Cat –ns:- This command is used to display the text with space in counting

Page 10: commands that's are commonly used in linux

Who:- Who – b:- This command is used to display the time of the last system boot.

Who –l:- This command is used to Print system login processes.

Who –m:- This command is used to print Only information about the user and host associated with standard input (the terminal where the command was issued). This method adheres to the POSIX standard.

Who-t:- This command is used to Print the last time the system clock was changed, if the information is available.

Who am i:- This command is used to d

Page 11: commands that's are commonly used in linux

Who-q:- This command is used to displays all login names, and a count of all logged-on users.

Who-u:- This command is used to Print the idle time for each user, and the process ID.

Who:- This command is used to display the current user id

who –r:- This command is used to Print the current run level.

who –R:- This command is used to display the current user ,current date,time

Calendar commandCal:- This command is used to display the calendar.Syntax :- Cal [option]

Page 12: commands that's are commonly used in linux

Cal -3:- This command is used to displays prev/current/next month output

cal –m:- This command is used to displays Monday as the first day of the week.

cal –j:- This command is used to displays Julian dates (days one-based, numbered from January 1).

cal –s:- this command is used to displays Sunday as the first day of the week.

Page 13: commands that's are commonly used in linux

cal –y:- this command is used to displays a calendar for the current year.

Other command

cp command:- cp command is used to copy the data of one file to another file

Cat command:- this command is used to enter the data into the file and copy to another file

Page 14: commands that's are commonly used in linux

Date command:- this command s used to show the date of that day

Mkdir help:- some time we donot know some sub commands of any command then help command is used

Mkdir version:- This command output the version details and then exit it-m:-

Mkdir –m:- This command is used to set permission mode to the directory is that read,write, etc

Mkdir –v:- their v stand for verboseThis command print a message when any new directory is created

Page 15: commands that's are commonly used in linux

Touch command:- this command is used to create files in any directory

Unique command:- this command is used to print the data in the file

CMP COMMAND Compare two files  The cmp utility compares two files of any type and writes the results to the standard output. By default, cmp is silent if the files are the same; if they differ, the byte and line number at which the first difference occurred is reported.

Syntaxcmp [-l | -s ] file1 file2 [skip1 [skip2 ] ]  

Cmp –i: compare the the filles in bytes.

Cmp -l Print the byte number (decimal) and the differing byte values (octal) for each difference.

Page 16: commands that's are commonly used in linux

Sleep:- Sleep command is used to delay the particular process for a specified amount of timeSyntax:-sleep 30

Kill command is used to kill the running process Kill -9 pi Ps- ef

To find signal name

Page 17: commands that's are commonly used in linux

Kill –l 7

Kill –l

Page 18: commands that's are commonly used in linux

a) Chmod number file name .extension Ls –l file name .extension

7. MAN:- This command is used as help command .it provide information about particular command that gives with it.Syntax:-

Man another_commandExample:- lsThis command gives information about ls command.

Page 19: commands that's are commonly used in linux

MAN man:- ( give information about command)

WC COMMAND

print the number of bytes, words, and lines in files .SYNTAX: wc [OPTION]... [FILE]...

Page 20: commands that's are commonly used in linux

wc –c:- print the byte counts

wc -m:- print the character counts

wc –l:-print the newline counts

wc –L :-print the length of the longest line.

wc –w :-print the word counts.

MORE

Page 21: commands that's are commonly used in linux

More :- Syntax:- more -c file name

Less :-Syntax:-less –c file name

More:-Syntax:-more –d file name

Less:Syntax:- less -d file name

Page 22: commands that's are commonly used in linux

More:-Syntax:-more +3 file name

Less:-Syntax:- less +3 file nameLess:-Syntax:-less –e file name

Page 23: commands that's are commonly used in linux

Vi editorVi command:- this command is used to create file in which the user can code the data or print any messageSyntax:- vi file name that u want to give

The output of vi:-

Vi –rSyntax:-Vi –r file name

The output:-

Page 24: commands that's are commonly used in linux