Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Linux by (18.4k points)
I have to check the time in my Linux terminal.

Is there any command for getting date and time in the Linux terminal?

and also how to set a custom function?

1 Answer

0 votes
by (36.8k points)
edited by

The command is the date

To customize the output there are many options available, see the date --help for the list.

For example, 

date '+%A %W %Y %X' gives Tuesday 34 2013 08:04:22 

The name of your day of the week, week number, year, and time.

Come and join Linux training to gain great knowledge. 

Do check out the video below

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Dec 12, 2020 in Linux by blackindya (18.4k points)
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...