In which language is Linux written? What does the language have to do with the success of Linux? - ANS More than 95 percent of the Linux operating system is written in the C programming language, and C is portable because it is written in a higher-level, machine-independent language. (The ...
In which language is Linux written? What does the language have to do with the success of
Linux? - ANS More than 95 percent of the Linux operating system is written in the C
programming language, and C is portable because it is written in a higher-level,
machine-independent language. (The C compiler is written in C.)Because Linux is portable, it
can be adapted (ported) to different machines and can meet special requirements.
What is a shell? How does it work with the kernel? With the user? - ANS In a textual
environment, the shell—the command interpreter—acts as an interface between you and the
operating system. When you enter a command on the screen, the shell interprets the command
and calls the program you want.
Where on the disk should you put your /boot partition or the root (/) partition if you do not use a
/boot partition? - ANS Put /boot at the beginning of the drive (partition 1) so that there is no
issue
of Linux having to boot from a partition too far into the drive.
When might you specify an ext2 filesystem instead of ext4? - ANS Use ext2 for partitions
whose data does not change often, such as /boot. The added overhead of the ext3 journal offers
no benefit on these filesystems.
Why would you place /var at the beginning of the disk? - ANS The /var filesystem contains
files that are modified frequently. The beginning of the disk is near the outer edge and data can
usually be accessed faster from this location.
How can you keep other users from using write to communicate with you? Why would you want
to? - ANS Give the command mesg n to keep ordinary users from writing to your termi-
nal. You can take this action when you do not want to be disturbed or when you are viewing
something on your screen that you do not want overwritten.
What happens when you use diff to compare two binary files that are not identical? (You can
use gzip to create the binary files.) Explain why the diff output for binary files is different from the
diff output for ASCII files. - ANS Give the command mesg n to keep ordinary users from
writing to your terminal. You can take this action when you do not want to be disturbed or when
you are viewing something on your screen that you do not want overwritten.
, What is an inode? What happens to the inode when you move a file within a filesystem? - ANS
An inode is the control structure for a file. If the two filenames have the same inode number,
they share the same control structure and are links to the same file.
Assume permissions on a file allow you to write to the file but not to delete it.
a. Give a command to empty the file without invoking an editor.
b. Explain how you might have permission to modify a file that you cannot delete. - ANS
Although it protects you from overwriting a file using redirection, noclobber does not stop you
from overwriting a file using cp or mv. These utilities include the -i (interactive) option that helps
protect you from this type of mistake by verifying your intentions when you try to overwrite a file.
Why does the noclobber variable not protect you from overwriting an existing file with cp or mv?
- ANS The noclobber variable keeps the shell from overwriting a file and does not work on
utilities. Thus it keeps a redirect symbol (>) from allowing the shell to overwrite a file (the shell
redirects output) but has no effect when you ask cp or mv to overwrite a file.
Discuss the client/server environment set up by the X Window System. How does the X server
work? List three X clients. Where is the client and where is the server when you log in on a local
system? What is an advantage of this setup? - ANS When you start an X Window System
session, you set up a client/server environ- ment. One process, called the X server, displays a
desktop and windows under X. Each application program and utility that makes a request of the
X server is a client of that server. Examples of X clients include xterm, Compiz,
gnome-calculator, and such general applications as word processing and spreadsheet
programs. A typical request from a client is to display an image or open a window.Separating
the physical control of the display (the server) from the processes needing access to the display
(the client) makes it possible to run the server on one computer and the client on another
computer.
When a user logs in, you would like the system to first check the local /etc/passwd file for a
username and then check NIS. How do you implement this strategy? - ANS The
/etc/nsswitch.conf file controls the order in which sources are consulted to fulfill a request from
the system. The following entry in this file causes the system to check /etc/passwd first and NIS
second:
passwd: files nis
Some older kernels contain a vulnerability that allows a local user to gain root privileges. Explain
how this kind of vulnerability negates the value of a chroot jail. - ANS On Unix-like
operating systems, such as Linux, a chroot jail is the common expression used to describe a
section of a filesystem that is sectioned off for a particular user. On a web server, it is particularly
useful for the security of shared hosting accounts.
Without a chroot jail, a user with limited file permissions would still be able to navigate to
top-level directories.
Give the command
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller DocLaura. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $9.79. You're not tied to anything after your purchase.