SlideShare a Scribd company logo
1 of 12
1. LINUX
Linux is a computer operating system assembled under the model of free and open source
software development and distribution. The defining component of Linux is the Linux kernel,
an operating system kernel first released on 5 October 1991, by Linus Torvalds. Since the C
compiler that builds Linux and the main supporting user space system tools and libraries
originated in the GNU Project, initiated in 1983 by Richard Stallman, the Free Software
Foundation prefers the name GNU/Linux when these tools and libraries are used.
Linux was originally developed as a free operating system for Intel x86-based personal
computers. It has since been ported to more computer hardware platforms than any other
operating system. It is a leading operating system on servers and other big iron systems such
as mainframe computers and supercomputers: more than 90% of today's 500 fastest
supercomputers run some variant of Linux, including the 10 fastest. Linux also runs on
embedded systems (devices where the operating system is typically built into the firmware
and highly tailored to the system) such as mobile phones, tablet computers, network routers,
building automation controls, televisions and video game consoles; the Android system in
wide use on mobile devices is built on the Linux kernel.
The development of Linux is one of the most prominent examples of free and open source
software collaboration: the underlying source code may be used, modified, and distributed—
commercially or non-commercially—by anyone under licenses such as the GNU General
Public License. Typically Linux is packaged in a format known as a Linux distribution for
desktop and server use. Some popular mainstream Linux distributions include Debian (and its
derivatives such as Ubuntu and Linux Mint), Fedora (and its derivatives such as the
commercial Red Hat Enterprise Linux and its open equivalent CentOS), Mandriva/Mageia,
openSUSE (and its commercial derivative SUSE Linux Enterprise Server), and Arch Linux.
Linux distributions include the Linux kernel, supporting utilities and libraries and usually a
large amount of application software to fulfil the distribution's intended use.
A distribution oriented toward desktop use will typically include the X Window System and
an accompanying desktop environment such as GNOME or KDE Plasma. Some such
distributions may include a less resource intensive desktop such as LXDE or Xfce for use on
older or less powerful computers. A distribution intended to run as a server may omit all
graphical environments from the standard install and instead include other software such as
the Apache HTTP Server and an SSH server such as OpenSSH. Because Linux is freely
redistributable, anyone may create a distribution for any intended use. Applications
commonly used with desktop Linux systems include the Mozilla Firefox web browser, the
LibreOffice office application suite, and the GIMP image editor.
Today, Linux systems are used in every domain, from embedded systems to supercomputers,
and have secured a place in server installations often using the popular LAMP application
stack. Use of Linux distributions in home and enterprise desktops has been growing. They
have also gained popularity with various local and national governments. The federal
government of Brazil is well known for its support for Linux. News of the Russian military
creating its own Linux distribution has also surfaced, and has come to fruition as the G.H.ost
Project. The Indian state of Kerala has gone to the extent of mandating that all state high
schools run Linux on their computers. China uses Linux exclusively as the operating system
for its Loongson processor family to achieve technology independence. In Spain some
regions have developed their own Linux distributions, which are widely used in education
and official institutions, like gnuLinEx in Extremadura and Guadalinex in Andalusia.
Portugal is also using its own Linux distribution Caixa Mágica, used in the Magalhães
netbook and the e-escola government program. France and Germany have also taken steps
toward the adoption of Linux.
Linux distributions have also become popular in the netbook market, with many devices such
as the ASUS Eee PC and Acer Aspire One shipping with customized Linux distributions
installed.
Torvalds continues to direct the development of the kernel. Stallman heads the Free Software
Foundation, which in turn supports the GNU components. Finally, individuals and
corporations develop third-party non-GNU components. These third-party components
comprise a vast body of work and may include both kernel modules and user applications and
libraries. Linux vendors and communities combine and distribute the kernel, GNU
components, and non-GNU components, with additional package management software in
the form of Linux distributions.
2. DESIGN
A Linux-based system is a modular Unix-like operating system. It derives much of its basic
design from principles established in Unix during the 1970s and 1980s. Such a system uses a
monolithic kernel, the Linux kernel, which handles process control, networking, and
peripheral and file system access. Device drivers are either integrated directly with the kernel
or added as modules loaded while the system is running.
Separate projects that interface with the kernel provide much of the system's higher-level
functionality. The GNU userland is an important part of most Linux-based systems, providing
the most common implementation of the C library, a popular shell, and many of the common
Unix tools which carry out many basic operating system tasks. The graphical user interface
(or GUI) used by most Linux systems is built on top of an implementation of the X Window
System.
Some components of an installed Linux system are:



