.\"Copyright (c) 2002-2020 Apple Inc. All Rights Reserved. .\"The contents of this file constitute Original Code as defined in and are .\"subject to the Apple Public Source License Version 1.2 (the 'License'). .\"You may not use this file except in compliance with the .\"License. Please obtain a copy of the License at .\"http://www.apple.com/publicsource and read it before using this file. .\" .\"This Original Code and all software distributed under the License are .\"distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER .\"EXPRESS OR IMPLIED, AND APPLE .\"HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY .\"WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, .\"QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the .\"specific language governing rights and limitations under the License." .\" .\" Use the following line to view the manpage. Replace man_page with the path to the manpage to view. .\"/usr/bin/nroff -mandoc man_page | less .Dd July 30, 2020 .Dt SYSTEMSETUP 8 .Os "macOS" .Sh NAME .Nm systemsetup .Nd configuration tool for certain machine settings in System Preferences. .Sh SYNOPSIS .Nm .Op Fl getdate .Op Fl setdate Ar mm:dd:yy .Op Fl gettime .Op Fl settime Ar hh:mm:ss .Op Fl gettimezone .Op Fl listtimezones .Op Fl settimezone Ar timezone .Op Fl getusingnetworktime .Op Fl setusingnetworktime Ar on | off .Op Fl getnetworktimeserver .Op Fl setnetworktimeserver Ar timeserver .Op Fl getsleep .Op Fl setsleep Ar minutes .Op Fl getcomputersleep .Op Fl setcomputersleep Ar minutes .Op Fl getdisplaysleep .Op Fl setdisplaysleep Ar minutes .Op Fl getharddisksleep .Op Fl setharddisksleep Ar minutes .Op Fl getwakeonmodem .Op Fl setwakeonmodem Ar on | off .Op Fl getwakeonnetworkaccess .Op Fl setwakeonnetworkaccess Ar on | off .Op Fl getrestartpowerfailure .Op Fl setrestartpowerfailure Ar on | off .Op Fl getrestartfreeze .Op Fl setrestartfreeze Ar on | off .Op Fl getallowpowerbuttontosleepcomputer .Op Fl setallowpowerbuttontosleepcomputer Ar on | off .Op Fl getremotelogin .Op Fl setremotelogin Ar on | off .Op Fl getremoteappleevents .Op Fl setremoteappleevents Ar on | off .Op Fl getcomputername .Op Fl setcomputername Ar computername .Op Fl getstartupdisk .Op Fl liststartupdisks .Op Fl setstartupdisk Ar path .Op Fl getwaitforstartupafterpowerfailure .Op Fl setwaitforstartupafterpowerfailure Ar value .Op Fl getdisablekeyboardwhenenclosurelockisengaged .Op Fl setdisablekeyboardwhenenclosurelockisengaged Ar yes | no .Op Fl getkernelbootarchitecturesetting .Op Fl setkernelbootarchitecture Ar i386 | x86_64 | default .Op Fl version .Op Fl help .Op Fl printCommands .Sh DESCRIPTION The .Nm command is used to configure certain per-machine settings typically configured in the System Preferences application. The .Nm command requires at least "admin" privileges to run. .Pp A list of flags and their descriptions: .Bl -tag -width indent .It Fl getdate Displays the current date. .It Fl setdate Ar mm:dd:yy Use this command to set the current month, day, and year. .It Fl gettime Displays the current time in 24-hour format. .It Fl settime Ar hh:mm:ss Sets the current time. The provided time argument should be in 24-hour format. .It Fl gettimezone Displays current time zone. .It Fl listtimezones Lists all time zones supported by this machine. .It Fl settimezone Ar timezone Use this command to set the local time zone. Use "-listtimezones" to list valid timezone arguments. .It Fl getusingnetworktime Displays whether network time is on or off. .It Fl setusingnetworktime Ar on | off Sets whether using network time is on or off. .It Fl getnetworktimeserver Displays the currently set network time server. .It Fl setnetworktimeserver Ar timeserver Use this command to designate a network time server. Enter the IP address or DNS name for the network time server. .It Fl getsleep Displays amount of idle time until machine sleeps. .It Fl setsleep Ar minutes Sets amount of idle time until computer sleeps. Specify "Never" or "Off" for computers that should never sleep. Important: if you set the system to sleep, you will not be able to administer the server remotely while it is sleeping. .It Fl getcomputersleep Display amount of idle time until computer sleeps. .It Fl setcomputersleep Ar minutes Set amount of idle time until computer sleeps. Specify "Never" or "Off" for never. .It Fl getdisplaysleep Display amount of idle time until display sleeps. .It Fl setdisplaysleep Ar minutes Set amount of idle time until display sleeps. Specify "Never" or "Off" for never. .It Fl getharddisksleep Display amount of idle time until hard disk sleeps. Specify "Never" or "Off" for never. .It Fl setharddisksleep Ar minutes Set amount of idle time until hard disk sleeps. Specify "Never" or "Off" for never. .It Fl getwakeonmodem Displays whether wake on modem is on or off. .It Fl setwakeonmodem Ar on | off Use this command to specify whether or not the server will wake from sleep when modem activity is detected. .It Fl getwakeonnetworkaccess Displays whether wake on network access is on or off. .It Fl setwakeonnetworkaccess Ar on | off Use this command to specify whether the server wakes from sleep when a network admin packet is sent to it. .It Fl getrestartpowerfailure Displays whether restart on power failure is on or off. .It Fl setrestartpowerfailure Ar on | off Use this command to specify whether the server automatically restarts after a power failure. .It Fl getrestartfreeze Displays whether restart on freeze is on or off. .It Fl setrestartfreeze Ar on | off Use this command to specify whether the server restarts automatically after the system freezes. .It Fl getallowpowerbuttontosleepcomputer Enable or disable whether the power button can sleep the computer. .It Fl setallowpowerbuttontosleepcomputer Ar on | off Enable or disable whether the power button can sleep the computer. .It Fl getremotelogin Displays whether remote login (SSH) is on or off. .It Fl setremotelogin Ar [-f] on | off Sets remote login (SSH) to either on or off. Requires Full Disk Access privileges. Important: If you turn off remote login, you won't be able to administer the server using remote command line tools and SSH. To turn remote login back on, you'll need to connect a monitor and keyboard to the server to administer it locally. Use "setremotelogin -f off" to suppress prompting when turning remote login off. .It Fl getremoteappleevents Displays whether remote apple events are on or off. .It Fl setremoteappleevents Ar on | off Use this command to set whether the server responds to events sent by other computers (such as AppleScripts). Requires Full Disk Access privileges. .It Fl getcomputername Displays computer name. .It Fl setcomputername Ar computername Sets computer name to . This name is used by AFP. .It Fl getlocalsubnetname Display local subnet name. .It Fl setlocalsubnetname Ar name Set local subnet name to . .It Fl getstartupdisk Displays current startup disk. .It Fl liststartupdisks Lists all valid startup disks on this computer. .It Fl setstartupdisk Ar path Sets current startup disk to the indicated path. Valid arguments can be listed using "-liststartupdisks." .It Fl getwaitforstartupafterpowerfailure Get the number of seconds after which the computer will start up after a power failure. .It Fl setwaitforstartupafterpowerfailure Ar seconds Set the number of seconds after which the computer will start up after a power failure. The value must be a multiple of 30 seconds. .It Fl getdisablekeyboardwhenenclosurelockisengaged Get whether or not the keyboard should be disabled when the X Serve enclosure lock is engaged. .It Fl setdisablekeyboardwhenenclosurelockisengaged Ar yes | no Set whether or not the keyboard should be disabled when the X Serve enclosure lock is engaged. .It Fl getkernelbootarchitecturesetting Gets the Kernel Architecture setting from the com.apple.Boot.plist. .It Fl setkernelbootarchitecture Ar i386 | x86_64 | default Set the kernel to boot in 32 or 64 bit mode on next boot. default removes the setting. .It Fl version Displays version of systemsetup tool. .It Fl help Displays a list of all the commands available in the System Setup Tool, with explanatory information. .It Fl printCommands Displays a list of commands with no detail. .El .Sh FILES .Bl -tag -width "/usr/sbin/installer" -compact .It Pa /usr/sbin/systemsetup .El .Sh EXAMPLES .Nm -setdate 04:15:02 .Pp .Nm -settime 16:20:00 .Pp .Nm -settimezone US/Pacific .Pp .Nm -setnetworktimeserver time.apple.com .Sh SEE ALSO .\" List links in ascending order by section, alphabetically within a section. .\" Please do not reference files that do not exist without filing a bug report .Xr networksetup 8 .\" .Sh BUGS \" Document known, unremedied bugs .\" .Sh HISTORY \" Document history if command behaves in a unique manner