These operations are performed using the "Users and Groups" control panel in Windows.
Logout as root and log back in as that user, and do most of your work as that user. When you need to work as root, execute the command su (which will prompt you for the root password) to temporarily become root. When you have finished the work which required root privilege, use the exit command to return to being a non-root user.
There are some nice screen savers that will run under non-root users. Unfortunately, in the past, some of the 3D ones could lock your system up tightly enough to force you to power down. The safest thing is to select the "Blank Screen Only" mode in xscreensaver-command -prefs.
A systems administrator NEVER walks away from her/his console without first locking the screen.Note that in order to use the 3-D screensavers, you must be a member of the video group. We will learn how to do this in week 6.You can do this with xscreensaver-command -lock.
To find out if a device is supported, you have to know which version of the kernel you are running, and what capabilities were built into it. Suppose you wanted to see if your kernel supports the Realtek 8169 Gigabit Ethernet adaptor. You would first examine the
Kconfigs files in the linux source tree (here collected into one file for your convenience)for your Linux distribution to identify the "config" parameter associated with that device. Loading the file (either into your browser, emacs or less), and searching for
Realtek 8169tells you that the configuration parameter is called "R8169". Then examine the configuration file for your kernel:
/boot/config-3.13.3 was used for our kernel(either by loading the file and searching for R8169, or by using the "grep" command:
grep /boot/config-3.13.3 -e R8169Either way, you find the line "CONFIG_R8169=m", which tells you that support for that device has been built into your kernel as a module which can be loaded and unloaded dynamically as needed. If the result had been "CONFIG_R8169=y", the driver was built into the kernel as it is loaded at boot time, and is always in memory, and if the result had been "CONFIG_R8169=n", there would be no support for this device in your kernel.grep is like the Windows FIND command after it has been bitten by a radioactive spider.The "i" option tells grep to be "case-insensitive" when searching for the string "passwd"; this allows for matching of the string at, for instance, the beginning of a sentence. The "l" option tells grep to simply "list" the names of the files in which the string occurs, and the "e" option specifies that the next string is the "expression" you which to search for. The asterisk is a "wild-card", which matches any string; here, as often, it is used to specify any filename ending in ".html". We used the asterisk in step 5 of week 2 to copy everything in / to the hard drive.grep is your friend. For example, you can use it as a sort of dynamic glossary. Suppose you save a copy of each page of these notes in the directory "notes". To find which pages contain references to "passwd", you would simply
grep -ile 'passwd' notes/*.htmlwhich results in the following output:notes/week1.htmlThis tells you that the passwd command (or something related to it) is discussed in the notes for weeks 1, 3, 6, 13 and 14.
notes/week3.html
notes/week6.html
notes/weekd.html
notes/weeke.html
Note that newer devices which use the same chip set as an older device will often work with the older device driver.Linux support for newer devices, particularly video cards, often lags behind Windows support. When a manufacturer designs a new device, they write a Windows device driver for it and provide both the hardware and software to Microsoft so that it can be integrated into the operating system. When someone in the Linux community wants support for a new device, they have to buy one of the devices for themselves, either write a new driver or modify an existing one to work with it, and then give it to the open source community for testing and integration.
Suppose you wanted to find out quickly what the major and minor device numbers were for SCSI drives sdb1 and sdb2. Here are several ways to do this:
The first two provide a "long" list of the devices files, which show the numbers preceding the creation date, as well as the device type (block) in the first letter of the output. The "[12]" is a way of allowing either character to match in the filename (and can be used with grep), and the "{1,2}" is similar but can be expanded to include whole strings in the place of the numerals.
These two methods only work if the device file exists. More about this when we discuss udevd next week.The last way illustrates both a way to see the 10 lines surrounding any grep match (the "Context"), and that sometimes you get much more information than you expected!
Examine /boot/config-3.13.3 and Kconfigs to see which filesystem types are supported by this version of Linux.
In general, Windows only supports three types of filesystems: FAT, NTFS, and ISO-9660.
A folder is an icon representing a directory; if the directory is not specified, the current working directory is listed. The complete (or absolute) path to a directory starts with the root directory, such as "/etc/rc.d/init.d". By convention, filenames beginning with a period are not listed unless the "a" option is used to list "all" filenames. A single period denotes the current directory, and two periods denotes the parent directory.(This is sort of like the DIR command in Windows.)
and of course, you can always use emacs or nano (if X-Windows is not running), or another editor, to examine a file.
rm -r directory will delete all of the files and subdirectories in directory, and then rmdir the directory itself.
The du command can be invaluable in finding out which directories in your system are taking up the most space.
fuser -v filedisplays information about processes which have a given file or directory open. As is the case for many commands, the "v" option tells fuser to be "verbose".
The command hdparm -tT /dev/sdb will run timing tests on it; these are an indicator of potential throughput.
ANY OTHER USAGE OF HDPARM IS DANGEROUS; if there is something you want to try in the lab, check first with the instructor. If you damage the hard drive using hdparm without having first obtained permission from the instructor, you will be subject to the withdrawal/expulsion policy outlined in the syllabus under the section "Tests and Grades".
Note that some hard drives also contain cache, which is not guaranteed to be flushed with a sync command.
touch filecreates a sort of filesystem time stamp which can be used to flag important events in the life of a filesystem. For instance, if you touch /root/.installed immediately after installing your OS, find / -xdev -newer /root/.installed will find all files and directories modified since installation.
Note that the find command is not the same as the FIND command in Windows. We will discuss the find command in more detail in week 8.
Remember to unmount the drive before removing it physically from the interface; like floppies, there is no guarantee that the filesystem on the drive is in a consistent state if you remove it while it is still mounted.
You may have to modprobe loop to load the loopback module if it has not already been loaded.We did this in step 5 last week.
Window's DISKCOPY command is a very limited form of dd.
©2015, Kenneth R. Koehler. All Rights Reserved. This document may be freely reproduced provided that this copyright notice is included.
Please send comments or suggestions to the author.