Try some simple commands on the Terminal

by Daniel Pham
Published: Updated:
This entry is part 3 of 3 in the series Linux commands: Part 1 - What is the Shell?

Okey, after you’ve used a terminal emulator for the first time. Now we will try some simple commands on the terminal. This helps you become more familiar with using a terminal to work with the operating system.

Some simple commands on the terminal

Now we will try some very simple commands on the terminal as follows. Open the terminal emulator program on your computer and type the following commands into it.

Let’s type date command. This command displays the current time and date.

danie@linuxmint ~ $ date
Fri Jan 11 21:37:58 +07 2019

Let’s type another command, type cal. This command displays a calendar of the current month.

Try some simple commands on the terminal
Type “cal” command on the terminal.

Try typing a command that most people are familiar with. That is the echo command. This command will print out the screen contents of the text. When you type it in the terminal window, it will print the text you just typed on the same window.

danie@linuxmint ~ $ echo "Hello, I'm Danie."
Hello, I'm Danie.

Command “history”

Now, if you press the up key, you will see the echo command you just typed. This is the command history. Most Linux operating systems will save the last 1000 commands you have typed on the terminal.

When you use the up/down arrow keys, you will see different commands that you typed earlier. If you want to see the entire command history that you typed, type the history command.

danie@linuxmint ~ $ history
1946 date
1947 cal
1948 echo "Hello, I'm Danie."
1949 history
danie@linuxmint ~ $

Exit the terminal

Of course, on the graphical interface, you can exit the terminal window by clicking on the x sign icon.

If on an environment like Linux server with a command line interface, you will need to type exit to exit the current terminal session.

danie@linuxmint ~ $ exit

By typing some simple commands above, I think you have begun to understand how to work on linux via the command line. The next article, I will talk more about commands on Linux.

(This is an article from my old blog that has been inactive for a long time, I don’t want to throw it away so I will keep it and hope it helps someone).

0 0 votes
Article Rating
Series Navigation«« Previous part: Use Terminal Emulator for the first time

You may also like

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

DevOps Lite is a personal blog specializing in technology with main topics about DevOps, DevSecOps, SRE and System Administrator. Articles are shared for free and contributed to the community.

SUPPORT US

FOLLOW US

Subscribe my Newsletter for new blog posts. Stay updated from your inbox!

© 2021-2024 DevOpsLite.com – All rights reserved.

Please write sources “DevOpsLite.com” when using articles from this website.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

2
0
Would love your thoughts, please comment.x
()
x

Adblock Detected

Please support us by disabling your AdBlocker extension from your browsers for our website.