A bootloader - for example GRUB or LILO. This is a program which is executed by
the computer when it is first turned on, and loads the Linux kernel into memory.
An init program. This is the first process launched by the Linux kernel, and is at the
root of the process tree: in other terms, all processes are launched through init. It starts




2.1.

processes such as system services and login prompts (whether graphical or in terminal
mode)
Software libraries which contain code which can be used by running processes. On
Linux systems using ELF-format executable files, the dynamic linker which manages
use of dynamic libraries is "ld-linux.so". The most commonly used software library
on Linux systems is the GNU C Library. If the system is set up for the user to compile
software themselves, header files will also be included to describe the interface of
installed libraries.
User interface programs such as command shells or windowing environments
USER INTERFACE

The user interface, also known as the shell, is either a command-line interface (CLI), a
graphical user interface (GUI), or through controls attached to the associated hardware, which
is common for embedded systems. For desktop systems, the default mode is usually a
graphical user interface, although the CLI is available through terminal emulator windows or
on a separate virtual console. Most low-level Linux components, including the GNU
userland, use the CLI exclusively. The CLI is particularly suited for automation of repetitive
or delayed tasks, and provides very simple inter-process communication.
On desktop systems, the most popular user interfaces are the extensive desktop environments
KDE Plasma Desktop, GNOME, Cinnamon, Unity and Xfce, though a variety of additional
user interfaces exist. Most popular user interfaces are based on the X Window System, often
simply called "X". It provides network transparency and permits a graphical application
running on one system to be displayed on another where a user may interact with the
application.
Other GUIs may be classified as simple X window managers, such as FVWM,
Enlightenment, and Window Maker, which provide a minimalist functionality with respect to
the desktop environments. A window manager provides a means to control the placement and
appearance of individual application windows, and interacts with the X Window System. The
desktop environments include window managers as part of their standard installations
(Mutter for GNOME, KWin for KDE, Xfwm for Xfce as of January 2012) although users
may choose to use a different window manager if preferred.
3. DEVELOPMENT


The primary difference between Linux and many other popular contemporary operating
systems is that the Linux kernel and other components are free and open source software.
Linux is not the only such operating system, although it is by far the most widely used.[60]
Some free and open source software licenses are based on the principle of copyleft, a kind
of reciprocity: any work derived from a copyleft piece of software must also be copyleft
itself. The most common free software license, the GNU General Public License (GPL),






is a form of copyleft, and is used for the Linux kernel and many of the components from
the GNU Project.
Linux based distributions are intended by developers for interoperability with other
operating systems and established computing standards. Linux systems adhere to
POSIX,[61] SUS,[62] LSB, ISO, and ANSI standards where possible, although to date only
one Linux distribution has been POSIX.1 certified, Linux-FT.[63][64]
Free software projects, although developed in a collaborative fashion, are often produced
independently of each other. The fact that the software licenses explicitly permit
redistribution, however, provides a basis for larger scale projects that collect the software
produced by stand-alone projects and make it available all at once in the form of a Linux
distribution.
Many Linux distributions, or "distros", manage a remote collection of system software
and application software packages available for download and installation through a
network connection. This allows users to adapt the operating system to their specific
needs. Distributions are maintained by individuals, loose-knit teams, volunteer
organizations, and commercial entities. A distribution is responsible for the default
configuration of the installed Linux kernel, general system security, and more generally
integration of the different software packages into a coherent whole. Distributions
typically use a package manager such as dpkg, Synaptic, YAST, yum, or Portage to
install, remove and update all of a system's software from one central location.

UBUNTU GRAPHICAL USER INTERFACE
http://www.ubuntu.com/tour/en/
http://news.cnet.com/8301-13554_3-9985154-33.html
BASIC LINUX COMMANDS
1.
Lists the contents of a directory / list files and directories in bare format where we won’t be able to
view details

ls
ls
ls
ls
ls
ls
ls
ls

-a
-i
-l
-r
-R
-s
-x

Shows you all files, even files that are hidden (these files begin with a dot.)
For each file, print the i-node number in the first column of the report.
Shows - permissions, owners, size, and when last modified.)
Reverses the order of how the files are displayed.
Includes the contents of subdirectories.
Give size in blocks, including indirect blocks, for each entry.
Displays files in columns.

Permissions

Directories

Group

Size

Date

Directory or file

drwx------

2

users

4096

Nov 2 19:51

mail/

drwxr-s---

35

www

32768

Jan 20 22:39

public_html/

-rw-------

1

users

3

Nov 25 02:58 test.txt

Permissions - The permissions of the directory or file.
Directories - The amount of links or directories within the directory. The default amount of
directories is going to always be 2 because of the . and .. directories.
Group - The group assigned to the file or directory
Size - Size of the file or directory.
Date - Date of last modification.
Directory of file - The name of the file or file.

