Linux Commands and Sever Management
Linux Commands and Sever Management
Commands :
sudo : super user do
Ssh username@ipaddress
* Sudo apt install , update , upgrade
* sudo systemctl status ssh
* sudo apt install openssh-server
* sudo systemctl start ssh
* sudo systemctl enable ssh
ip a : finding ipaddress
lISTING DIRECTORIES :
ls : list directory
ls -f : all files and folders
ls -F : differentiating folders and files
ls -a : hidden files
ls -R : directory and their sub directories
ls -l : detailed information of each directory ( long lasting )
ls -t : sort by modification time
ls -s : sort by file size
ls -h : human readable file
* : all ( wild card character )
LINKS :
Symbolic link - only points towards the file or folder doesnt shows the content inside
the file or folder
both have different inode numbers but linked through symbolic links
Hard link - linking the file directly have same or similar inode numbers and size in
bytes 1032 bytes
echo : writing content inside the file ( eg : echo " content " > file_name
cat : viewing the content inside a file ( eg : cat file_name )
rm : to remove a file (eg : rm file_name )
Symbolic link :
Creating symbolic link :( ln -s directory_name/filename
destination_directory_name/destination_symboliclink_name )
overwriting symbolic link : ln -sf " " ...... .... ... .. .
Renaming files :
mv : mv file_name,path renamed_file_name,path
: gzip folder_name_path
: gunzip tonystark.txt.gz
TOP 50 COMMANDS :
ls - listing
pwd - print worrking directory
cd - change directory
mkdir - make direcotry
mv - rename and copy the file
cp - copy file
rm - delete the files
touch - create an empty file
ln - creating a symbolic link and hard link
cat - viewing a content of a file
clear - used to clear the terminal
echo - printing any thing in the terminal
less - display only the small content
man - manual pages of linux commands
uname - about operating system
whoami - finding which user is logged in
tar - compress file and decompress file
grep - used to find a single specific word in a text file
head - listing the top 5 or 3 or etc.. based on our requirment
tail - listing the least 5 or 3 or etc.. based on our requirment
diff - finding difference betwwen two files
cmp - compare ( comparing two different files )
comm - do both the work of diff and cmp
sort - can used to sort the file
export - can be used in environment variables for global variables
zip - can used to zip the bunch of files
unzip - can used to unzip the bunch of files
ssh - secure shell login
service - used to start and stop various services in the linux operating system
ps - process information
kill and killall - stop the process
df - disk space
mount - used to find the deviced that are mounted
chmod - file permissions
chown - file ownership
if config and ip a - network information
traceroute - finding how much data and the path sent to a website
wget - used to download files directly
ufw - used to aceess firewall services
iptables - information about network and fire wall
apt packman yum rpm - package management system
sudo - super user do
call - calender
alias - can convert a large command to user readable samll word
dd - bootable drive
whereis - information about linux commands
wahtis - to find for waht the linux command is used
top - to know the information of the running process of applications and etc...
useradd and usermod - adding an user and modifing the details of the user
passwd - can change the passwd of the user