Must Know 60 Basic Linux Commands
Foundational commands you need to navigate through directories, manipulate files, and maintain your system’s integrity.
Basic Commands
- whoami: Quickly identify the current user.
- pwd: Print the current working directory path.
- mkdir: Create a new directory.
- ls: List directory contents.
- cd: Change directory.
- cd .. : Move up one directory level.
- clear: Clear the terminal screen.
- touch: Create a new file.
- rm: Remove files or directories.
- cat: Concatenate and display file content.
- rm -r: Remove directories recursively.
- vi editor: Launch the Vi text editor for file manipulation.
- sed: Stream editor for filtering and transforming text.
- more, less, head, tail: Utilities for viewing text files.
- sort: Sort lines of text files.
- man: Access the system manual.
- history: Display command history.
- tar: Archive files.
- grep: Search for patterns in text.
- grep with pipe: Utilize piping with grep for advanced text filtering.
- mount: Mount filesystems.
- fdisk: Partition table manipulator.
- umount: Unmount directories.
System Administration Commands
As a Cloud and DevOps engineer, you’ll frequently interact with system configurations and user management tasks.
These commands are indispensable for maintaining system security and accessibility.
- apt/yum package manager commands: Install, update, and manage software packages.
- id: Print user and group information.
- /etc/passwd: User account information.
- /etc/group: Group information.
- /etc/shadow: Secure user account information.
- adduser: Create a new user.
- su: Substitute user identity.
- usermod: Modify user attributes.
- deluser: Delete a user.
- ls -l: List file permissions.
- chown: Change file owner and group.
- chmod: Alter file/Dir permissions.
Process Management Commands
Efficiently manage processes to optimize system performance and resource utilization.
- ps aux: Display all running processes.
- kill: Terminate processes.
- top: Display system resource usage.
- htop: Interactive process viewer.
Services Management Commands
Ensure smooth operation of services and monitor system resources effectively.
- systemctl: Manage system services.
- df: Display disk space usage.
- free: Display system memory usage.
- uname -a: Print system information.
Networking Commands
Network connectivity is paramount in cloud environments. These commands enable effective network
management and troubleshooting.
- ifconfig: Configure network interfaces.
- ip a: Show network interfaces and addresses.
- ping: Test network connectivity.
- traceroute: Trace the route to a destination.
- tracepath: Discover the path packets take.
- netstat -rn: Fetch the gateway IP.
- iptables/firewalld: Configure firewall rules.
- ssh: Securely connect to remote servers.
- telnet: Communicate with remote hosts.
- curl: Transfer data from or to a server.
- wget: Download files from the internet.
- journalctl -u: Query and display system logs.
- dmesg: Print kernel ring buffer messages.
Mastering these Linux commands lays a solid foundation for Cloud and DevOps engineers to navigate
the complexities of modern IT infrastructure. By integrating these commands into your workflow, you
can streamline operations, enhance security, and optimize performance, ultimately propelling your
organization towards success in the digital age.
Comments
Post a Comment