Day 19 - Tuesday, January 19, 2021

Everyone who gets into web-development and programming, at some point, asks himself/herslef the question, What is Linux Command Line? and that's the question I will try to explain in today's blog post.

So What is Linux Command Line?

Linux Command Line is a text interface to your computer. Also reffered to as Shell, Terminal, Console, Prompt and by many more names. It's a command langauge interpreter which executes commands provided to it.

In the early days of computers when there were no GUI (Graphical User Interface) programms to interact with, Programmers in those days used Command-Line interfaces or simply terminals to interact with the computer quickly and more efficiently. The commands were kept short and easy to remember to decrease the number of keystorkes and speeding up the process. That's one of the reasons why they are still used today.

But how does it works?

You simply types a command and it returns the results in a simple text form.

For example I type pwd which is an accronym for print-working-directory in the prompt or shell and it will print the directory or folder in which we are currently in.

User@Linux:-$ pwd
/home/User
User@Linux:-$

Here are some must commands every beginner must know. Almost every baisc command name is somehow associated with the function they perform.

  1. pwd - print working directory

  2. cd - change-directory

User@Linux:-$ cd tmp
User@Linux:/tmp$ pwd
/tmp
  1. clear - As the name suggests it will clear the shell

Before

User@Linux:-$ cd tmp
User@Linux:/tmp$ pwd
/tmp
User@Linux:/tmp$ clear

You press return key and it will clear all the screen.

User@Linux:/tmp$
  1. ls - To list all directories and files in the current working directory
User@Linux:-$ ls
dir1    dir2    dir3
  1. mkdir - To make a directory
User@Linux:/tmp$ mkdir dir1
User@Linux:/tmp$ ls
dir1
  1. cat - Came from concatenate whcih means joining two strings of text and this commands dislays all the text in a text file in the command-line
User@Linux:/tmp$ cat text.txt
This text is inside a text file
  1. echo - It echos (prints) the text in the command-line
User@Linux:/tmp$ echo "This is a command"
This is a command
  1. mv - moves a file to a specified location
User@Linux:/tmp$ ls
text.txt    dir1
User@Linux:/tmp$ mv text.txt dir1
User@Linux:/tmp$ ls
dir1
User@Linux:/tmp$ cd dir1
User@Linux:/tmp/dir1$ ls
text.txt
  1. rm - removes a specified files
User@Linux:/tmp$ ls
text.txt
User@Linux:/tmp$ rm text.txt
User@Linux:/tmp$ ls
User@Linux:/tmp$
  1. rmdir - remove directory - To delete a specified folder or directory
User@Linux:/tmp$ ls
dir1
User@Linux:/tmp$ rm dir1
User@Linux:/tmp$ ls
User@Linux:/tmp$

What I Learned Today

💻 Programming

🗾 Langauge[日本語]

  • 黒の剣士 (くろいのけんし) Black Swordsman. : Black, : Sword, : Gentleman.
  • 別々に (べつべつに) Separately. : Separate.
  • 長男 (ちょうなん) Eldest Son. : Long or Leader, : Male.
  • 出生 (しゅっしょう) Birth. : Exit, : Life.

zainscizainsci