top of page
  • Writer's picturevP

Basic Linux Commands to Start With for DevOps Engineers - Day 12

Welcome back to day 12 of our #90DaysOfDevOps series! If you're diving into the DevOps world, you're in for an exciting journey. One of the first things you'll encounter on this path is Linux. Linux is the backbone of many DevOps environments due to its flexibility and robustness. To help you get started, let's explore some essential Linux commands every aspiring DevOps engineer should know.


1. Navigating the File System

  • pwd - Print Working Directory: Shows your current directory's full path.

  • ls - List: Lists files and directories in the current directory.

  • cd - Change Directory: Moves you to a specified directory. Use cd .. to go up one level.


2. File and Directory Operations

  • mkdir - Make Directory: Creates a new directory.

  • touch - Create Empty File: Creates an empty file.

  • rm - Remove: Deletes files and directories. Be cautious with this command.

  • cp - Copy: Copies files and directories.

  • mv - Move: Moves or renames files and directories.


3. Viewing File Contents

  • cat - Concatenate: Displays the contents of a file.

  • more and less - Paginate: Display file contents one screen at a time.

  • head and tail - Display First/Last Lines: Show the beginning or end of a file.


4. Searching and Grep

  • grep - Global Regular Expression Print: Searches for a pattern in files and prints matching lines.


5. Working with Text Files

  • nano or vim - Text Editors: These are terminal-based text editors to modify files. Start with nano for simplicity.


6. File Permissions

  • chmod - Change Mode: Modifies file permissions (read, write, execute) for users, groups, and others.

  • chown - Change Owner: Changes the owner of a file or directory.


7. Processes and System

  • ps - Process Status: Lists running processes.

  • top - System Monitor: Shows real-time system statistics, including CPU and memory usage.

  • kill - Terminate Processes: Terminates processes by their process ID (PID).


8. Package Management (For Debian/Ubuntu Based Systems)

  • apt-get - APT Package Handling Utility: Used to install, update, and remove software packages.


9. Networking

  • ifconfig - Interface Configuration: Displays network interface information.

  • ping - Ping: Tests network connectivity to a specific host.

  • netstat - Network Statistics: Shows network connections, routing tables, interface statistics, masquerade connections, and multicast memberships.

  • ssh - Secure Shell: Connects to remote servers securely.


10. File Transfer

  • scp - Secure Copy Protocol: Copies files securely between hosts.


11. Archiving and Compression

  • tar - Tape Archive: Creates and extracts archives.

  • gzip - GNU Zip: Compresses and decompresses files.


12. File Permissions

  • chmod - Change Mode: Modifies file permissions.

  • chown - Change Owner: Changes file ownership.


13. Monitoring and Troubleshooting

  • htop - Interactive Process Viewer: A more advanced process viewer compared to top.

  • df - Disk Free: Displays disk usage information.

  • du - Disk Usage: Shows directory-wise disk usage.


14. File Transfer and Remote Access

  • wget - Web Get: Downloads files from the internet.

  • curl - Client for URLs: Transfers data with URLs.


15. Searching

  • find - Search for Files: Searches for files and directories based on various criteria.


These basic Linux commands will serve as your foundation for navigating, managing files, and interacting with your DevOps environment. As you become more comfortable with these commands, you'll be better equipped to automate tasks, manage servers, and work effectively in a DevOps role.


In the coming days of #90DaysOfDevOps, we'll delve deeper into DevOps tools and practices. So, stay tuned and keep learning!


Thank you for reading!


*** Explore | Share | Grow ***

6 views0 comments

Comentários

Avaliado com 0 de 5 estrelas.
Ainda sem avaliações

Adicione uma avaliação
bottom of page