-
ls
: Lists files and directories in the current directory.- Example:
ls
orls -l
(to display detailed information)
- Example:
-
cd
: Changes the current directory.- Example:
cd /path/to/directory
orcd ..
(to go up one level)
- Example:
-
pwd
: Prints the current working directory.- Example:
pwd
- Example:
-
mkdir
: Creates a new directory.- Example:
mkdir directory_name
- Example:
-
rm
: Removes files or directories.- Example:
rm file_name
orrm -r directory_name
(to remove recursively)
- Example:
-
cp
: Copies files and directories.- Example:
cp source_file destination_file
orcp -r source_directory destination_directory
(to copy directories)
- Example:
-
mv
: Moves or renames files and directories.- Example:
mv old_file new_file
ormv file_name /path/to/new_location
(to move files)
- Example:
-
cat
: Displays the contents of a file.- Example:
cat file_name
- Example:
-
touch
: Creates a new file.- Example:
touch file_name
- Example:
-
grep
: Searches for a specific pattern in files.- Example:
grep pattern file_name
orgrep -r pattern directory_name
(to search recursively)
- Example:
-
chmod
: Changes the permissions of a file or directory.- Example:
chmod permissions file_name
(where permissions can be something like755
)
- Example:
-
sudo
: Executes a command with root (administrative) privileges.- Example:
sudo command
(you'll be prompted to enter your password)
- Example:
-
apt-get
: Package management command for Debian-based systems to install, update, and remove software packages.- Example:
sudo apt-get install package_name
orsudo apt-get remove package_name
- Example:
-
man
: Displays the manual pages for a command.- Example:
man command_name
(e.g.,man ls
)
- Example:
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)