Linux commands for devops

Learn linux with a 5 min read:

1. File and Directory Operations:

  • mkdir: Create a new directory.

  • cd: Change the current directory.

  • pwd: Print the working directory.

  • touch: Create an empty file or update file timestamps.

  • ls: List files and directories in the current location.

  • rm: Remove files or directories.

  • cp: Copy files or directories.

  • mv: Move or rename files and directories.

    ⭐list of all linux commands with a simple stem:

  • 🚀✨Connect to server. TYpe ls (list of all folders.)

  • cd ls

  • cd bin (bin will open and do ls means list of all commands in bin)

2. File Content Manipulation:

  • touch: Create a file.

  • cat: Concatenate and display file content.

  • Vim: Editor (Other editor can use Nano,vi)

  • head: Display the beginning of a file.

  • tail: Display the end of a file.

  • cp: Copy from one directory to other.

  • mv: Move from one directory to other.

    Touch deep{3..10}.txt: To create mutilple files with one command.

3.File Permissions:

  • chmod: Change file permissions.

  • chown: Change file ownership.

4. User and Group Management:

  • whoami: Display the current user.

  • id: Display user and group information.

  • useradd: Add a new user.

  • su: switch user.

  • passwd: Set or change a user's password.

  • groupadd: Add a new group.

  • usermod: Modify user properties.

  • userdel: Delete a user.