0% found this document useful (0 votes)
50 views

Linux Administration

This document provides an overview of Linux system administration topics including monitoring system resources, managing processes, working with users and groups, security, Docker and containers. Key topics covered include using tools like top, ps, and df to monitor resources, managing users and groups with useradd, passwd, and chown/chmod, hardening security with firewalls and permissions, and introducing Docker containers and microservices.

Uploaded by

Senthil Nathan
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

Linux Administration

This document provides an overview of Linux system administration topics including monitoring system resources, managing processes, working with users and groups, security, Docker and containers. Key topics covered include using tools like top, ps, and df to monitor resources, managing users and groups with useradd, passwd, and chown/chmod, hardening security with firewalls and permissions, and introducing Docker containers and microservices.

Uploaded by

Senthil Nathan
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Getting started with

Linux system
administration
Optimizing, Securing and working with Docker and Linux Containers
Monitoring system resources

• Why Monitor
1. Understand capacity usage
2.Identify and terminate rogue processes

/proc
Meminfo
Cpuinfo
Top
Free
Free –h
Df
Df –t
Df –ht
Iftop
Managing system processes

• Ps
• Ps aux
• Ps aux | grep sshd
• Journalctl –-since “10 minutes ago”
• Cd /var/log
Managing system processes

• Dmesg
• Snap list
• yes > /dev/null &
• Kill
• Kill all
• systemctl status apache2
• Nice -19 yes > /dev/null &
• Renice 15 –p 1824
Working With Users and Groups

• Understanding Linux Users


1.Sudo less /etc/shadow
2.Less /etc/passwd
3.id username
4.Who
5.Last | less
Administrating users

• Sudo useradd –m jane


• Cd /etc/skel
• Sudo passwd username
• Sudo mkdir /var/secret
• Sudo groupadd secret-group
• Sudo chown :secret-group /var/secret
• Sudo usermod –a –G secret-group username
• Sudo chmod g+w /var/secret/
Linux Server Security

• Applying Object Permissions


1.Ls –dl
2.Chmod o+x data.txt
3.Chmod 777 data.txt

Extending Object Usability


1.Sudo chmod +t
2.Nano /home/ubuntu/scripts/myscript.sh
3.Sudo ln –s /home/ubuntu/scripts/myscript.sh /var/secret
Hardening your server

• Service Hardening
• Port control
• Firewall rules

• Nmap –v –sT localhost


Docker and Linux Containers

• Host Administration
1.Privileges
2.Kernel Access

Container Administration
1.Application design

The Future of linux


1.Micro Services
2.DevOps
3.Development Support
Sample Dockerfile

#Create a webserver on Ubuntu

FROM ubuntu:18.04

RUN apt-get update


RUN apt-get install –y apache2
RUN echo “Welcome to my web site” >
/var/www/html/index.html
EXPOSE 80

You might also like