In Linux, download it, give it execution permission and copy it to one of the PATH directories (typically, /usr/local/bin).
After that, you should be able to call it from the command line as youtube-dl or youtube-dl.py. Usage instructions are easy. Use youtube-dl followed by a video URL or identifier. Example:
# youtube-dl "http://www.youtube.com/watch?v=foobar"
The video will be saved to the file foobar.flv in that example. As YouTube.com videos are in Flash Video format, their extension should be flv. In Linux and other unices, video players using a recent version of ffmpeg can play them. That includes MPlayer, VLC, etc.
Some videos require an account to be downloaded, mostly because they're flagged as mature content. You can pass the program a username and password for a YouTube.com account with the -u and -p options, like
# youtube-dl -u myusername -p mypassword "http://www.youtube.com/watch?v=foobar"
Another useful options:
* For usage instructions, use youtube-dl -h or youtube-dl --help.
* youtube-dl can attempt to download the best quality version of a video by using the -b or --best-quality option.
* youtube-dl can attempt to download the mobile quality version of a video by using the -m or --mobile-version option.