Linux cheat sheet by Praveen Singampalli

This Linux cheat sheet provides a comprehensive overview of essential commands and interview questions for both basic and advanced users. Let's break it down into key sections:


## Basic Commands


**File and Directory Management**

- `ls`: List directory contents

- `cd`: Change directory

- `mkdir`: Create a directory

- `rm`: Remove files or directories

- `cp`: Copy files

- `mv`: Move or rename files/directories

- `touch`: Create an empty file

- `cat`: Display file contents

- `grep`: Search for patterns in files

- `find`: Find files and directories


**System Information**

- `df`: Display disk space usage

- `free`: Display memory usage

- `top`: Display system processes

- `ps`: Display process information

- `kill`: Terminate a process

- `uptime`: Display system uptime


**User Management**

- `useradd`: Create a new user

- `passwd`: Change password

- `su`: Switch user

- `sudo`: Execute commands as another user


**Networking**

- `ping`: Test network connectivity

- `ifconfig`: Configure network interfaces

- `ssh`: Secure Shell for remote login


## Advanced Commands


**File System Management**

- `mount`: Mount file systems

- `chown`: Change file ownership

- `chmod`: Change file permissions


**Package Management**

- `apt-get`: Install, update, and remove packages (Debian/Ubuntu)

- `yum`: Install, update, and remove packages (Red Hat/CentOS/Fedora)


**Scripting and Text Processing**

- `bash`: Bourne Again SHell (default shell)

- `sed`: Stream Editor

- `awk`: Pattern scanning and text processing language


**Compression and Archiving**

- `tar`: Create, extract, and manipulate archive files

- `gzip`: Compress and decompress files


## Interview Questions


1. Difference between hard links and symbolic links

2. Concept of the Linux kernel

3. File system types in Linux

4. Finding the PID of a running process

5. Purpose of cron jobs

6. Redirecting output to a file

7. File permission levels in Linux

8. Concept of a shell

9. Finding the size of a directory

10. Difference between `ls -l` and `ls -a`

11. Creating a new user in Linux

12. Purpose of the `sudo` command

13. Checking disk space usage


This cheat sheet serves as an excellent resource for Linux administrators, developers, and anyone preparing for Linux-related interviews. It covers a wide range of topics from basic file management to advanced system administration tasks.


Citations:

[1] https://bit.ly/41YAnpO


 https://www.linkedin.com/posts/praveen-singampalli_the-two-linux-cheatsheets-with-interview-activity-7280956120406310912-pCQz?utm_source=share&utm_medium=member_desktop

( answers generated by AI) 


Comments

Popular posts from this blog

Spring boot versions : Detailed explanation of the different versions and releases of Spring Boot (AI Generated)

download youtube videos java program ( AI generated)

Java Spring Framework versions and their major releases ( AI Generated )