-
ls
: Lists files and directories.- Usage:
ls
,ls -l
(long format),ls -a
(including hidden files)
- Usage:
-
cd
: Changes the current directory.- Usage:
cd [directory]
,cd ..
(parent directory),cd
(home directory)
- Usage:
-
pwd
: Displays the path of the current working directory.- Usage:
pwd
- Usage:
-
cp
: Copies files and directories.- Usage:
cp [source] [destination]
,cp -r [source_directory] [destination_directory]
(recursive copy)
- Usage:
-
mv
: Moves or renames files and directories.- Usage:
mv [source] [destination]
,mv [old_name] [new_name]
- Usage:
-
rm
: Removes files and directories.- Usage:
rm [file]
,rm -r [directory]
(recursive remove)
- Usage:
-
mkdir
: Creates new directories.- Usage:
mkdir [directory_name]
- Usage:
-
touch
: Creates a new empty file or updates the timestamp of an existing file.- Usage:
touch [file_name]
- Usage:
-
cat
: Concatenates and displays the content of files.- Usage:
cat [file]
,cat [file1] [file2] > [new_combined_file]
- Usage:
-
grep
: Searches for a specific pattern in files or input.- Usage:
grep '[pattern]' [file]
,cat [file] | grep '[pattern]'
- Usage:
-
find
: Searches for files and directories based on various criteria.- Usage:
find [directory] -name '[pattern]'
,find [directory] -type f
(files only)
- Usage:
-
sudo
: Executes commands with superuser privileges.- Usage:
sudo [command]
- Usage:
-
chmod
: Changes the permissions of files or directories.- Usage:
chmod [permissions] [file]
- Usage:
-
chown
: Changes the owner and group of files or directories.- Usage:
chown [user]:[group] [file]
- Usage:
-
df
: Displays disk space usage.- Usage:
df
,df -h
(human-readable format)
- Usage:
-
du
: Displays the disk usage of files and directories.- Usage:
du
,du -h
(human-readable format)
- Usage:
-
ps
: Shows information about active processes.- Usage:
ps
,ps -aux
- Usage:
-
kill
: Terminates processes.- Usage:
kill [process_id]
,kill -9 [process_id]
(force kill)
- Usage:
-
nano
,vi
,emacs
: Text editors for editing files.- Usage:
nano [file]
,vi [file]
,emacs [file]
- Usage:
-
man
: Displays the manual page for other commands.- Usage:
man [command]
- Usage: