Idiot's Guide to Basic UNIX Commands
This is a simple list of commands needed to install applications, plugins or do some other "unixy" stuff on the AppleTV.
Contents
Become root
sudo -s
- sudo will ask for the current user's password, which is "frontrow".
- type "exit" to "undo" being root.
Kill Finder.app
kill $(ps ax | grep [F]inder | cut -c 1-5)
Mount/unmount a dmg file
Unmounting
hdiutil detach /Volumes/<name of image>
If that doesn't work:
hdiutil detach -Force /Volumes/<name of image>
Mounting
hdiutil mount someimage.dmg
Remount your root (/) file system read/write
- needs to be executed as root user (see above)
mount -rw /dev/disk0s3 /
Move files around
- might need to have the root file system mounted in read/write mode
mv /file/you/want/to/move /target/location/
Start shlight
- needs shlight installed
- if problems arise, please first add the servername to
/etc/hosts
(see below)
/usr/sbin/shlight //<servername>/<sharename> /Users/frontrow/Movies/somemountpoint
Add a host to /etc/hosts
echo -e "<ip>\t<servername>" >> /etc/hosts
Get a screen capture of your AppleTV
screencapture -s filename.png
Shutdown/reboot/scheduler
sudo reboot sudo halt (I had some problems rebooting after this, not sure what it is) pmset sleepnow (does not work) pmset schedule sleep "05/05/09 22:08:00" (pmset: Error in scheduling operation) pmset schedule wakeorpoweron "05/05/09 22:08:00" (pmset: Error in scheduling operation)