segunda-feira, 30 de dezembro de 2024

Comandos básicos do Linux

Linux Basic Commands

**File and Directory Management:**

1. **ls:** List files and directories.

2. **cd:** Change directory.

3. **pwd:** Display the current directory.

4. **mkdir:** Create a new directory.

5. **rm:** Remove files or directories.

6. **cp:** Copy files or directories.

7. **mv:** Move or rename files.

8. **touch:** Create an empty file.

9. **tree:** Display directory structure.


**File Viewing and Editing:**

10. **cat:** Display file content.

11. **less / more:** View files page by page.

12. **head:** Show the first 10 lines.

13. **tail:** Show the last 10 lines.

14. **nano:** A simple text editor.

15. **vi / vim:** An advanced text editor.


**Search Operations:**

16. **find:** Locate files and directories.

17. **grep:** Search within files.

18. **locate:** Quickly find files using a database.

19. **which:** Locate a command’s path.


**Disk and File System Management:**

20. **df:** Display disk space usage.

21. **du:** Show directory or file size.

22. **mount / umount:** Mount or unmount file systems.

23. **lsblk:** List all block devices.

24. **fsck:** Check and repair file systems.


**Process and System Monitoring:**

25. **ps:** Display running processes.

26. **top:** Monitor system processes.

27. **htop:** Interactive process manager.

28. **kill:** Terminate a process.

29. **uptime:** Show system uptime.

30. **free:** Check memory usage.


**Networking Commands:**

31. **ping:** Check connectivity.

32. **curl:** Transfer data to/from servers.

33. **wget:** Download files from the internet.

34. **ifconfig / ip:** View or configure network interfaces.

35. **netstat:** Show network statistics.

36. **ssh:** Remote access to servers.

**37. SCP: Securely Copy Files Between Systems**


**Permissions and Ownership:**

38. chmod: Modify file permissions

39. chown: Change file owner/group

40. umask: Set default permissions


**Archiving and Compression:**

41. tar: Archive and compress files

42. gzip/gunzip: Compress and decompress files

43. zip/unzip: Handle zip files


**System Information:**

44. uname -a: Show system information

45. hostname: Display system hostname

46. whoami: Current user

47. id: Show user and group IDs

48. dmesg: Kernel log messages

49. lscpu: CPU architecture information

50. lsusb: List USB devices

51. lspci: Show PCI devices


**System Control:**

52. reboot: Restart the system

53. shutdown: Power off the system

54. systemctl: Manage system services

 

Nenhum comentário:

Postar um comentário