Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
21 views13 pages

Dev Ops Exp 1

learning devops

Uploaded by

71762105014
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views13 pages

Dev Ops Exp 1

learning devops

Uploaded by

71762105014
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Dev-ops Laboratry

NAME : DHILEEP D EXP NO : 01

ROLL NO : 2105014 DATE : 16-02-24

File and disk management:


ls Lists files and directories in current directory
kvmja@LAPTOP-R1G4F0FA MINGW64 /d/CIT_SEM-6/DevOps-Lab
$ ls
a-practical-guide-to-git-and-github-for-windows-users-from-beginner-expert-in--
pr_3db1dc271a9fb555a83687ecd52385eb.pdf
chap4-practice.docx
week-1.docx
week-2.docx
'~$week-1.docx'

ls - l Lists files and directories with information such as permissions,


ownership, size and modification date

$ls -l
total 16389
-rw-r--r-- 1 kvmja 197609 16727623 Mar 7 12:11 a-practical-guide-to-git-and-github-for-
windows-users-from-beginner-expert-in--pr_3db1dc271a9fb555a83687ecd52385eb.pdf
-rw-r--r-- 1 kvmja 197609 19793 Mar 7 12:57 chap4-practice.docx
-rw-r--r-- 1 kvmja 197609 18199 Feb 23 09:20 week-1.docx
-rw-r--r-- 1 kvmja 197609 11990 Feb 23 11:59 week-2.docx
-rw-r--r-- 1 kvmja 197609 162 Mar 20 07:06 '~$week-1.docx'

ls -a Lists all files and directories including hidden ones


kvmja@LAPTOP-R1G4F0FA MINGW64 /d/CIT_SEM-6/DevOps-Lab
$ ls -a
./
../
a-practical-guide-to-git-and-github-for-windows-users-from-beginner-expert-in--
pr_3db1dc271a9fb555a83687ecd52385eb.pdf
chap4-practice.docx
week-1.docx
week-2.docx
'~$week-1.docx'
cat -b Inserts line numbers to non-blank line
admin@DESKTOP-5EIPL5P MINGW64 ~/Desktop/git_practice
$ cat -b demo.txt
1 Hi I am Muthu
2 I am from cse department
3 My native is Tenkasi
4 :wq
cat -n Inserts line numbers to all lines

admin@DESKTOP-5EIPL5P MINGW64 ~/Desktop/git_practice


$ cat -n demo.txt
1 Hi I am Muthu
2 I am from cse department
3 My native is Tenkasi
4 :wq
cat -s Squeezes multiple blank lines into a single blank line while displaying the
file contents
admin@DESKTOP-5EIPL5P MINGW64 ~/Desktop/git_practice
$ cat -s demo.txt
Hi I am Muthu
I am from cse department
My native is Tenkasi

end
cat –E Displays contents of a file ending with a $ symbol in each line
admin@DESKTOP-5EIPL5P MINGW64 ~/Desktop/git_practice
$ cat -e demo.txt
Hi I am Muthu$
I am from cse department$
My native is Tenkasi$
:wq$
chmod Changes permissions of a file or directory
chown Changes ownership of a file or directory
dd Copies raw data from one file/ device to another
admin@DESKTOP-5EIPL5P MINGW64 ~/Desktop/git_practice
$ dd if=test.txt of=new_demo.txt
0+1 records in
0+1 records out
113 bytes copied, 0.0011164 s, 101 kB/s
tail Displays last 10 lines of a specified file
admin@DESKTOP-5EIPL5P MINGW64 ~/Desktop/git_practice
$ tail demo.txt
end
find Finds files and directories based on specific criteria
admin@DESKTOP-5EIPL5P MINGW64 ~/Desktop/git_practice
$ find ./ *.txt
./
./demo.txt
./new.txt
./new_demo.txt
./test.txt
demo.txt
new.txt
new_demo.txt
test.txt

scp Copies securely files between hosts on a network using SSH (Secure Shell)
protocol
df Estimates space used by entire file system

admin@DESKTOP-5EIPL5P MINGW64 ~/Desktop/git_practice


$ df
Filesystem 1K-blocks Used Available Use% Mounted on
C:/Program Files/Git 409037820 23237780 385800040 6% /
D: 66559996 110440 66449556 1% /d
du displays the amount of disk space used by individual file
admin@DESKTOP-5EIPL5P MINGW64 ~/Desktop/git_practice
$ du
8 .
Pwd This command will print your directory location, where you currently
admin@DESKTOP-5EIPL5P MINGW64 ~/Desktop/git_practice
$ pwd
/c/Users/admin/Desktop/git_practice

Text Manipulation:
sort -r: Sorts the output in reverse order.

sort -n: Sorts the output numerically.

sort -f: Sorts the output ignoring the case.

cut: Extracts specific portion from a file or input stream.

diff: Compares two files and displays the differences between them.

tr: Translates or deletes characters from standard input and writes to standard output.
sed: Editor used for modifying text.

uniq: Filters out duplicate lines in a file.

Vim: Text editor used in Linux.

System Information:
uname -o: Displays the operating system name.
uname -m: Displays the machine hardware name.
uname -r: Displays the kernel release number.
lscpu: Displays information about the CPU.

Text Searching:
grep -i: Performs a case-insensitive search.
grep -n: Displays the line numbers of the matched pattern.
grep -v: Inverts the search and displays all lines that do not match the pattern.
grep -c: Shows a count of the number of lines that match the pattern.

User Group Management:


sudo useradd <username>: Creates a new user account with the specified username.
sudo passwd <username>: Changes the password for the specified user.
sudo userdel <username>: Deletes the specified user account from the system.
sudo groupadd <groupname>: Creates a new group with the specified group name.
sudo groupdel <groupname>: Deletes the specified group from the system.
sudo usermod -g <groupname> <username>: Modifies the primary group of the
specified user to the specified group.
id: Displays the user ID (uid) and group ID (gid) of the current user.
id -g <groupname>: Displays the group ID (gid) of the specified group.
id -u <username>: Displays the user ID (uid) of the specified user.
id <username>: Displays the user ID (uid), group ID (gid), and supplementary group
IDs (sgid) of specified user.

Process Management:

htop: Interactive process viewer that displays system resource usage in real-time.
ps: Lists information about currently running processes.

kill: Sends a signal to a process to terminate it.

history: Displays the list of previously executed commands.

free: Displays the amount of free and used memory in the system.

Package Management:
apt-get: Handles packages on Ubuntu-based systems.
sudo apt-get remove: Removes a package from the system.

Network Configuration & Monitoring:


ifconfig: Displays network interface configuration information.

ifconfig -a: Displays all interface available even if those are down.
ifconfig -s: Displays short list of network interface.

ip: Displays and manages routing, devices, and tunnels.


ip address: Displays all IP addresses related with all network devices.

ip link: Shows all network interfaces available on the system.

nslookup: Queries the DNS server for information about a domain name or IP address.

route: Access the Linux kernel's routing tables.


iptables: Sets up, maintains, and inspects the tables of IPv4/IPv6 packet filter rules in
the Linux kernel firewall.

netstat: Displays network connections and network statistics.

ssh: Connect to the host as a user.

ssh-keygen: Creates a pair of public and private authentication keys.

telnet: Client-server protocol used to establish a connection to a remote computer.


nmap: Scans hosts and services on a network.

curl: Facilitates the transfer of data to or from a server.

ping: Ping a host and check if it is responding.


System Monitoring:
lsof: Lists all files opened by any process of a system.

lsof -u username: Lists all files opened by a specific user.


RESULT

Above linux commands has been successfully executed and verified.

You might also like