Works with Terminal On Linux

Tram Ho

Surely, but the newpie like me when I was using Linux was very strange, right? (I used to hate this OS extremely, I just hope to return to Dear Windows but after studying it, getting to know it is interesting and pro, Currently I am using two OS parallel, but I have Windows butter already)

So let’s learn how to work on Linux via the command line on the terminal offline

Now I will introduce the basic commands to operate on Linux terminals. First we need to understand the concept of Terminal in Linux

What is a terminal?

Terminal is a software program preloaded on Linux operating system that allows users to communicate with the computer through running commands. That’s why Terminal is also called a command line interface program.

Basic Statement

1. pwd – Print Working Directory

pwd prints the full path to the current directory.

$ pwd

2. ls (short for the list) – list

ls lists the content (files and directories) in the current directory. It is similar to opening a folder and viewing its contents in the user interface.

The above command will display the name of each file and directory inside [dir_path]. Use the -l option to display additional information such as file permissions, owner and file creation time:

3. cd (short for change directory) – Move Between Folders

To move between directories (directories or folders) on your computer, use the command cd (change directory):

$ cd [directory_path] Replace the [directory_path] above with the directory address you want to move to. You type ls to list the subfolders in the current root directory, then cd [type the first few letters and press Tab will display the name of the folder you need]

To move into the user’s home directory:

To return to the previous directory or return to the current directory, enter:

4. mkdir – Make Directory

mkdir creates a new directory. It is similar to choosing new / create directory to create a new directory on the user interface.

5. rmdir – Remove Directory – delete a directory

rmdir deletes a directory.

If you make a mistake, use Ctrl – C to turn off that command

6. rm – Remove

rm delete files. You can also use rm -r to delete a directory and all data in that directory.

7. mv – Move

mv <Destination> moves a file or directory from one location to another. This command is also used to rename files or directories if and <destination> is the same directory.

8. cp – Copy

cp copies the file from the source location to the destination location. You can also use cp -r to copy directories and all internal data.

9. tail – print TAIL

tail reads and prints the content of the last 10 lines of the file (default). You can use tail -n N to specify the printing of N lines to the screen.

10. cat – concatenate and print files

cat reads and prints the contents of the file to the screen.

Let’s start with 10 basic commands. I will continue writing in part 2. Thank you for reading here (I know her slowly, understand the new nature long remember) Bye! See again!

Share the news now

Source : Viblo