2.
chmod

Changes the permission of a file. / file or directory permissions.

Following is a sample of ls -l command output. In this, the 9 characters from 2nd to 10th position
represents the permissions for the 3 types of users.
-rw-r--r-- 1 john john 272 Mar 17 08:22 test.txt
Permissions
u - User who owns the file. g - Group that owns the file. o - Other. a - All.
r - Read the file. w - Write or edit the file. x - Execute or run the file as a program.
1. Add single permission to a file/directory
Changing permission to a single set. + symbol means adding permission. For example, do the
following to give execute permission for the user irrespective of anything else:
2. Add multiple permission to a file/directory
Use comma to separate the multiple permission sets as shown below.
$ chmod u+r,g+x filename
3. Remove permission from a file/directory
Following example removes read and write permission for the user.
$ chmod u-rx filename
4. Change permission for all roles on a file/directory
Following example assigns execute privilege to user, group and others (basically anybody can
execute this file).
$ chmod a+x filename
5. Make permission for a file same as another file (using reference)
If you want to change a file permission same as another file, use the reference option as
shown below. In this example, file2′s permission will be set exactly same as file1′s
permission.
$ chmod --reference=file1 file2

3.
password

Both Linux and UNIX use the passwd command to change user password. The passwd
is used to update a user’s authentication token (password) stored in shadow file.

A normal user may only change the password for his/her own account, the super user (or root) may
change the password for any account. The administrator of a group may change the password for
the group. passwd also changes account information, such as the full name of the user, user's login
shell, or password expiry date and interval.
Set or Change User Password
Type passwd command as follows to change your own password:
$ passwd
Output:
Changing password for vivek
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

4.
su
su

su alice

Become super user or another user.
The su (short for substitute user) command makes it possible to change a login session's
owner (i.e., the user who originally created that session by logging on to the system)
without the owner having to first log out of that session.
The operating system assumes that, in the absence of a username, the user wants to
change to a root session, and thus the user is prompted for the root password as soon
as the ENTER key is pressed. This produces the same result as typing:
su root
Likewise, to transfer the ownership of a session to any other user, the name of that user
is typed after su and a space. For example, to change the owner of the current login
session to a user named alice, type the following:
su hope

The name of the current user can also be confirmed by using the whoami command,
i.e., whoami
Login as the user hope as if the user hope actually logged in (process all login scripts

5.
tty

The Linux "tty" command display the name of the connected terminal or Print filename of
terminal on stdin.
A tty command in Linux and other Unix-like operating systems is a shell command that can
be entered interactively or as part of a script to determine whether the output for the
script is a terminal (that is, to an interactive user) or to some other destination such as
another program or a printer.

6.
who command
As a Linux user, sometimes it is required to know some basic information like :




Time of last system boot
List of users logged-in
Current run level etc

Though this type of information can be obtained from various files in the Linux system but there is a
command line utility 'who' that does exactly the same for you. In this article, we will discuss the
capabilities and features provided by the 'who' command.
who - Get the information on currently logged in users
syntax
who [OPTION]... [ FILE | ARG1 ARG2 ]

-b, --boot time of last system boot
-m only hostname and user associated with stdin
-q, --count all login names and number of users logged on
-u, --users list users logged in --message
7. make

command

make - GNU make utility to maintain groups of programs

The purpose of the make utility is to determine automatically which pieces of a large program
need to be recompiled, and issue the commands to recompile them. The manual describes the
GNU implementation of make, which was written by Richard Stallman and Roland McGrath.
Our examples show C programs, since they are most common, but you can use make with
any programming language whose compiler can be run with a shell command. In fact, make
is not limited to programs. You can use it to describe any task where some files must be
updated automatically from others whenever the others change.
To prepare to use make, you must write a file called the makefile that describes the
relationships among files in your program, and the states the commands for updating each
file. In a program, typically the executable file is updated from object files, which are in turn
made by compiling source files.
Once a suitable makefile exists, each time you change some source files, this simple shell
command:
make
suffices to perform all necessary recompilations. The make program uses the makefile data
base and the last-modification times of the files to decide which of the files need to be
updated. For each of those files, it issues the commands recorded in the data base.
make executes commands in the makefile to update one or more target names, where name is
typically a program. If no -f option is present, make will look for the makefiles GNUmakefile,
makefile, and Makefile, in that order.
Create the Makefile for a Simple Compilation

Let us assume that you have the sample C program file called helloworld.c. Using cc
command, typically you would compile it as shown below.
$ cc -o helloworld helloworld.c

While you don’t need to use make for compiling single a program, the following example
will give you an idea on how to use make. Create a makefile as shown below.
$ vim makefile
helloworld : helloworld.c
cc -o helloworld helloworld.c

Execute make to create the helloworld executable as shown below.
$ make helloworld
(or)
$ make

8. rpm

command

RPM command is used for installing, uninstalling, upgrading, querying, listing, and checking
RPM packages on your Linux system.
RPM stands for Red Hat Package Manager.
There are five basic modes for RPM command
1.
2.
3.
4.
5.

Install : It is used to install any RPM package.
Remove : It is used to erase, remove or un-install any RPM package.
Upgrade : It is used to update the existing RPM package.
Verify : It is used to query about different RPM packages.
Query : It is used for the verification of any RPM package.

With root privilege, you can use the rpm command with appropriate options to manage the
RPM software packages.
In this article, let us review 15 practical examples of rpm command.
Let us take an rpm of Mysql Client and run through all our examples.
Syntax
rpm - RPM Package Manager

9) yum command
yum - Yellowdog Updater Modified
yum

