NETRC(5)
π NETRC(5) β the file formats manual page, but make it cute π
okay bestie so this is NETRC(5), straight out of the File Formats Manual, and it's literally the glow-up guide for your ftp autologin era. no cap. β¨
πΈ NAME πΈ
netrc β user configuration for ftp π¦
β¨ SYNOPSIS β¨
~/.netrc
that's it. that's the whole vibe. one lil hidden file in your home directory. iconic. π
π DESCRIPTION π
so this file is where you keep your configuration and autologin info for the File Transfer Protocol client ftp(1). it's giving "let me log in without typing my whole life out every single time." π
the .netrc file holds the login and initialization info that the auto-login process uses. it lives in the user's home directory. here are the tokens it recognizes β and bestie, they can be separated by spaces, tabs, or new-lines, so go off with the formatting fr fr:
machine nameβ identifies a remote machine name. the auto-login process searches the.netrcfile for amachinetoken that matches the remote machine you specified on theftpcommand line or as anopencommand argument. once a match is made, the subsequent.netrctokens get processed, and it stops when it hits the end of file or runs into anothermachinetoken or adefaulttoken. so orderly. so demure. π§defaultβ this is the same asmachine nameexcept thatdefaultmatches any name. there can be only onedefaulttoken, and it must come after all themachinetokens. no queue-jumping allowed. it's normally used like this:
default login anonymous password user@site
which gives you automatic anonymous ftp login to machines that aren't listed in .netrc. and if you want to be like "not today," you can override all of it by using the -n flag to disable auto-login. π
login nameβ identifies a user on the remote machine. if this token is present, the auto-login process will initiate a login using the specified name. main character entrance, honestly. βpassword stringβ supplies a password. if this token is present, the auto-login process will supply the specified string when the remote server requires a password as part of the login process.
π¨ okay important warning time: if this token is present in the.netrcfile for any user other thananonymous,ftpwill abort the auto-login process if the.netrcis readable by anyone besides the user. so lock that file down, bestie. permissions are not a suggestion. π₯
account stringβ supplies an additional account password. if this token is present, the auto-login process will supply the specified string if the remote server requires an additional account password, or the auto-login process will initiate anACCTcommand if it doesn't. versatile queen. πmacdef nameβ defines a macro. this token functions just like theftpmacdefcommand functions. a macro gets defined with the specified name; its contents begin with the next.netrcline and continue until a null line (that's consecutive new-line characters, not one) is encountered. and if you define a macro namedinit, it is automatically executed as the last step in the auto-login process. surprise bonus feature, we love her. π
π¦ SEE ALSO π¦
and that's the whole page, bestie β no skips, no summaries, every token accounted for. mwah. π«Ά
this lil cutie came from Linux NetKit (0.17) and was dated September 23, 1997 β vintage but still slaying, honestly. πβ¨π
π¦ where this page comes from
- debian bookworm: ftp-ssl 0.17.34+really0.17-1+b1 Β· BSD-4-clause-UC
- debian trixie: ftp-ssl 0.17.34+really0.17-2 Β· BSD-4-clause-UC
- ubuntu jammy: ftp-ssl 0.17.34+really0.17-1 Β· BSD-4-clause-UC
- ubuntu noble: ftp-ssl 0.17.34+really0.17-1build2 Β· BSD-4-clause-UC
- ubuntu questing: ftp-ssl 0.17.34+really0.17-2
- ubuntu resolute: ftp-ssl 0.17.34+really0.17-3 Β· BSD-4-clause-UC
- ubuntu stonking: ftp-ssl 0.17.34+really0.17-3build1 Β· BSD-4-clause-UC
- Copyright (c) 1985, 1989, 1990 The Regents of the University of California
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms