Linux CMD Cheat1
Linux CMD Cheat1
Lists files and directories with detailed informa on like permissions, size, owner,
ls -al
etc.
cat file1 file2 > file3 Joins two files (file1, file2) and stores the output in a new file (file3)
mv file "new file path" Moves the files to the new loca on
mv filename
Renames the file to a new filename
new_file_name
Allows regular users to run programs with the security privileges of the superuser or
sudo
root
history Gives a list of all past commands typed in the current terminal session
mkdir directoryname Creates a new directory in the present working directory or a at the specified path
mv Renames a directory
r read permission
w write permission
x execute permission
-= no permission
used to modify this permission so that it can grant or restrict access to directories and
Chmod
files
Chown user:group
change the user as well as group for a file or directory
filename
SSH username@ip-address or hostname login into a remote Linux machine using SSH
Ping hostname="" To ping and Analysing network and host connec ons