Discovering The concepts of linux

Discovering The concepts of linux

Linux workshop - Day 2

Hello everyone ;

I am Teertha Darekar This blog of mine is based on the Day 2 of linux workshop conducted by Pranav Jambare sir .

CONTENTS :

  • Remote copying tools

  • Archive Tools

  • User Management

    Let's Dive into the day 2 of Linux workshop

REMOTE COPYING TOOLS

-> SCP

SCP is a command line tool in linux distributions; It is used to copy files and directories accross the systems securely over the network

SCP Command Syntax

scp <filename> <username>@<Ip address>:<destination>

-> RSYNC

Rsync is a command-line tool for copying files and directories between local and remote system It has an algorithm which make the process much faster.

RYSNC command syntax

rsync -av <filename> <username>@<Ip address>:<destination>

-> SFTP

Sftp means secure file transfer protocol It supports all the full security and authentication functionality

SFTP command syntax

sftp <username>@<Ip address>

ARCHIVING TOOLS

-> gzip

gzip is standard and widely used file compression and decompression utility gzip allows file concatination . The gzip command compresses the specified files , giving them a ".g" extension.

Syntax :- gzip <filename>

-> gunzip

The files are uncompresssed using the gunzip command

Syntax:- gunzip <filename>.gz

-> xz

xz creates much more smaller archives than gzip while using the same options as gzip

Syntax :- xz <filename>

-> unxz

The files are uncompressed using the unxz command

Syntax:- unxz <filename>.xz

-> bzip2

The bzip2 is anaother compression method in linux . It is a high quality data compressor compared to others.

Syntax:- bzip2 <filename>

-> bunzip2

The files are uncompressed using bunzip2

Syntax :- bunzip2 <filename>.bz2

BACKUP

-> tar

It is used to create Archieve and extract the archieve files. It is one of the important command which provides archiving functionality in linux .

Syntax :-

tar -cvzf <backup> <sourcefile>

here c-create, v-verbous, z-zip, f-file

-> Extract tar file:-

Syntax :-

tar -xvf <backup>

here x-extract ,v-verbous, f-file

USER MANAGEMENT

  • Add user command:-

useradd <username>

  • Verify user command:-

id <username>

  • Delete user command :-

userdel <username>

  • Manage the password policy command:-

cat /etc/passwd|tail -1

  • Change / Restrict user

  • Give “NO LOGIN” to user command :-

usermod <username> -s /sbin/nologin

  • Revert the changes to get a login command :-

usermod <username> -s /bin/sh

  • Lock and unlock user command to lock user :-

usermod -L <username>

  • command to unlock user :-

usermod -U <username>

  • Adding group command :-

groupadd <groupname>

  • Add user to group command :-

usermod -G <groupname>

  • Deleting group command :-

groupdel <groupname>

  • Change id of the user command:-

usermod -u <new_id > <username>

These are all the concepts covered on day 2

Thankyou....