is

an interactive, automated update program which can be used for
maintaining systems using rpm

Syntax
yum [options] [command] [package ...]
The following are the ways which you can invoke yum in list mode. Note
that all list commands include information on the version of the
pack-
age.
yum list [all | regexp1] [regexp2] [...]
List all available and installed packages.
yum list available [regexp1] [...]
List all packages in the yum repositories
installed.

List

available

to

be

yum list updates [regexp1] [...]
all packages with updates available in the yum repositories.

yum list installed [regexp1] [...]
List the packages specified by args. If an argument does not match the
name of an available package, it is assumed to be a shell-style glob and
any matches are printed.
yum list extras [regexp1] [...]
List the packages installed on the system that are not available
yum repository listed in the config file.

in any

yum list obsoletes [regexp1] [...]
List the packages installed on the system that are obsolete by packages in
any yum repository listed in the config file.
yum list recent
List packages recently added into the repositories.
Specifying package names
All the list options mentioned above take file-glob-syntax wild-cards or
package names as arguments, for example yum list avail-able foo* will list
all available packages that match foo*.

9) sudo command
sudo - execute a command as another user / Allows a user with proper permissions to execute a
command as the superuser or other user.

sudo allows a permitted user to execute a command as the superuser or another user, as specified in
the sudoers file. The real and effective uid and gid are set to match those of the target user as
specified in the passwd file (the group vector is also initialized when the target user is not root). By
default, sudo requires that users authenticate themselves with a password (NOTE: by default this is
the user's password, not the root password). Once a user has been authenticated, a timestamp is
updated and the user may then use sudo without a password for a short period of time (5
minutes unless overridden in sudoers).
The sudo command stands for "superuser do". It prompts you for your personal password and
confirms your request to execute a command by checking a file, called sudoers, which the system
administrator configures. Using the sudoers file, system administrators can give certain users or
groups access to some or all commands without those users having to know the root password. It
also logs all commands and arguments so there is a record of who used it for what, and when.

To use the sudo command, at the command prompt, enter:
sudo command
Replace command with the command for which you want to use sudo.
The sudo command also makes it easier to practice the principle of least privilege (PoLP),
which is a computer security concept that helps control system access and potential system
exploits and compromises. For more information about the sudo command,

Examples
su -u hope ls ~hope
List the contents of the hope directory as the hope user.

10) shutdown -- command
shutdown - bring the system down or Turn off the computer immediately or at a specified
time.

shutdown brings the system down in a secure way. All logged-in users are notified that the system is
going down, and login(1) is blocked. It is possible to shut the system down immediately or after a
specified delay. All processes are first notified that the system is going down by the signal SIGTERM.
This gives programs like vi(1) the time to save the file being edited, mail and news processing
programs a chance to exit cleanly, etc. shutdown does its job by signalling the init process, asking it
to change the runlevel. Runlevel 0 is used to halt the system, runlevel 6 is used to reboot the system,
and runlevel 1 is used to put to system into a state where administrative tasks can be performed;
this is the default if neither the -h or -r flag is given to shutdown. To see which actions are taken on
halt or reboot see the appropriate entries for these runlevels in the file /etc/inittab.
Syntax
shutdown [-a][-t sec][-krhnfFc][time][warning-message]

-a
-t sec
-k
-r
-h
-n
-f
-F
-c
time
warningmessage

Use /etc/shutdown.allow.
Tell init to wait sec seconds between sending processes the warning and the kill
signal, before changing to another runlevel.
Don't really shutdown; only send the warning messages to everybody.
Reboot after shutdown.
Halt after shutdown.
Don't call init to do the shutdown but do it ourselves. The use of this option is
discouraged, and its results are not always what you'd expect.
Skip fsck on reboot.
Force fsck on reboot.
Cancel an already running shutdown. With this option it is of course not possible
to give the time argument, but you can enter an explanatory message on the
command line that will be sent to all users.
When to shutdown.
Message to send to all users.

