Introduction To The Command-Line Interface

What is the command line?

Opening: Windows

Opening: OS X

Opening: Linux

$ whoami altaf

Use CLI commands with great attention!!! Wrong use can easily delete files or destroy your computer system completely.

Note: ‘pwd’ stands for ‘print working directory’.

Note: ‘cd’ stands for ‘change directory’. With powershell you can use pwd just like on Linux or Mac OS X.

$ ls Documents Pictures Downloads Public Music Videos Desktop

Note: In powershell you can also use ‘ls’ like on Linux and Mac OS X.

$ pwd /Users/altaf/Desktop
> cd C:\Users\altaf\Desktop

PRO tip: if you type cd D and then hit tab on your keyboard, the command line will automatically fill in the rest of the name so you can navigate faster. If there is more than one folder starting with “D”, hit the tab key twice to get a list of options.

PRO tip: If you don’t want to type the same commands over and over, try pressing the up arrow and down arrow on your keyboard to cycle through recently used commands.

$ pwd /Users/altaf/Desktop
> cd C:\Users\altaf\Desktop
$ rm -r practice

Pro Tip :

When you want to copy from the terminal or paste into the terminal instead of using the right-click option you can use a keyboard shortcut for copy and paste. To copy from terminal use ctrl + shift +c and to paste into the terminal use ctrl + shift + v. This will save your time. Cool!, huh? :)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store