Hello Dev Community! ๐
Iโm excited to share that Iโve successfully completed my Linux learning journey! ๐ Over the past few weeks/months, Iโve been diving deep into the world of Linux, exploring its power, flexibility, and role in DevOps and beyond.
Here are the key topics Iโve covered:
Linux Basics: Command-line essentials, file system navigation, permissions, and processes.
Shell Scripting: Writing basic scripts to automate tasks and improve productivity.
Package Management: Installing and managing software using apt, yum, and other package managers.
Networking: Configuring IP addresses, managing firewalls, and troubleshooting network issues.
File Systems: Partitioning, formatting, and mounting drives, as well as working with ext4, XFS, and others.
System Administration: Managing users, groups, processes, and system monitoring tools like top, htop, and systemctl.
Additional Topics Iโve Explored
As I progressed, I also delved into advanced topics to strengthen my Linux knowledge:
Linux Security: Basics of firewalls (iptables, ufw), securing SSH, and SELinux.
Job Scheduling: Setting up cron jobs and at jobs for automation.
Server Configuration: Setting up a basic web server (Apache/Nginx) and managing logs.
Performance Tuning: Optimizing resource usage and monitoring system performance with tools like iostat and vmstat.
Containers & Virtualization: Intro to Docker, systemd-nspawn, and Linux namespaces.
DevOps Applications: Understanding how Linux integrates into CI/CD pipelines and cloud platforms like AWS.
Whatโs Next?
Now that I have a solid foundation in Linux, Iโm looking forward to applying these skills in DevOps. My next steps include:
Learning AWS to understand cloud services.
Diving deeper into Docker and Kubernetes for containerization and orchestration.
Exploring Ansible for configuration management and automation.
Strengthening my scripting skills with Python and Bash.
Iโm thrilled about this journey and open to learning more from this incredible community. If youโre also learning Linux or DevOps, letโs connect and grow together! ๐ป
This is my First Project:-
#!/bin/bash
#Script should be execute with sudo/root access.
if [[ "${UID}" -ne 0 ]]
then
echo 'Please run with sudo or root.'
exit 1
fi
#User should provide atleast one argument as username else guide him
if [[ "${#}" -lt 1 ]]
then
echo "Usage: ${0} USER_NAME [COMMENT]..."
echo 'Create a user with name USER_NAME and comments field of COMMENT'
exit 1
fi
#Store 1st argument as user name
USER_NAME="${1}"
#IN case of more than one argument,store it as account comments
shift
COMMENT="${@}"
# Create the password
PASSWORD=$(date +%s%N)
# Create the user
useradd -c "${COMMENT}" -m "${USER_NAME}"
#Check if user is successfully created or not
if [[ $? -ne 0 ]]
then
echo 'The Account could not be created'
exit 1
fi
# Set the password for the user.
passwd "${PASSWORD}" | passwd --stdin "${USER_NAME}"
# Check if password is successfully set or not
if [[ $? -ne 0 ]]
then
echo 'Password could not be set'
exit 1
fi
#Force password change on first login.
passwd -e "${USER_NAME}"
# Dispaly the username, password, and the host where the user was created.
echo
echo "Username: ${USER_NAME}"
echo
echo "Password: ${PASSWORD}"
echo
echo "Hostname: $(hostname)"
*This create new user in Linux *
Feel free to share your tips, resources, or experiences in the comments. ๐
Top comments (0)