You are on page 1of 18

Report

TP1
Linux administration

2021/2022

Created by : NKHILI Ouiame

1er année IRISTI


Contents :
1. Oracle VM VirtualBox definition.
2. Ubuntu definition.
3. Execution of commande.
1 . Oracle VM VirtualBox definition :
Oracle VM VirtualBox (formerly Sun VirtualBox, Sun xVM VirtualBox and
Innotek VirtualBox) is a type-2 hypervisor for x86 virtualization developed by
Oracle Corporation.
VirtualBox was originally created by Innotek GmbH, which was acquired by Sun
Microsystems in 2008, which was in turn acquired by Oracle in 2010.
VirtualBox may be installed on Microsoft Windows, macOS, Linux, Solaris and
OpenSolaris. There are also ports to FreeBSD and Genode. It supports the
creation and management of guest virtual machines running Windows, Linux,
BSD, OS/2, Solaris, Haiku, and OSx86, as well as limited virtualization of macOS
guests on Apple hardware. For some guest operating systems, a "Guest
Additions" package of device drivers and system applications is available, which
typically improves performance, especially that of graphics, and allows
changing the resolution of the guest OS automatically when the window of the
virtual machine on the host OS is resized.

2. Ubuntu definition :
is a Debian-based GNU / Linux operating system. It is developed, marketed and
maintained for personal computers (desktop), servers (Server) and connected
objects (Core) by the company Canonical.

Ubuntu is available in two versions, one which changes every six months, and
an LTS version, for Long Term Support, which changes every two years. Ubuntu
defines itself as “an operating system used by millions of PCs around the
world” 6 and with a “simple, intuitive, and secure” interface. It is the most used
distribution to access websites according to the Alexa site, and the most used
operating system for computer servers .

3 .Execution of command :

- Login command
Login is used when signing onto a system. It can also be used to switch from
one user to another at any time
Syntax :

- Cal command
cal command is a calendar command in Linux which is used to see the calendar
of a specific month or a whole year.
Syntax :

- Passwd command :

passwd command in Linux is used to change the user account passwords.


Syntax :
- ls-1 command
It sorts the file by modification time, showing the last edited file first. head -1
picks up this first file.To open the last edited file in the current directory use
the combination of ls and head commands.
Syntax :

- Whoami Command :
As its name suggests, the whoami command prints the user name of the
effective user ID. In other words, it displays the name of the currently logged-in
user.
Syntax :

- Users command :
users command in Linux system is used to show the user names of users
currently logged in to the current host.
Syntax :

- Who command :
The standard Unix command who displays a list of users who are currently
logged into the computer.
Syntax :

- W command :
The command w provides a quick summary of every user logged into a
computer.
Syntax :

- Log out command :


For finisher your session .
- System shut down :

halt :Brings the system down immediately

init 0 :Powers off the system using predefined scripts to synchronize and

clean up the system prior to shutting down

init 6 :Reboots the system by shutting it down completely and then

restarting it

Poweroff :Shuts down the system by powering off

Reboot :Reboots the system

Shutdown :Shuts down the system

- Starting the vi editor :

The VI editor is the most popular and classic text editor in the Linux family.
Below, are some reasons which make it a widely used editor :

 It is available in almost all Linux Distributions

 It works the same across different platforms and Distributions

 It is user-friendly. Hence, millions of Linux users love it and use it for their
editing needs

vi filename : Creates a new file if it does not already exist, otherwise


opens an existing file.
Syntax :
vi -R filename : Open an existing file in read-only mode.
Syntax :

view filename : Open an existing file in read-only mode.


Syntax :

- Move in a file

K : Moves the cursor one line up


Syntax :

J : Moves the cursor one down line


Syntax :

H : Moves the cursor to the position one character to the left


Syntax :
L : Moves the cursor to the right one character
Syntax :

- Control commands :
i
Inserts text before the current cursor location
Syntax :

l
Inserts text at the start of the current line
Syntax :

a
Inserts text after the current cursor location
Syntax :

A
Inserts text at the end of the current line
Syntax :
o
Creates a new line for entering text below the cursor location
Syntax :

O
Creates a new line for entering text above the cursor location
Syntax :

- Deleting characters :

x
Deletes the character under the cursor location
Syntax :

X
Deletes the character before the cursor location
Syntax :

dw
Remove from current cursor location to next word
Syntax :

d^
Remove from current cursor position to start of line

d$
Remove from current cursor position to end of line

D
Remove from cursor position to end of current line
Syntax :

dd
Delete the line where the cursor is located
Syntax :

- Edit command :
CC
Removes the contents of the row, leaving you in insert mode.
Syntax :

cw
Changes the word the cursor is on to the lowercase w end of the
word.

r
Replaces the character under the cursor. vi returns to command
mode after entering replacement.
Syntax :

R
Replaces multiple characters starting with the character currently
under the cursor. You must use Esc to stop overwriting.
Syntax :

s
Replaces the current character with the character you enter. Then
you are left in insert mode.
Syntax :

S
Removes the line the cursor is on and replaces it with the new
text. After entering new text, vi remains in insert mode.
- Copy and paste commands :

yy
Copy the current line.
Syntax :

yw
Copies the current word from the character on which the
lowercase w cursor is located, to the end of the word.
Syntax :

p
Places the copied text after the cursor.
Syntax :

P
Places dragged text before the cursor.
Syntax :

- Search for words and characters :

^
Search at the beginning of the line (Use at the beginning of a search
expression).
Syntax :
.
Matches a single character.
Syntax :

*
Matches zero or more of the previous character.
Syntax :

$
End of line (Use at the end of the search expression).
Syntax :

[
Starts a set of matching or non-matching expressions.
Syntax :

<
This is put in an escaped expression with the backslash to find the end or
the beginning of a word.
Syntax :

>
This allows you to see the description of the '<' character above.
Syntax :

- Define commands :

: set ic
Ignore case when searching
Syntax :

: set ai
Defines self-indentation
Syntax :
: set noai
Disable autoindentation
Syntax :
: naked set
Displays lines with line numbers on the left side

: set sw
Sets the width of a soft tab stop. For example, you would set an offset
width of 4 with this command -: set sw = 4

: set ws
If wrapscan is set and the word is not found at the bottom of the file, it
will try to search for it at the beginning

: set wm
If this option has a value greater than zero, the editor will automatically
perform a "word wrap". For example, to set the newline margin to two
characters, you would type this:: set wm = 2
Syntax :

: set ro
Change the file type to "read only"
Syntax :

: set term
Print terminal type
Syntax :
: set bf
Ignore input control characters

- Execute commands :
The substitution command (: s /)

The substitution command (:s/) enables you to quickly replace words or


groups of words within your files. Following is the syntax to replace text

You might also like