Examples
shutdown 8:00
Shutdown the computer at 8-oclock

*** *** ***

More Related Content

Recently uploaded

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 

Recently uploaded (20)

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Assignment 9 : Linux GUI and Commands

  • 1. 1. LINUX Linux is a computer operating system assembled under the model of free and open source software development and distribution. The defining component of Linux is the Linux kernel, an operating system kernel first released on 5 October 1991, by Linus Torvalds. Since the C compiler that builds Linux and the main supporting user space system tools and libraries originated in the GNU Project, initiated in 1983 by Richard Stallman, the Free Software Foundation prefers the name GNU/Linux when these tools and libraries are used. Linux was originally developed as a free operating system for Intel x86-based personal computers. It has since been ported to more computer hardware platforms than any other operating system. It is a leading operating system on servers and other big iron systems such as mainframe computers and supercomputers: more than 90% of today's 500 fastest supercomputers run some variant of Linux, including the 10 fastest. Linux also runs on embedded systems (devices where the operating system is typically built into the firmware and highly tailored to the system) such as mobile phones, tablet computers, network routers, building automation controls, televisions and video game consoles; the Android system in wide use on mobile devices is built on the Linux kernel. The development of Linux is one of the most prominent examples of free and open source software collaboration: the underlying source code may be used, modified, and distributed— commercially or non-commercially—by anyone under licenses such as the GNU General Public License. Typically Linux is packaged in a format known as a Linux distribution for desktop and server use. Some popular mainstream Linux distributions include Debian (and its derivatives such as Ubuntu and Linux Mint), Fedora (and its derivatives such as the commercial Red Hat Enterprise Linux and its open equivalent CentOS), Mandriva/Mageia, openSUSE (and its commercial derivative SUSE Linux Enterprise Server), and Arch Linux. Linux distributions include the Linux kernel, supporting utilities and libraries and usually a large amount of application software to fulfil the distribution's intended use. A distribution oriented toward desktop use will typically include the X Window System and an accompanying desktop environment such as GNOME or KDE Plasma. Some such distributions may include a less resource intensive desktop such as LXDE or Xfce for use on older or less powerful computers. A distribution intended to run as a server may omit all graphical environments from the standard install and instead include other software such as the Apache HTTP Server and an SSH server such as OpenSSH. Because Linux is freely redistributable, anyone may create a distribution for any intended use. Applications commonly used with desktop Linux systems include the Mozilla Firefox web browser, the LibreOffice office application suite, and the GIMP image editor. Today, Linux systems are used in every domain, from embedded systems to supercomputers, and have secured a place in server installations often using the popular LAMP application stack. Use of Linux distributions in home and enterprise desktops has been growing. They have also gained popularity with various local and national governments. The federal
  • 2. government of Brazil is well known for its support for Linux. News of the Russian military creating its own Linux distribution has also surfaced, and has come to fruition as the G.H.ost Project. The Indian state of Kerala has gone to the extent of mandating that all state high schools run Linux on their computers. China uses Linux exclusively as the operating system for its Loongson processor family to achieve technology independence. In Spain some regions have developed their own Linux distributions, which are widely used in education and official institutions, like gnuLinEx in Extremadura and Guadalinex in Andalusia. Portugal is also using its own Linux distribution Caixa Mágica, used in the Magalhães netbook and the e-escola government program. France and Germany have also taken steps toward the adoption of Linux. Linux distributions have also become popular in the netbook market, with many devices such as the ASUS Eee PC and Acer Aspire One shipping with customized Linux distributions installed. Torvalds continues to direct the development of the kernel. Stallman heads the Free Software Foundation, which in turn supports the GNU components. Finally, individuals and corporations develop third-party non-GNU components. These third-party components comprise a vast body of work and may include both kernel modules and user applications and libraries. Linux vendors and communities combine and distribute the kernel, GNU components, and non-GNU components, with additional package management software in the form of Linux distributions. 2. DESIGN A Linux-based system is a modular Unix-like operating system. It derives much of its basic design from principles established in Unix during the 1970s and 1980s. Such a system uses a monolithic kernel, the Linux kernel, which handles process control, networking, and peripheral and file system access. Device drivers are either integrated directly with the kernel or added as modules loaded while the system is running. Separate projects that interface with the kernel provide much of the system's higher-level functionality. The GNU userland is an important part of most Linux-based systems, providing the most common implementation of the C library, a popular shell, and many of the common Unix tools which carry out many basic operating system tasks. The graphical user interface (or GUI) used by most Linux systems is built on top of an implementation of the X Window System. Some components of an installed Linux system are:   A bootloader - for example GRUB or LILO. This is a program which is executed by the computer when it is first turned on, and loads the Linux kernel into memory. An init program. This is the first process launched by the Linux kernel, and is at the root of the process tree: in other terms, all processes are launched through init. It starts
  • 3.   2.1. processes such as system services and login prompts (whether graphical or in terminal mode) Software libraries which contain code which can be used by running processes. On Linux systems using ELF-format executable files, the dynamic linker which manages use of dynamic libraries is "ld-linux.so". The most commonly used software library on Linux systems is the GNU C Library. If the system is set up for the user to compile software themselves, header files will also be included to describe the interface of installed libraries. User interface programs such as command shells or windowing environments USER INTERFACE The user interface, also known as the shell, is either a command-line interface (CLI), a graphical user interface (GUI), or through controls attached to the associated hardware, which is common for embedded systems. For desktop systems, the default mode is usually a graphical user interface, although the CLI is available through terminal emulator windows or on a separate virtual console. Most low-level Linux components, including the GNU userland, use the CLI exclusively. The CLI is particularly suited for automation of repetitive or delayed tasks, and provides very simple inter-process communication. On desktop systems, the most popular user interfaces are the extensive desktop environments KDE Plasma Desktop, GNOME, Cinnamon, Unity and Xfce, though a variety of additional user interfaces exist. Most popular user interfaces are based on the X Window System, often simply called "X". It provides network transparency and permits a graphical application running on one system to be displayed on another where a user may interact with the application. Other GUIs may be classified as simple X window managers, such as FVWM, Enlightenment, and Window Maker, which provide a minimalist functionality with respect to the desktop environments. A window manager provides a means to control the placement and appearance of individual application windows, and interacts with the X Window System. The desktop environments include window managers as part of their standard installations (Mutter for GNOME, KWin for KDE, Xfwm for Xfce as of January 2012) although users may choose to use a different window manager if preferred. 3. DEVELOPMENT  The primary difference between Linux and many other popular contemporary operating systems is that the Linux kernel and other components are free and open source software. Linux is not the only such operating system, although it is by far the most widely used.[60] Some free and open source software licenses are based on the principle of copyleft, a kind of reciprocity: any work derived from a copyleft piece of software must also be copyleft itself. The most common free software license, the GNU General Public License (GPL),
  • 4.    is a form of copyleft, and is used for the Linux kernel and many of the components from the GNU Project. Linux based distributions are intended by developers for interoperability with other operating systems and established computing standards. Linux systems adhere to POSIX,[61] SUS,[62] LSB, ISO, and ANSI standards where possible, although to date only one Linux distribution has been POSIX.1 certified, Linux-FT.[63][64] Free software projects, although developed in a collaborative fashion, are often produced independently of each other. The fact that the software licenses explicitly permit redistribution, however, provides a basis for larger scale projects that collect the software produced by stand-alone projects and make it available all at once in the form of a Linux distribution. Many Linux distributions, or "distros", manage a remote collection of system software and application software packages available for download and installation through a network connection. This allows users to adapt the operating system to their specific needs. Distributions are maintained by individuals, loose-knit teams, volunteer organizations, and commercial entities. A distribution is responsible for the default configuration of the installed Linux kernel, general system security, and more generally integration of the different software packages into a coherent whole. Distributions typically use a package manager such as dpkg, Synaptic, YAST, yum, or Portage to install, remove and update all of a system's software from one central location. UBUNTU GRAPHICAL USER INTERFACE http://www.ubuntu.com/tour/en/ http://news.cnet.com/8301-13554_3-9985154-33.html
  • 5. BASIC LINUX COMMANDS 1. Lists the contents of a directory / list files and directories in bare format where we won’t be able to view details ls ls ls ls ls ls ls ls -a -i -l -r -R -s -x Shows you all files, even files that are hidden (these files begin with a dot.) For each file, print the i-node number in the first column of the report. Shows - permissions, owners, size, and when last modified.) Reverses the order of how the files are displayed. Includes the contents of subdirectories. Give size in blocks, including indirect blocks, for each entry. Displays files in columns. Permissions Directories Group Size Date Directory or file drwx------ 2 users 4096 Nov 2 19:51 mail/ drwxr-s--- 35 www 32768 Jan 20 22:39 public_html/ -rw------- 1 users 3 Nov 25 02:58 test.txt Permissions - The permissions of the directory or file. Directories - The amount of links or directories within the directory. The default amount of directories is going to always be 2 because of the . and .. directories. Group - The group assigned to the file or directory Size - Size of the file or directory. Date - Date of last modification. Directory of file - The name of the file or file. 2. chmod Changes the permission of a file. / file or directory permissions. Following is a sample of ls -l command output. In this, the 9 characters from 2nd to 10th position represents the permissions for the 3 types of users. -rw-r--r-- 1 john john 272 Mar 17 08:22 test.txt Permissions u - User who owns the file. g - Group that owns the file. o - Other. a - All. r - Read the file. w - Write or edit the file. x - Execute or run the file as a program. 1. Add single permission to a file/directory Changing permission to a single set. + symbol means adding permission. For example, do the following to give execute permission for the user irrespective of anything else: 2. Add multiple permission to a file/directory Use comma to separate the multiple permission sets as shown below. $ chmod u+r,g+x filename
  • 6. 3. Remove permission from a file/directory Following example removes read and write permission for the user. $ chmod u-rx filename 4. Change permission for all roles on a file/directory Following example assigns execute privilege to user, group and others (basically anybody can execute this file). $ chmod a+x filename 5. Make permission for a file same as another file (using reference) If you want to change a file permission same as another file, use the reference option as shown below. In this example, file2′s permission will be set exactly same as file1′s permission. $ chmod --reference=file1 file2 3. password Both Linux and UNIX use the passwd command to change user password. The passwd is used to update a user’s authentication token (password) stored in shadow file. A normal user may only change the password for his/her own account, the super user (or root) may change the password for any account. The administrator of a group may change the password for the group. passwd also changes account information, such as the full name of the user, user's login shell, or password expiry date and interval. Set or Change User Password Type passwd command as follows to change your own password: $ passwd Output: Changing password for vivek (current) UNIX password: Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully 4. su su su alice Become super user or another user. The su (short for substitute user) command makes it possible to change a login session's owner (i.e., the user who originally created that session by logging on to the system) without the owner having to first log out of that session. The operating system assumes that, in the absence of a username, the user wants to change to a root session, and thus the user is prompted for the root password as soon as the ENTER key is pressed. This produces the same result as typing: su root Likewise, to transfer the ownership of a session to any other user, the name of that user is typed after su and a space. For example, to change the owner of the current login session to a user named alice, type the following:
  • 7. su hope The name of the current user can also be confirmed by using the whoami command, i.e., whoami Login as the user hope as if the user hope actually logged in (process all login scripts 5. tty The Linux "tty" command display the name of the connected terminal or Print filename of terminal on stdin. A tty command in Linux and other Unix-like operating systems is a shell command that can be entered interactively or as part of a script to determine whether the output for the script is a terminal (that is, to an interactive user) or to some other destination such as another program or a printer. 6. who command As a Linux user, sometimes it is required to know some basic information like :    Time of last system boot List of users logged-in Current run level etc Though this type of information can be obtained from various files in the Linux system but there is a command line utility 'who' that does exactly the same for you. In this article, we will discuss the capabilities and features provided by the 'who' command. who - Get the information on currently logged in users syntax who [OPTION]... [ FILE | ARG1 ARG2 ] -b, --boot time of last system boot -m only hostname and user associated with stdin -q, --count all login names and number of users logged on -u, --users list users logged in --message
  • 8. 7. make command make - GNU make utility to maintain groups of programs The purpose of the make utility is to determine automatically which pieces of a large program need to be recompiled, and issue the commands to recompile them. The manual describes the GNU implementation of make, which was written by Richard Stallman and Roland McGrath. Our examples show C programs, since they are most common, but you can use make with any programming language whose compiler can be run with a shell command. In fact, make is not limited to programs. You can use it to describe any task where some files must be updated automatically from others whenever the others change. To prepare to use make, you must write a file called the makefile that describes the relationships among files in your program, and the states the commands for updating each file. In a program, typically the executable file is updated from object files, which are in turn made by compiling source files. Once a suitable makefile exists, each time you change some source files, this simple shell command: make suffices to perform all necessary recompilations. The make program uses the makefile data base and the last-modification times of the files to decide which of the files need to be updated. For each of those files, it issues the commands recorded in the data base. make executes commands in the makefile to update one or more target names, where name is typically a program. If no -f option is present, make will look for the makefiles GNUmakefile, makefile, and Makefile, in that order. Create the Makefile for a Simple Compilation Let us assume that you have the sample C program file called helloworld.c. Using cc command, typically you would compile it as shown below. $ cc -o helloworld helloworld.c While you don’t need to use make for compiling single a program, the following example will give you an idea on how to use make. Create a makefile as shown below. $ vim makefile helloworld : helloworld.c cc -o helloworld helloworld.c Execute make to create the helloworld executable as shown below. $ make helloworld (or)
  • 9. $ make 8. rpm command RPM command is used for installing, uninstalling, upgrading, querying, listing, and checking RPM packages on your Linux system. RPM stands for Red Hat Package Manager. There are five basic modes for RPM command 1. 2. 3. 4. 5. Install : It is used to install any RPM package. Remove : It is used to erase, remove or un-install any RPM package. Upgrade : It is used to update the existing RPM package. Verify : It is used to query about different RPM packages. Query : It is used for the verification of any RPM package. With root privilege, you can use the rpm command with appropriate options to manage the RPM software packages. In this article, let us review 15 practical examples of rpm command. Let us take an rpm of Mysql Client and run through all our examples. Syntax rpm - RPM Package Manager 9) yum command yum - Yellowdog Updater Modified yum is an interactive, automated update program which can be used for maintaining systems using rpm Syntax yum [options] [command] [package ...] The following are the ways which you can invoke yum in list mode. Note that all list commands include information on the version of the pack-
  • 10. age. yum list [all | regexp1] [regexp2] [...] List all available and installed packages. yum list available [regexp1] [...] List all packages in the yum repositories installed. List available to be yum list updates [regexp1] [...] all packages with updates available in the yum repositories. yum list installed [regexp1] [...] List the packages specified by args. If an argument does not match the name of an available package, it is assumed to be a shell-style glob and any matches are printed. yum list extras [regexp1] [...] List the packages installed on the system that are not available yum repository listed in the config file. in any yum list obsoletes [regexp1] [...] List the packages installed on the system that are obsolete by packages in any yum repository listed in the config file. yum list recent List packages recently added into the repositories. Specifying package names All the list options mentioned above take file-glob-syntax wild-cards or package names as arguments, for example yum list avail-able foo* will list all available packages that match foo*. 9) sudo command sudo - execute a command as another user / Allows a user with proper permissions to execute a command as the superuser or other user. sudo allows a permitted user to execute a command as the superuser or another user, as specified in the sudoers file. The real and effective uid and gid are set to match those of the target user as specified in the passwd file (the group vector is also initialized when the target user is not root). By default, sudo requires that users authenticate themselves with a password (NOTE: by default this is the user's password, not the root password). Once a user has been authenticated, a timestamp is
  • 11. updated and the user may then use sudo without a password for a short period of time (5 minutes unless overridden in sudoers). The sudo command stands for "superuser do". It prompts you for your personal password and confirms your request to execute a command by checking a file, called sudoers, which the system administrator configures. Using the sudoers file, system administrators can give certain users or groups access to some or all commands without those users having to know the root password. It also logs all commands and arguments so there is a record of who used it for what, and when. To use the sudo command, at the command prompt, enter: sudo command Replace command with the command for which you want to use sudo. The sudo command also makes it easier to practice the principle of least privilege (PoLP), which is a computer security concept that helps control system access and potential system exploits and compromises. For more information about the sudo command, Examples su -u hope ls ~hope List the contents of the hope directory as the hope user. 10) shutdown -- command shutdown - bring the system down or Turn off the computer immediately or at a specified time. shutdown brings the system down in a secure way. All logged-in users are notified that the system is going down, and login(1) is blocked. It is possible to shut the system down immediately or after a specified delay. All processes are first notified that the system is going down by the signal SIGTERM. This gives programs like vi(1) the time to save the file being edited, mail and news processing programs a chance to exit cleanly, etc. shutdown does its job by signalling the init process, asking it to change the runlevel. Runlevel 0 is used to halt the system, runlevel 6 is used to reboot the system, and runlevel 1 is used to put to system into a state where administrative tasks can be performed; this is the default if neither the -h or -r flag is given to shutdown. To see which actions are taken on halt or reboot see the appropriate entries for these runlevels in the file /etc/inittab.
  • 12. Syntax shutdown [-a][-t sec][-krhnfFc][time][warning-message] -a -t sec -k -r -h -n -f -F -c time warningmessage Use /etc/shutdown.allow. Tell init to wait sec seconds between sending processes the warning and the kill signal, before changing to another runlevel. Don't really shutdown; only send the warning messages to everybody. Reboot after shutdown. Halt after shutdown. Don't call init to do the shutdown but do it ourselves. The use of this option is discouraged, and its results are not always what you'd expect. Skip fsck on reboot. Force fsck on reboot. Cancel an already running shutdown. With this option it is of course not possible to give the time argument, but you can enter an explanatory message on the command line that will be sent to all users. When to shutdown. Message to send to all users. Examples shutdown 8:00 Shutdown the computer at 8-oclock *** *** ***