Linux  and Git Cheat Sheet

Linux and Git Cheat Sheet

·

2 min read

LINUX CHEAT SHEET

Navigation:

  • ls: List files and directories in a directory

  • ls -l: Displays detailed information about files and directories (long list format)

  • ls -a: Shows all files and directories including hidden (starting with a dot)

  • cd: Change the current working directory

  • pwd: Display the current working directory

    File Management:

  • cp: Copy files and directories

  • mv: Move or rename files and directories

  • rm: Delete files and directories

  • touch<filename>: Create an single empty file

  • touch<file1><file2>: Creates multiple empty files

  • cat<filename>: Displays the contents of the file

  • cat>filename: Creates a new file

  • chmod: Change file permissions

  • chown: Change file ownership

    Directory Management:

  • mkdir: Create a new directory

  • rmdir: Remove an empty directory

    Process Management:

  • ps: Display information about running processes

  • top: Displayreal-time information about system performance and resource usage.

  • kill: Terminate a process

  • bg: Send a process to the background

  • fg: Bring a background process to the foreground

    System Information:

  • uname: Display information about the OS

  • df: Display information about disk usage

  • free: Display information about memory usage

  • uptime: Display the system uptime

    User Management:

  • adduser: Add a new user

  • deluser: Remove a user

  • addgroup: Add a new group

  • delgroup: Remove a group

  • usermod: Modify a user account

    Package Management:

  • apt-get: Install, update or remove packages on Debian-based systems

  • yum: Install, update, or remove packages on Fedora-based systems

  • dnf: Install, update, or remove packages on Fedora-based systems

  • pacman: Install, update, or remove packages on Arch-based systems


GIT CHEAT SHEET

Git cheat sheet - Page 1

Git cheat sheet - Page 2

Happy Learning!!

Thanks For Reading :)