Basic Linux Commands
Basic Linux Commands
Command Description
ls -al Lists files and directories with detailed information like permissions,size, owner, etc.
mv file "new
Moves the files to the new location
file path"
mv filename
Renames the file to a new filename
new_file_name
sudo Allows regular users to run programs with the security privileges of the superuser or root
history Gives a list of all past commands typed in the current terminal session
mkdir
Creates a new directory in the present working directory or a at the specified path
directoryname
mv Renames a directory
mail -s 'subject'
-c 'cc-address'
-b 'bcc- Command to send email
address'
'to-address'
mail -s
"Subject"
Command to send email with attachment
to-address <
Filename
Command Description
r read permission
w write permission
x execute permission
-= no permission
Chown user:group filename change the user as well as group for a file or directory
Command Description
Command Description
Networking command
Command Description
SSH username@ip-address or hostname login into a remote Linux machine using SSH
Ping hostname="" or ="" To ping and Analyzing network and host connections
quit Logout
Process command
Command Description
VI Editing Commands
Command Description
dd Delete line
C Delete contents of a line after the cursor and insert new text. Press ESC key to end insertion.
dw Delete word
cw Change word
r Replace character
S Substitute entire line and begin to insert at the beginning of the line