Linux Command
Rajeev singh
IOS?? | SWIFT-UI | SWIFT | OBJ-C | Linux??| AWS ?? | DevOps ?? | Azure CI/CD Pipelines ?? | Terraform ??? | Docker ?? | GitHub/Bitbucket ??? | Kubernetes ??
ls - List directory contents
ls ls -l # Long listing format
ls -a # Show hidden files
cd - Change directory cd ..
# Go up one level cd ~
# Go to the home directory
pwd - Print working directory
pwd
mkdir - Create a new directory.
mkdir new_folder
rm - Remove files or directories.
rm file.txt # Remove a file
rm -r folder_name # Remove a directory recursively
cp - Copy files or directories
cp file.txt /destination
cp -r folder_name /destination
mv - Move or rename files
mv file.txt /destination # Move file
mv oldname.txt newname.txt # Rename file
touch - Create an empty file
touch file.txt
cat - View the content of a file
cat file.txt
find - Search for files and directories
find /path -name "filename"
top - Display real-time processes and system resource usag
top
ps - View currently running processes
ps aux
kill - Terminate a process by its PID
kill <PID>
df - Check disk space usage
df -h
du - Check directory size
du -sh folder_name
free - Display memory usages.
free -h
Permission and Ownership:
chmod 755 file.txt
chmod +x script.sh #Make a script executable
chown - Change file Ownership:
chown user:group file.txt
Networking:
ping - test network connectivity
ping google.com
curl - Fetch data from a URL