pwd: Print the current working directory.ls: List directory contents.cd <directory>: Change to the specified directory.mkdir <directory>: Create a new directory.rmdir <directory>: Removes an empty directory.
touch <file>: Create a new empty file.cp <source> <destination>: Copy files or directories.mv <source> <destination>: Move or rename files or directories.rm <file>: Remove files.rm -r <directory>: Remove directories and their contents.
cat <file>: Display the contents of a file.less <file>: View file contents page by page.nano <file>: Edit files using the Nano text editor.vi <file>: Edit files using the Vi text editor.
uname -a: Display system information.top: Display running processes.df -h: Display disk space usage.free -h: Display memory usage.
Linux has a hierarchical file system. Key directories include:
/: Root directory./home: User home directories./bin: Essential user binaries./sbin: System binaries./etc: Configuration files./var: Variable data files./tmp: Temporary files./usr: User programs.
Linux controls access to files and directories using a permission system. Permissions are divided into read (r), write (w), and execute (x) for the owner, group, and others.
chmod 755 <file>: Set read, write, and execute permissions for the owner, and read and execute permissions for the group and others.chown user:group <file>: Change the owner touserand the group togroup.
Linux distributions use package managers to install, update, and remove software.
apt-get update: Update package index.apt-get install <package>: Install a package.apt-get remove <package>: Remove a package.