Skip to content

Instantly share code, notes, and snippets.

@alirezazadeh77
Last active January 13, 2023 15:14
Show Gist options
  • Save alirezazadeh77/a1e7db41eec45343a8ffd31812cbe1c1 to your computer and use it in GitHub Desktop.
Save alirezazadeh77/a1e7db41eec45343a8ffd31812cbe1c1 to your computer and use it in GitHub Desktop.
change linux date time to a specific time
#!/bin/bash
# example:
# set os time to 2022-12-15
# ./change_time.sh 2022-12-15
TIME=$1
timedatectl set-ntp 0
timedatectl set-time $TIME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment