-
ls: List files and directories in the current directory.
- Example:
ls
- Example:
-
cd: Change directory.
- Example:
cd /path/to/directory
- Example:
-
pwd: Print the current working directory.
- Example:
pwd
- Example:
-
mkdir: Create a new directory.
- Example:
mkdir directory_name
- Example:
-
rm: Remove files or directories.
- Example:
rm file.txt
(removes a file) - Example:
rm -r directory
(removes a directory and its contents recursively)
- Example:
-
cp: Copy files and directories.
- Example:
cp file.txt destination_directory
- Example:
-
mv: Move or rename files and directories.
- Example:
mv file.txt new_location
(moves a file) - Example:
mv file.txt new_name.txt
(renames a file)
- Example:
-
cat: View the contents of a file.
- Example:
cat file.txt
- Example:
-
grep: Search for a pattern in a file.
- Example:
grep "pattern" file.txt
- Example:
-
chmod: Change permissions of a file or directory.
- Example:
chmod +x script.sh
(gives execute permission to a script)
- Example:
-
sudo: Execute a command with administrative privileges.
- Example:
sudo command
- Example:
-
apt-get: Package management command (Ubuntu/Debian).
- Example:
sudo apt-get install package_name
- Example:
-
yum: Package management command (CentOS/RHEL).
- Example:
sudo yum install package_name
- Example:
These are just a few examples of Linux commands. There are many more available, each serving different purposes. Remember to consult the relevant documentation or use the man
command for more information on specific commands.
Run Command to turn off and then turn on NetworkManager Command Line Interface.
Step 1 :
sudo nmcli networking off
Step 2 :
sudo nmcli networking on
Step 3 :
Turn on airplane mode and then turn off.
WoW ! It's working.