INFORMATICS

The Best

Przełącznik języka

Zaproś mnie na KAWE

Jeżeli podoba Ci się strona i chcesz wspomóc projekt!

Postaw mi kawę na buycoffee.to

This Site

Płatnik

CMS

Hardware

Uncategorised

Emulators

Powershell

Storage Array

DNS

FORTINET

Antivirus program

Licznik

2.png9.png0.png7.png9.png6.png4.png
Today101
Yesterday627
This week1811
This month6937
Total2907964

Visitor Info

  • IP: 3.145.154.180
  • Browser: Unknown
  • Browser Version:
  • Operating System: Unknown

Who Is Online

2
Online

wtorek, 14 maj 2024 04:17

Zmiana czasu linux

Gwiazdka nieaktywnaGwiazdka nieaktywnaGwiazdka nieaktywnaGwiazdka nieaktywnaGwiazdka nieaktywna
 

Jak można zmienić datę oraz czas z lini poleceń? Łączymy się poprzez SSH ze zdalnym serwerem.

Jeżeli nie potrafisz zmieniać czasu z lini poleceń możesz zawsze to wykonać z X terminala jako użytkownik root.

Ta komneda używana jest w linuxie w celu zmiany czasu lub zmiany daty. Można to wykonać jedynie z uprawnieniami administratora.   This is useful if the Linux server time and/or date is wrong, and you need to set it to new values from the shell prompt.

Zmiana Daty - Linux

Use the following syntax to set new data and time:
date --set="STRING"

For example, set new data to 2 Oct 2006 18:00:00, type the following command as root user:
# date -s "2 OCT 2006 18:00:00"
OR
# date --set="2 OCT 2006 18:00:00"

You can also simplify format using following syntax:
# date +%Y%m%d -s "20081128"

Linux Set Time

To set time use the following syntax:
# date +%T -s "10:13:13"
Where,

  • 10: Hour (hh)
  • 13: Minute (mm)
  • 13: Second (ss)

Use %p locale’s equivalent of either AM or PM, enter:
# date +%T%p -s "6:10:30AM"
# date +%T%p -s "12:10:30PM"

Search