ArticleslgStudy

computer science

Berkeley r-commands

Berkeley r-commands is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Berkeley r-commands rather than just read about it. In short: The Berkeley r-commands are a suite of computer programs designed to enable users of one Unix system to log in or issue commands to another Unix computer via TCP/IP computer network. The r-commands were developed in 1982 by the Computer Systems Research Group (CSRG) at the University of California, Berkeley, based on an early implementation of TCP/IP (the protocol stack of the Internet).

Key takeaways

  • Berkeley r-commands belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Berkeley r-commands to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Berkeley r-commands from memory before moving on to harder problems.

Reference excerpt

The Berkeley r-commands are a suite of computer programs designed to enable users of one Unix system to log in or issue commands to another Unix computer via TCP/IP computer network. The r-commands were developed in 1982 by the Computer Systems Research Group (CSRG) at the University of California, Berkeley, based on an early implementation of TCP/IP (the protocol stack of the Internet). The CSRG incorporated the r-commands into their Unix operating system, the Berkeley Software Distribution (BSD). The r-commands premiered in BSD v4.1. Among the programs in the suite are: rcp (remote copy), rexec (remote execution), rlogin (remote login), rsh (remote shell), rstat, ruptime, and rwho (remote who). The r-commands were a significant innovation, and became de facto standards for Unix operating systems. With wider public adoption of the Internet, their inherent security vulnerabilities became a problem, and beginning with the development of Secure Shell protocols and applications in 1995, its adoption entirely supplanted the deployment and use of r-commands (and Telnet) on networked systems.

Protocol The original Berkeley package that provides rlogin also features rcp (remote-copy, allowing files to be copied over the network) and rsh (remote-shell, allowing commands to be run on a remote machine without the user logging into it).

As an example, the protocol is as follows:The server returns a single null character in response, meaning the connection is established. For example:Both rlogin and rsh share the /etc/hosts.equiv (applies to all users on the server) and $HOME/.rhosts (applies to only the user that puts the file in its home folder) access-control scheme, although they connect to different daemons. rlogin connects to rlogind, while rsh connects to rshd. hosts.equiv and .rhosts uses the same format. The following shows some aspects of the format:This allows all users from host1 to login, user_a from host2 to login, no users from host3, all users on group1 except user_b, and no users on group2.

Commands

rlogin

rlogin enables a user to log in on another server via computer network, using TCP network port 513. rlogin is also the name of the application layer protocol used by the software, part of the TCP/IP protocol suite. Authenticated users can act as if they were physically present at the computer. RFC 1282, in which it was defined, states: "The rlogin facility provides a remote-echoed, locally flow-controlled virtual terminal with proper flushing of output." rlogin communicates with a daemon, rlogind, on the remote host. rlogin is similar to the Telnet command, but is not as customizable and is able to connect only to Unix-like hosts.

rsh

rsh opens a shell on a remote computer without a login procedure. Once connected, the user can execute commands on the remote computer through the shell's command-line interface. rsh passes input and output through the standard streams, and it sends standard output to the user's console. Over the network, standard input and standard out flow through TCP port 514, while Standard Error flows through a different TCP port, which the rsh daemon (rshd) opens.

rexec Like rsh, rexec enables the user to run shell commands on a remote computer. However, unlike the rsh server, the rexec server (rexecd) requires login: it authenticates users by reading the username and password (unencrypted) from the network socket. rexec uses TCP port 512.

rcp rcp can copy a file or directory from the local system to a remote system, from a remote system to the local system, or from one remote system to another. The command line arguments of cp and rcp are similar, but in rcp remote files are prefixed with the name of the remote system:

rcp file.txt subdomain.domain:~/home/foo/file.txt

As with the Unix copy command cp, rcp overwrites an existing file of the same name in the target; unlike cp, it provides no mechanism for warning the user before overwriting the target file. Like rsh, rcp uses TCP port 514.

rwho Just as the who command lists the users who are logged in to the local Unix system, rwho lists those users who are logged into all multi-user Unix systems on the local network. It displays the user name, the name of the host from which the user is connected, and the start date and time of the login session. rwho's daemon, rwhod, maintains a database of the status of Unix systems on the local network. The daemon and its database are also used by the ruptime program. Unlike the finger protocol, rwho does not display information from users' .plan or .project files, such as a user's real name or email address.

rstat rstat returns performance statistics from the kernel.

ruptime Just as the uptime command shows how long a Unix system has been running since the last restart, ruptime requests a status report from all computers on the local network. It then returns the uptime report. If a computer did not respond within the time limit, then ruptime reports that the system is down. This information is tracked and stored by the daemon rwhod, which is also used by the rwho command.

Security

Those r-commands which involve user authentication—rcp, rexec, rlogin, and rsh)—share several security vulnerabilities:

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Berkeley r-commands

Start with the simplest possible case. Write down what Berkeley r-commands claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Berkeley r-commands before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Berkeley r-commands ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Berkeley r-commands

In research
Berkeley r-commands appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Berkeley r-commands in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Berkeley r-commands is common in secondary-school and first-year university syllabi. It links to neighbouring topics Internet Standards, Internet protocols, Unix network-related software, so understanding it makes those chapters shorter.
In everyday life
Look for Berkeley r-commands outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Berkeley r-commands” →

How to study Berkeley r-commands in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Berkeley r-commands means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Berkeley r-commands out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Berkeley r-commands in simple terms?

The Berkeley r-commands are a suite of computer programs designed to enable users of one Unix system to log in or issue commands to another Unix computer via TCP/IP computer network. The r-commands were developed in 1982 by the Computer Systems Research Group (CSRG) at the University of California…

Why does Berkeley r-commands matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Berkeley r-commands?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Berkeley r-commands.

Tags

  • Internet Standards
  • Internet protocols
  • Unix network-related software

Keep exploring