Reason to Learn Command Line Interface ?

If you are new to the Linux, it is a good idea to start by learning the basics of the CLI.
Here are some basic and useful commands for linux .



Basic Linux Commands



pwd

pwd - Print Working Directory.


cd

cd — change the working directory


sudo

sudo, sudoedit — execute a command as another user , adimn


man

man - an interface to the system reference manuals


rm

rm - remove files or directories


rm

rm - remove files or directories


rmdir

rmdir - remove empty directories


touch

touch - change file timestamps


cat

cat - concatenate files and print on the standard output


cp

cp - copy files and directories


mv

mv - move or (rename) files


mkdir

mkdir - make directories


rm -r

Delete folder



GIT Commands

git clone [url]

clone the existing repository


git init

initilize new version-controlled project


git add . git commit - m "first commit"

save changes to repository


git status

Current state of the repository


git branch [ BranchName ]

Create a new branch


git branch -a

list all local and remote branch


git branch -d [branchname]

Delete a branch


SSH

ssh [user]@[host ip]

connect to host


ssh-keygen -b 4096

Generate SSH key


ssh [user]@[host ip] [command]

Run command and exit

ssh -X [user]@[host ip]

clone the existing repository


scp [localeFile] [user]@[host]:[remoteFile]

push file


scp [remoteFile] [user]@[host]

pull file


exit

End session


Copied!