Linux Flashcards
ls
Lists files and directories in the current directory
ls -l
Lists files with detailed info (permissions, owner, size, date)
ls -a
Lists all files, including hidden files (those starting with .
cd
Changes the current working directory
pwd
Prints the current working directory path
mkdir
Creates a new directory (folder)
rm
Deletes a file
rm -r
Deletes a directory and its contents recursively
mv
Moves or renames files and directories
cp
Copies files and directories
cat
Displays file contents or joins multiple files
nano
Simple, user-friendly command-line text editor
vim/vi
Powerful command-line text editors with modes and shortcuts
chmod
Changes file or directory permissions
chown
Changes the ownership of a file or directory
sudo
Runs a command as the superuser (admin privileges)
su
Switches to another user account (often root)
grep
Searches text using basic regular expressions
fgrep or grep -F
Searches for fixed strings (no regex interpretation)
egrep or grep -E
Searches using extended regular expressions
grep -f
Searches for patterns from a file
grep -e
Allows specifying multiple patterns directly in the command
man
Shows the manual page for a command
man grep
Displays the manual page specifically for grep