New English words 24

¡Supera tus tareas y exámenes ahora con Quizwiz!

*thrifty*

careful about how you spend money so that you do not waste any Synonyms and related words Careful with money:thrifty, economical, frugal...

baseless

not based on facts or evidence baseless allegations

willpower

self-control, will power, self-command, self-possession, self-will, possession կամքի ուժ

The traditional network infrastructure market is *UNDERGOING A RAPID SHIFT.*

...

*Use the 'last' command to see if the student has ever logged in:* There is also a *'lastb'* command, which works similar to the last command except that it shows *"bad" or failed log in attempts.*

If you no longer wanted the student user to have access to the system, then the "usermod -L" student command could be used to "lock" the account. The account could be unlocked with the "usermod -U" student command. A more permanent solution to preventing access to the student account would be to delete the account with either the 'userdel' student or 'userdel -r' student commands. Using the -r option with the 'userdel' command removes the user's home directory and mail, in addition to deleting the user's account.

NP-Complete -- > We can check a solution very quickly, in polynomial time -- > If we can solve one NP-Complete quickly, we can solve them all

NP-Hard -- > -- >

The first line of the function definition is called the HEADER; the rest is called the BODY. The header has to end with a colon and the body has to be indented. By convention, the indentation is always four spaces To end the function, you have to enter an empty line (this is not necessary in a script).

The statements inside the function do not get executed until the function is called, and the function definition generates no output. A function call is like a detour in the flow of execution. Instead of going to the next statement, the flow jumps to the body of the function, executes all the statements there, and then comes back to pick up where it left off.

This confusion typically stems

...

astronomical numbers

...

Create a branch Let us name our new branch «style». Run: git checkout -b style git status Note that the git status command reports that you are in the style branch.

1978 ps aux | grep mme 1979 kill -9 19877

wither

1 wither or wither away [INTRANSITIVE] to become weaker or smaller and then disappear They worry that honoured traditions will wither. Their love was withering away. Synonyms and related words To disappear, or to stop existing or happening:X has left the building, disappear, finish... Explore Thesaurus 2 [INTRANSITIVE] if plants or flowers wither, they become drier and start to die The spring flowers were already beginning to wither. Synonyms and related words What plants can do:bear, bloom, blossom... Explore Thesaurus a. [TRANSITIVE] to make a plant or flower become drier and start to die Synonyms and related words To damage or spoil something:damage, spoil, mark... Explore Thesaurus 3 [TRANSITIVE] to make someone feel silly or ashamed Synonyms and related words To make someone feel ashamed or embarrassed:embarrass, humiliate, shame..

*1.12 Initialization Files* When a user opens a new shell, either during login or when they run a terminal that starts a shell, the shell is customized by files called initialization (or configuration) files. These initialization files set the value of variables, create aliases and functions, and execute other commands that are useful in starting the shell. There are two types of initialization files: "global" initialization files which affect all users on the system and "local" initialization files that are specific to an individual user. The global configuration files are located in the "/etc directory". Local configuration files are stored in the user's home directory. 1.14 BASH Exit Scripts Just as bash executes one or more files upon starting up, it also may execute one or more files upon exiting. As bash exits, it will execute the *~/.bash_logout* and "/etc/bash_logout" files, if they exist. Typically these files are used for "cleaning up" tactics as the user exits the shell. For example, the default ~/.bash_logout executes the clear command to remove any text present in the terminal screen. Consider This When a new user is created, the files from the */etc/skel* directory are automatically copied into the new user's home directory. As an administrator, you can modify the files in the "/etc/skel" directory to provide custom features to new users. ls -a /etc/skel [sysadmin@localhost ~]$ ls -a /etc/skel . .. .bash_logout .bash_profile .bashrc

*/etc/profile* This file can only be modified by the administrator and will be executed by every user who logs in. Administrators use this file to create key environment variables, display messages to users as they log in and set key system values. *~/.bash_profile* Each user has their own ".bash_profile" file in their home directory. The purpose for this file is the same as the /etc/profile file, but having this file allows a user to customize the shell to their own tastes. Normally used to create customized environment variables. *~/.bashrc* Each user has their own ".bashrc" file in their home directory. The purpose for this file is to generate things that need to be created for each shell, such as local variables and aliases. */etc/bashrc* This file may affect every user on the system. Only the administrator can modify this file. Like the .bashrc file, the purpose for this file is to generate things that need to be created for each shell, such as local variables and aliases.

The 'locate' command accepts the '-r' option to use Regular Expressions in the search pattern. Regular expressions will provide a more powerful way to search for files and will be covered extensively later in the course. To have the locate command not be case sensitive, use the -i option. The 'locate' command will display all files that have the search term anywhere in the file name. For example, the command 'locate passwd' would match both /etc/opasswd and /etc/thishaspasswdinit. However, if you want to use the locate command to search for a file that was created very recently, it will fail to find the file if the database hasn't been updated since the file creation.

*The 'find' command is slower than the locate command because it searches directories in real-time; however, it doesn't suffer from problems associated with an outdated database.* *sysadmin@localhost:~$ find . -name Download* -iname LOSTFILE Case insensitive search by name -mtime -3 Files modified less than three days ago -mmin -10 Files modified less than ten minutes ago -size +1M Files larger than one megabyte -user joe Files owned by the user joe -nouser Files not owned by any user -empty Files that are empty -type d Files that are directory files -maxdepth 1 Do not use recursion to enter subdirectories; only search primary directory

14.12 /etc/services File In order to make it easy to distinguish between packets destined for different services, each service is assigned one or more port numbers. If you consider an IP address to be like a street number for an apartment complex, a port number is like a number for a specific residence within the apartment. The /etc/services file is used for mapping application service names to port numbers. This file exists on each system and can be modified only by the root user.

*The host command is used to resolve host names to IP addresses and IP addresses to host names. The utility uses UDP for transport of queries to the servers listed in the /etc/resolv.conf file.* To find the IP address of a host, execute the following command: sysadmin@localhost:~$ host netdevgroup.com To find the DNS servers for a domain, do not specify the host and use the -t option with an argument of ns, execute the command: sysadmin@localhost:~$ host -t ns netdevgroup.com

21.7 loop Option Almost everything in Linux is a file, including optical disks. If there is an image of a disk inside a file, it can be mounted directly from the file without needing to burn the image back on a disk using the loop option. The loop option is used to mount special filesystems that are stored within a file. These files have the extension of .img or .iso (for ISO 9660 filesystem files), which contain complete filesystems that can be mounted with the mount command by using the loop option: root@localhost:~# mount -o loop fs.img /mnt or: root@localhost:~# mount -o loop cdrom.iso /mnt Recall that the df command can also be used to view mounted filesystems. The output of this command displays the usage of the filesystem, where it's mounted, and the space usage of the device. To have the df command display filesystem sizes in human-readable format, use the -h option. Use the -T option to have the df command display the filesystem type: root@localhost:~# df -hT

...

25.6 Using rpm2cpio The rpm2cpio command accepts an .rpm file as an argument (or reads data that is in a "package" format from standard input) and outputs a cpio archive. This capability can be used to list the contents of an .rpm file or to extract one or more files from within the original .rpm file. To copy these files from the .rpm file, use the following command to extract these files to the current directory: [sysadmin@localhost ~]$ rpm2cpio telnet-server-0.17-47.el6_3.1.i686.rpm | cpio -imud Several options for the cpio command are listed in the table below. Option Purpose -i Extract -m Retain the original modification times on the files -u Unconditionally replace any existing files -d Create any parent directories of the files contained within the archive Consider This Why use the rpm2cpio command? Consider a situation where a key package file is accidentally removed from the system. Reinstalling the entire package is a bit of an overkill, when only a single file is needed. Using the rpm2cpio command, the file that is missing can be extracted and copied back into the appropriate directory.

...

Mounting of partitions and checking on existing mounts is accomplished with the mount command. Called with no arguments, mount shows the currently mounted devices. Calling mount without any arguments can be performed by regular users, not just the root user. The general format of this output is: description of source on mount point type filesystem type (options)

...

The following example shows the error message that is displayed if you attempt to hard link to a directory: sysadmin@localhost:~$ ln /bin binary ln: `/bin': hard link not allowed for directory Linking to directories using a symbolic link is permitted: sysadmin@localhost:~$ ln -s /bin binary sysadmin@localhost:~$ ls -l binary lrwxrwxrwx. 1 sysadmin sysadmin 11 Oct 31 13:17 binary -> /bin

...

There are three steps in the process of making and using partitions: Divide the hard drive into partitions Format the hard drive with a filesystem Mount the filesystem onto the directory tree

...

This library will cater to the needs of three different groups of students: law students, engineering students and general education students.

...

this reflects the fact that

...

to delete a file a user needs to have write permission in the directory that the file is stored in. File permissions do not apply when deleting a file.

...

tactile

1 concerning the sense of touch a tactile sensation Synonyms and related words Feeling and the sense of touch:feeling, sensation, tactile... Explore Thesaurus 2 a tactile person likes to touch other people a lot, for example when talking to them Synonyms and related words Expressing affection physically:mwah, kiss, hug...

agony

1 great pain in agony: William fell to the ground, writhing in agony. Synonyms and related words Pain and pains:ache, agony, anguish... Explore Thesaurus 2 a strong and unpleasant feeling, especially great worry or sadness agony of: She had to go through the agony of leaving her children. be agony: Waiting for the results was agony. in an agony of LITERARY: I was in an agony of embarrassment. Synonyms and related words Sadness and unhappiness:sadness, depression, grief... Explore Thesaurus Synonyms and related words Feelings of worry and nervousness:worry, concern, stress... Explore Thesaurus PHRASES pile on the agony prolong the agony

sore

1 painful and uncomfortable, usually as a result of an injury, infection, or too much exercise I always feel stiff and sore after gardening. Her eyes were sore from studying all night. a sore throat Synonyms and related words Physically painful and describing pain:achy, acute, agonising... Explore Thesaurus Synonyms and related words In pain:agonised, agonized, anguished... Explore Thesaurus 2 MAINLY AMERICAN INFORMAL OLD-FASHIONED angry, or offended Helen was still feeling sore about what had happened. Synonyms and related words Feeling angry or annoyed:angry, annoyed, upset... Explore Thesaurus 3 [ONLY BEFORE NOUN] MAINLY LITERARY great: used for emphasizing that something is very serious or that it upsets you a lot a sore temptation/disappointment Synonyms and related words Serious, severe and extreme:the nuclear option, serious, severe... Explore Thesaurus PHRASES a sore loser a sore point/spot/subject stick/stand out like a sore thumb

tangle (verbo խճճվել tangle, kink, mat խառնաշփոթություն tangle խճճել immerse, muddle, hash, tumble, tangle, complicate sostantivo խճճված կծիկ tangle)

1 the untidy shape that things make when they are twisted round each other or round something else Her hair had got into a hopeless tangle. a tangle of narrow streets Synonyms and related words Untidiness and untidy situations:omnishambles, mess, chaos... Explore Thesaurus 2 a situation that is difficult to deal with because things are not organized properly in a tangle: Our financial affairs are in a complete tangle. Synonyms and related words Difficult situations and experiences:crisis, battle, nightmare... Explore Thesaurus Synonyms and related words Something that is difficult or unpleasant to do or deal with:mare, the elephant in the room, task... Explore Thesaurus 3 INFORMAL a fight, or an argument Synonyms and related words Arguments and arguing:argument, disagreement, conflict... Explore Thesaurus Synonyms and related words Physical fights:fight, battle, combat..

cringe

1 to move back slightly from something that is unpleasant or frightening Synonyms and related words Physical sensations and movements in response to emotions:cringe, cringe, flinch... Explore Thesaurus Synonyms and related words To express or react to fear:shout, cry out, tremble... Explore Thesaurus 2 to feel embarrassed or ashamed about something Synonyms and related words To be, or to become ashamed or embarrassed:blush, wince, feel bad (about something)... verb նվաստանալ cringe քծնել crawl, flatter, fawn, cringe, coax, grovel կծկել cramp, cringe, ball, cockle, contract, cower կնճռել cringe, gather, pucker

11.9 HUP Signal When a user logs off the system, all processes that are owned by that user are automatically sent the Hang-up signal SIGHUP. Typically, this signal causes those processes to end. In some cases, a user may want to execute a command that won't automatically exit when it is sent a HUP signal. To have a process ignore a Hang-up signal, start the process with the 'nohup' command. For example, consider a scenario where a user has a script named myjob.sh that needs continue to run all night long. The user should start that script in the background of the terminal by executing: sysadmin@localhost:~$ nohup myjob.sh & After executing the script, the user could proceed to logout. The next time the user logs in, the output of the script, if any, would be contained in the nohup.out file in that user's home directory.

11.10 Process Priority When a process runs, it needs to have access to the CPU to perform actions. Not all processes have the same access to the CPU. For example, system process typically have a higher priority when accessing the CPU. The Linux kernel dynamically adjusts the priority of processes to try to make the operating system seem responsive to the user and efficient at performing tasks. A user can influence the priority that will be assigned to a process by setting a value of something called '''niceness'''. The higher you set the niceness value, the lower the priority that will be assigned to a process. The default value of niceness for processes is zero; most user processes run at this nice value. Only a user with administrative (root) access can set negative niceness values or alter the niceness of an existing process to be a lower niceness value. To set the initial niceness of a command, use the 'nice' command as a prefix to the command to execute. For example, to execute the cat /dev/zero > /dev/null command at the lowest priority possible, execute the following command: sysadmin@localhost:~$ nice -n 19 cat /dev/zero > /dev/null If a user logs in as the root user, they could also execute the cat /dev/zero > /dev/null command with the highest priority possible by executing the following command: root@localhost:~# nice -n -20 cat /dev/zero > /dev/null To adjust the niceness of an existing process, use the 'renice' command. This can be useful when the system becomes less responsive after running a CPU intensive command. A user could make the system more responsive again by making that process run "nicer". To accomplish this, the user would need to discover the process identifier for the process by using the 'ps' command and then use 'renice' to adjust the priority back to normal. For example: su - root nice -n 10 sleep 100 & ps -l ps -l renice -n 15 -p PID ps -l'

11.7 Moving Processes If the sleep command from the previous page is run without the ampersand, the terminal would not be available for 1000 seconds: sysadmin@localhost:~$ sleep 1000 To make the terminal available again, the administrator would have to use CTRL+Z: ^Z [1]+ Stopped sleep 1000 Now the terminal is back, but the sleep command has been paused. To put the paused command in the background, execute the 'bg' command. The 'bg' command resumes jobs without bringing them to the foreground. sysadmin@localhost:~$ bg [1]+ sleep 1000 & A command that has been paused or sent to the background can then be returned to the foreground using the 'fg' command. To bring the sleep command back to the foreground, locking up the terminal again, use the 'fg' command: *sysadmin@localhost:~$ fg sleep 1000* Suppose we have two paused processes: sysadmin@localhost:~$ sleep 1000 ^Z [1]+ Stopped sleep 1000 sysadmin@localhost:~$ sleep 2000 ^Z [2]+ Stopped sleep 2000 sysadmin@localhost:~$ jobs [1]- Stopped sleep 1000 [2]+ Stopped sleep 2000 Both "'bg'" and '"fg'" can take the job number as an argument to specify which process should be resumed. The following commands will resume sleep 1000 in the background and resume sleep 2000 in the foreground respectively: sysadmin@localhost:~$ bg 1 [1]- sleep 1000 & sysadmin@localhost:~$ fg 2 sleep 2000 It is also possible to use the name of the name of the command as an argument: sysadmin@localhost:~$ sleep 1000 ^Z [1]+ Stopped sleep 1000 sysadmin@localhost:~$ bg sleep [1]+ sleep 1000 & Given multiple tasks, and only one terminal to use with them, the "fg" and "bg" commands provide an administrator with the ability to manually multi-task.

11.8 Sending a Signal A signal is a message that is sent to a process to tell the process to take some sort of action, such as stop, restart, or pause. Signals are very useful in controlling the actions of a process. Some signals can be sent to processes by simple keyboard combinations. For example, to have a foreground process paused, send a Terminal Stop signal by pressing CTRL+Z. A Terminal Stop pauses the program, but does not completely stop the program. To completely stop a foreground process, send the Interrupt signal by pressing CTRL+C. There are many different signals, each of them have a symbolic name and a numeric identifier. For example, CTRL+C is assigned the symbolic name SIGINT and the numeric identifier of 2. To see a list of all of the signals available for your system, execute the 'kill -l' command: There are several commands that will allow you to specify a signal to send to process; the 'kill' command is the most typically used. The 'kill' command accepts three different ways to specify the signal: The signal number used as an option: -2 The short name of the signal used as an option: -INT The full name of the signal used as an option: -SIGINT All three options shown above indicate the Interrupt signal. If the user doesn't specify a signal with an option, then the kill command sends the Terminate SIGTERM signal. When sending a signal, specify one or more processes to send the signal to. There are numerous techniques to specify the process or processes. The more common techniques include: Specifying the process identifier (PID) Using the % (percent sign) prefix to the job number Using the -p option along with the process identifier (PID) For example, first imagine a scenario where a user is running some process in the background and that user wants to send a signal to the process. For this demonstration, the sleep command is run in the background: sysadmin@localhost:~$ sleep 5000& [1] 2901 A couple of items are noteworthy from the output of starting this process in the background. First, notice the job number in square brackets: [1]. Second, notice the process identifier (PID) which is 2901. To send the Terminate signal, to this process, you can use any of the following commands: *kill 2901* kill %1 *kill -p 2901* As indicated earlier, the Terminate signal normally will end a process. Sometimes a process will trap the Terminate signal, so it may not end that process. Trapping occurs when a process behaves differently from the norm when it receives a signal; this can be the result of how the programmer created the code for the command. A user could try to use other signals, like SIGQUIT or SIGINT, to try to end a process, but these signals can also be trapped. The only signal that will end a process and can't be trapped is SIGKILL. So, if other signals have failed to end a process, use the SIGKILL signal to force the process to end. Users should not normally use the SIGKILL signal as the initial attempt to try to end a process because this forces the process to end immediately and will not allow the process the opportunity to "clean up" after itself. Processes often perform critical operations, such as deleting temporary files, when they exit naturally. The following examples show how to send the "force kill" signal to a process: *kill -9 2901* kill -KILL %1 kill -SIGKILL -p 2901 There are other commands that send processes signals, such as the 'killall' and 'pkill' commands, which are useful to stop many processes at once; typically the 'kill' command is a good choice for sending signals to a single process. Like the kill command, both the killall and pkill commands accept the three ways to specify a particular signal. Unlike the kill command, these other commands can be used to terminate all processes of a particular user with the -u option. For example, killall -u bob would stop all of the process owned by the user "bob". The killall and pkill commands also accept the name of the process instead of a process or job ID. Just be careful as this may end up stopping more process than you had expected. An example of stopping a process using the process name: sysadmin@localhost:~$ kill sleep -bash: kill: sleep: arguments must be process or job IDs sysadmin@localhost:~$ killall sleep [1]+ Terminated sleep 5000

Some of the key options of the ping command are: -c count Stop after sending count ECHO_REQUEST packets -s packetsize Specifies the number of data bytes to be sent -t ttl Sets the IP Time to Live -w timeout Sets the timeout in seconds for ping to exit

14.16 Using Traceroute The traceroute command is used to trace the route of packets to a specified host. This utility uses the IP header's TTL field and tries to fetch an ICMP TIME_EXCEEDEDresponse from each gateway on the route to the host. The probing is done by sending UDP packets with a small TTL value and then checking the ICMP TIME_EXCEEDEDresponse. Network administrators use this command to test and isolate network problems. This command can be run by root users only. To trace the route to a particular host, execute the command: sysadmin@localhost:~$ traceroute example.com -T Probe using TCP SYN -f first_ttl Specifies the initial TTL value -m max_ttl Specifies the maximum number of hops to be probed -w timeout Sets the timeout in seconds to exit after waiting for a response to a probe

Type the runlevel command to verify that you are at run level S (or single user): [root@centos /]# runlevel N S At the single user run level, only the administrator can access the system. Very few processes are running. The purpose of this run level is to troubleshoot critical system problems. 0 Halt or shut off the system poweroff.target 1 Single-user mode for administrative tasks rescue.target 2 Multi-user mode without configured network interfaces or network services multi-user.target 3 Normal startup of the system multi-user.target 4 User-definable multi-user.target 5 Start the system normally with a graphical display manager graphical.target 6 Restart the system reboot.target

18.2 Default Runlevel Systems using traditional "init" can have the default runlevel changed by modifying the "/etc/inittab" file entry that looks like the following: id:5:initdefault: In this example, the default runlevel indicated is for the system to go to runlevel 5, which is typical for a desktop or laptop system used by an end user. For most Linux systems, runlevel 5 provides the highest level of functionality, including providing a GUI interface. Servers typically don't offer a GUI interface, so the initdefault entry might look like: id:3:initdefault: As previously discussed, the default runlevel can be overridden at boot time by interacting with the bootloader. In the case of GRUB Legacy, either append to the kernel line or use the editing feature to add a runlevel number. For example, adding 5 would take the system to runlevel 5 and the word single (or the uppercase or lowercase letter s) would take the system to the single user runlevel. If the system is using Upstart instead of the traditional init process, then the default "runlevel" may also be set in the "/etc/inittab", as is the case with distributions derived from RedHat Enterprise Linux 6. On the other hand, distributions like Ubuntu (the distribution that developed Upstart) can be changed by setting the DEFAULT_RUNLEVEL environmental variable in the "/etc/init/rc-sysinit.conf" file. Systemd doesn't natively use runlevels, but it has something similar called targets. For example, the graphical.target is similar to the standard runlevel 5, where the GUI is running; the multi-user.target is similar to the standard runlevel 3, where the system is normally running without a GUI. To set a default target, create a symbolic link from the target definition to the /etc/systemd/system/default.target file. First, remove the former default target and then create a new symbolic link like: root@localhost:~# rm -f /etc/systemd/system/default.target root@localhost:~# ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target The previous example sets the default target to graphical.target, so the system would come up to a state like runlevel 5.

18.3 Viewing Current Runlevel One of the commands that displays the current runlevel is the runlevel command, which shows the previous runlevel first followed by the current runlevel. If no previous runlevel was achieved then it will show N for the previous runlevel. This means the system was booted into the current runlevel directly and has not switched. The "who -r" command also displays the current system runlevel. One benefit of this technique is that it will display the date and time that the current runlevel was reached: 18.9 chkconfig Command To view all the services that are set to start or stop automatically, the administrator can execute the "chkconfig --list" command and the output would look something like the following (although there would be many more lines of output): The output for each line shows the name of the script file found in the " /etc/rc.d/init.d" directory, followed by each runlevel number, a colon and whether the service is set to be on or off. For example, based on the output from the previous graphic, the "auditd" service is started at runlevels 2, 3, 4 and 5. [root@localhost ~]# chkconfig --list httpd 18.10 /etc/init Directory For users of Debian-derived Linux distributions, the "/etc/init" directory is used to store Upstart scripts. These scripts will start or stop different services based upon different events, including going to a specific runlevel. For Debian and its derivatives (like Ubuntu), know that the runlevels that are used vary slightly from those defined by the Linux Standard Base 4.1. Runlevel zero, one and six are the same as the standard. However, runlevel two is considered the default runlevel; this runlevel is configured for multiple users with the GUI running, much like the standard runlevel five. Runlevels three, four, and five are initially the same as runlevel two. If an administrator wants to change the runlevels of a service, the configuration file for that service can be modified in the /etc/init directory. For example, in an installation of Ubuntu which includes the Apache web server, this directory normally contains the /etc/init/apache2.conf Upstart configuration file. Within the /etc/init/apache2.conf file should be two lines which define the runlevels to start and stop the server: start on runlevel [2345] stop on runlevel [!2345] In this case, the service would be started up in runlevels two through five and would be stopped in runlevels that are not two through five because ! means "not these". To change the service to only be available in runlevels two and three, change the lines to be like the following: Execute the following commands to view a list of the scripts that are started when the system is brought to runlevel 3: [root@centos ~]# cd /etc/rc.d/rc3.d [root@centos rc3.d]# ls S* Execute the following command to verify that only runlevels 2, 3, 4 and 5 contain start scripts for the sshd service: [root@centos rc3.d]# ls /etc/rc.d/rc[0-6].d/S*sshd Recall that for Upstart these configuration files determine which services are started at different run levels. For example, execute the following command to see which runlevels the ssh service starts: root@ubuntu:~# grep runlevel /etc/init/ssh.conf

18.4 Changing Runlevels The root user can also change runlevels while the operating system is running by using several commands, including the 'init' and 'telinit' commands, which allow the desired runlevel to be specified. For example, to reboot the system, use either the init 6 command or the telinit 6 command. Or, to go to runlevel 5, use either init 5 or telinit 5. 18.8 Runlevel Directories The K scripts sometimes confuse beginning administrators. They often wonder "why should I stop a service when the system is brought to a run level?". This confusion typically stems from the thought that runlevels are only a "boot thing", but as previously mentioned, an administrator can change the system from one runlevel to another. Imagine the httpd service as available at runlevel 5, but not at runlevel 3. When the system is taken from runlevel 5 to runlevel 3, then the httpd service should be stopped. Hence the K scripts. But what if the service isn't running when the K script is called? In that case, the K script is written in such a way to realize this and do nothing.

Traditional disks using MBR partitioning can have a maximum of four primary partitions . For example, on a traditional SATA drive, four partitions can be created with device names of /dev/sda1, /dev/sda2, /dev/sda3, and /dev/sda4: The /dev/sda4 partition is an extended partition. The only thing that is placed in this extended partition are additional partitions, logical partitions. In this example, /dev/sda5, /dev/sda6, /dev/sda7, /dev/sda8, and /dev/sda9 are logical partitions. The process of placing a filesystem under a mount point is called mounting. This is accomplished either automatically at boot or manually with the mount command. Some systems may contain Linux as well as a Microsoft Windows operating systems; these are called dual boot systems. Because the filesystems that are used with Microsoft Windows are different than Linux, this requires multiple partitions. Coincidentally, the most common command line tool for editing the partition tables on disks is called fdisk. This command can be used to create, modify, and list the partitions on a hard drive root@localhost:~# fdisk -cul Recall that there can be only four primary partitions or three primary partitions with one extended. The steps to implement LVM include the following: Connect one or more physical storage devices to the system and convert them into physical volumes by using a command called pvcreate. Typically, these storage devices will be entire hard disks or individual partitions, but any device that can store data can be used. Merge all of the physical volumes into a virtual collection called a volume group. This is accomplished by using a command called vgcreate. Create devices that act like partitions using the space provided by the volume group. These devices are called logical volumes (not to be confused with logical partitions). They act like partitions in that the system administrator can create a filesystem on them and mount them, just like regular partitions. However, they have features that regular partitions lack, like being able to use space from multiple hard drives or being able to resize them on the fly. Crate these logical volumes by using a command called lvcreate. Note that you never use extended partitions directly. In other words, you won't create filesystems on extended partitions and you won't mount them. Their sole purpose is to be a container for logical partitions.

20.4 Logical Volume Management Logical Volume Management (LVM) is a method of managing hard disk space that provides more flexibility than traditional partitioning of disks. LVM was developed specifically to address limitations of traditional partitioning. To understand this, consider the following scenarios: Scenario #1 Synopsys: A system administrator performs a fresh installation of what will become a production machine. The administrator chooses to implement the following partitioning scheme: /is 2000MB, /var is 500MB, and /home is 1000MB. The intent behind this partitioning scheme was to provide plenty of space for the four users who will be using the system. By making /home a separate partition, the administrator also is able to implement disk quotas. The Problem: For the first few months, the system performs perfectly. However, errors start to occur. Users are unable to print. After some research, the administrator discovers that the /var partition is now full with log file entries. Unfortunately, this is also where print jobs are sent prior to being sent to the printer. The obvious solution is to make the /var partition bigger. With traditional partitions, this can be a nightmare that may require downtime for the system and perhaps even a reinstallation. One of the great benefits of LVM is the ability to increase the size of the partition, referred to as a volume in LVM, as needed without the need for system downtime. Scenario #2 Synopsys: A system administrator adds two new hard drives to the system. One hard drive is 40GB and the second is 20GB. The requirements for this system are to place a very large database on a single partition that is at least 60GB in size. This isn't possible with traditional partitions in this scenario because a partition must reside on a single hard drive. The LVM, a volume (think partition) can span over multiple hard drives. This provides a great deal more flexibility over traditional partitions and is necessary in today's big data environments. Scenario #3 Synopsys: A system administrator wants to back up the data in the /home partition. In order to get a clean backup, all users must be kicked off the system and the /home partition needs to be unmounted, resulting in downtime. This is due to the way that filesystem backup programs work: they back up the filesystem metadata first, then backup the file contents. With a live filesystem, changes to files during backup results in corrupted backups that are worthless. The solution is to make use of a feature called an LVM snapshot. An administrator can use this snapshot to back up a filesystem that will appear to be static, but won't require any system downtime.

Under normal circumstances, filesystems will function properly with no need for intervention, but in the event that a problem arises, it is important to know how to discover the source of the problem and to fix it. There are also a few commands available to shut down the Linux system from the command line. For example, the following init commands and user commands are available: Init Command Purpose User Command init 0 Shut the system off halt init 6 Restart the system reboot

22.2 df Command Two statistics that should be monitored closely to ensure a system will continue to run correctly are free data block space and free inodes. The df command can help monitor both of these important numbers. Data block space is used to store the contents of a file (the file's data). If data block space is exhausted within a filesystem, it will not be possible to add any new content to either new or existing files. When executed with the -h option, the output of the df command is displayed in more "human readable" units such as MiB and GiB: To determine how many files have been created (inode) and how many inodes are still available for a filesystem, use the -i option to the df command: 22.3 du Command Consider a scenario where a filesystem is running low on free data blocks. One of the first logical steps to address this concern would be to figure out what directory or subdirectory within that filesystem might be using the most data blocks. The directory usage command du will report the size of files and directories; this can be helpful for finding the largest ones. The default output of the du command shows just two columns of information, the file size and the pathname for the file. The du command is automatically recursive, so it will normally process not only the current directory but also all of its subdirectories. An effective way to find the largest files within the specified directories is to pipe the output to the sort command with the -n option, so that the output will be sorted from smallest to largest. For example, executing the du | sort -n command in a user's home directory would result in output like the following, placing the largest files at the bottom of the output: The two options used most often with the du command are the -h option for "human readable" output and the -s option for only outputting a summary for the entire directory. For example, executing the du -sh /bin /usr/bin command would display a summary of how much space is used in the /bin and the /usr/bin directory:

Recall that each file needs an inode. Therefore, if a filesystem has 1,310,720 inodes then this also represents the maximum number of files that can reside on that filesystem.

23.4 lost+found Directory In most cases after running the fsck command, the fixed filesystem is mounted and that's that. However, if the fsck command produces any "unreferenced file" errors, it may be prudent to look inside the lost+found directory that is located in the mount point directory of the filesystem. This is the location where all lost files are stored. A file typically becomes "lost" because the filename is not properly stored. Without knowing the file's name, the file can't be placed in a normal directory. As a result, lost files will show up in the lost+found directory and, in place of a filename, the file's inode number will appear: root@localhost:~# ls -l /data lost+found root@localhost:~# ls -l /data/lost+found total 5 -rw-r--r--. 1 root root 83 Mar 4 06:37 #34234 -rw-r--r--. 1 root root 1911 May 20 2013 #4596 What should be done with these poor lost files? Without a name, it may be hard to find where they belong, but keep in mind that the file command can be used to determine the type of file. If it is a text file, view the contents. Additionally, the file timestamp and ownership can help to determine where these files belong.

Chapter 26: Debian Software Management *In Debian-derived distribution, package files are also commonly installed by downloading them directly from repositories located on Internet servers. The primary configuration file that is used to locate these repositories is the "/etc/apt/sources.list" file.* To ensure that the system has a current list of the packages that are available in the repositories listed in the */etc/apt/sources.list* file, run the apt-get update command. Debian package files follow a naming convention that makes it easy to determine the package name, version, release and architecture. For example, the joe_3.7-2.3_i386.deb file uses this generic pattern: package-name_version-release_architecture.deb The *dpkg* command is the most direct tool available for managing .deb packages. It can be used for installing, removing and querying packages for information, although other higher level tools like synaptic, aptitude or the Advanced Package Tool (APT) provide more powerful capabilities for managing dependencies between packages. The aptitude command is a text-based tool that allows an administrator to install, remove and update packages by navigating text menus. The synaptic command is similar to aptitude, however it provides a graphic user interface. Some of the commands that are a part of APT are discussed later in this unit. 26.2 Installing Software With dpkg *To install a software package in a Debian-based distribution, use the -i option with the dpkg command. For example, to install the joe_3.7-2.3_i386.deb file, execute:* sysadmin@localhost:~$ dpkg -i joe_3.7-2.3_i386.deb Debian packages also may have dependencies. There are four categories of dependencies: depends, recommends, suggests and enhances. Only the depends category reflects a package that must be installed in order to have the required dependencies met. *As a low-level tool, dpkg does not provide any automatic way to resolve dependency issues, however the APT tool apt-get does have this capability, as will be discussed later in this chapter.*

26.3 Removing Software With dpkg There are a couple of ways that an administrator may remove a package, using the -r and -P options to the dpkg command. The difference between using the -r option and the -P option is that the -r option removes the package and the -P option purges the package. When a package is removed, almost all of its files are removed except for its configuration files. When a package is purged, all of the package files are removed, including the configuration files. 26.4 Listing Packages With dpkg The dpkg command can retrieve a list of the packages that are installed on the system, or list the files that are in a package. For example, to see all the packages that are currently installed on a system, execute the *""""dpkg -l""""* command: The output of the dpkg -l command contains five pieces of information: The first two pieces of this information are represented by a two letter code: The first letter reflects the desired status of the package, which can be i for installed, u for unknown, r for remove or h for hold. The second letter represents the actual status of the package, where i means installed and n means not installed. The most common two letter codes are ii for fully installed and un for not installed. The remaining columns show the package name, version (combined with the release), the architecture, and the description of the package, if it is available. The dpkg -l package-name-pattern command can also be used to list packages based on a glob pattern. For example, to view all packages that might contain python in the package name, use the dpkg -l "*python*" command. Using the -L option with dpkg will list the files that a package contains. For example, to view the files that are a part of the package named python, execute the dpkg -L python command.

Chapter 27: Managing Shared Libraries Shared libraries, also known as shared objects, are files that include *.so* as part of their name. By placing code that is used by many programs into library files that can be shared, each program file can be smaller, the programs can use a more consistent base of code and less disk space overall is consumed. *When a program is executed, the dynamic linker ""/lib/ld-linux.so"" will find and load the shared libraries needed by a program, prepare the program to execute and then run it.* Older binaries in the a.out format are linked and loaded by the /lib/ld.so program. Both programs will search for the libraries in the /lib directory, the /usr/lib directory, the directories listed in the LD_LIBRARY_PATH environment variable and from the cache file /etc/ld.so.cache. Managing shared libraries can be part of the management of the software of a system, especially if those libraries are placed in unusual locations within the filesystem. Library files that are located in the /lib or /usr/lib directories are normally configured to be automatically found by the programs that need them, but placing library files in other locations, such as the /usr/local/lib directory, may require configuring the system to be able to locate the shared libraries when needed. 27.2 /etc/ld.so.conf File *The ""/etc/ld.so.conf"" file is used to configure which directories are searched for library files by the ldconfig command during the boot process or when executed by the administrator. This file contains the following content:* *include ld.so.conf.d/*.conf Instead of using the single file to contain a list of all the directories to search, the /etc/ld.so.conf.d directory contains *.conf files which specify the library directories.* This modular approach allows for packages that might be installed to add their own .conf file to the /etc/ld.so.conf.d directory, so that new libraries can be easily found. It also allows for those packages to simply remove their .conf file from that directory when the package is being removed. These actions would take place in the postinstall and postuninstall scripts. As an example of a package that uses shared libraries, consider the mysql-libs package. This package installs a /etc/ld.so.conf.d/mysql-i386.conf file, which contains the following: /usr/lib/mysql Although the mysql-libs package demonstrates how shared libraries can be specified in a .conf file that is placed in the /etc/ld.so.conf.d directory, note that the administrator doesn't have to do any additional work beyond installing or removing the mysql-libs package. An administrator should not need to manually manage shared libraries for software that is already packaged.

27.3 Manually Adding Library Files If an administrator is compiling software from the source, or using software that is not packaged, a .conf file needs to be manually created. For example, the administrator may have downloaded and installed software that was not packaged in an .rpm or a .deb file and installed it in directories under the /usr/local directory structure with its library files located under the /usr/local/lib directory structure. In order for these library files to be able to be loaded, create a /etc/ld.so.conf.d/local.conf file with the following content: /usr/local/lib After adding or removing files in the /etc/ld.so.conf.d directory, the administrator needs to execute the ldconfig command to update the /etc/ld.so.cache cache file. 27.4 LD_LIBRARY_PATH Users without administrative access to the system can also configure directories that will be searched by setting the LD_LIBRARY_PATH environment variable with the list of library directories. For example, if the user jose installed a program in the directory /home/jose/app with the library files for that application in the /home/jose/app/lib directory, then that user could execute: sysadmin@localhost:~$ export LD_LIBRARY_PATH=/home/jose/app/lib Once that line had been executed, then the library files found in the /home/jose/app/lib could be found and loaded. 27.5 ldd Command To verify or view the library files associated with a program, use the ldd command. For example, to view the libraries that are used by the /bin/bash executable, execute ldd /bin/bash. The output from this command would appear similar to the following: If there is a problem with a library file not being loaded, then the line of the output may report not found. For example, if the mysql-libs package library files were not correctly configured, then executing the ldd /usr/bin/mysql command may display the following error output: Execute the following command to display all of the libraries that the ldconfig utilizes: ldconfig -v To add a new library directory to the system, first create a new directory and then create a configuration file in the /etc/ld.so.conf.d directory: [root@localhost ~]# mkdir /usr/mylib [root@localhost ~]# echo "/usr/mylib" > /etc/ld.so.conf.d/mylib.conf [root@localhost ~]# Normally, the next step would be to copy the library files into the /usr/mylib directory. In this case, we will copy an existing one into this directory: [root@localhost ~]# cp /lib64/ld-2.12.so /usr/mylib Display the libraries that are used by the /bin/ls command by executing the following command: ldd /bin/ls

sysadmin@localhost:~$ apt-get install mysql-server mysql-client root@localhost:~# /etc/init.d/mysql start root@localhost:~# mysql mysql> mysql> CREATE DATABASE Work; mysql> USE Work; mysql> CREATE TABLE People (PersonID int primary key, First text, Last text); mysql> CREATE TABLE Projects (ProjectID CHAR (3) primary key, Project text); Query OK, 0 rows affected (0.01 sec) mysql> CREATE TABLE PeopleProjects (ProjectID CHAR (3), PersonID int, PRIMARY KEY (ProjectID, PersonID)); To see the names of the tables that were just created, execute the following command: mysql> SHOW TABLES; In order to add records to the tables, use the INSERT command: mysql> INSERT INTO After the INSERT INTO keywords, provide the name of the table: mysql> INSERT INTO People Following the table name should be a list of field names in parentheses: mysql> INSERT INTO People (PersonId, First, Last) Next, use the keyword VALUES followed by the values for the fields for the first record in parentheses, a comma, and then the second record in parentheses. In this way, many record values can be added at once. mysql> INSERT INTO People (PersonId, First, Last) VALUES -> (1, "Susan", "Gomez"), -> (2, "Hans", "Alverez"); Type a semicolon and press Enter to finish: mysql> INSERT INTO PeopleProjects VALUES -> ("PE1", 1), -> ("PE1", 2), -> ("PY1", 1), -> ("PY1", 2), -> ("PY2", 2);

3.4 UPDATE and SET The UPDATE and SET commands are used to update values in existing records. SQL provides many functions and operators for manipulating values, so the value may be calculated instead of provided literally. Unless you want to update all records in a table, you must add a WHERE clause to specify a condition that must be met before a record will be updated. The following example would update the last name of just one of the records in the "People" table: 3.5 SELECT and FROM The SELECT command is used to choose which fields to view and the FROM command determines from which table or tables to query. For small tables, it is often convenient to select all the fields by using the asterisk * character. For example, to view all fields and all records from the People table, write the following: mysql> SELECT * FROM People; When working with large tables with many fields, viewing the fields in a different order, or just restricting the view to certain fields from a table, use a comma separated list of the field names instead of the asterisk. For example, to view all the records from the Projects table, list the fields you want to view in the order that you want to view them using this SQL statement: mysql> SELECT Project, ProjectID FROM Projects; If the output of a SELECT query produces duplicates, use SELECT DISTINCT to eliminate the duplicates. Another example of using the WHERE clause is with the SELECT command: SELECT only those projects that had a ProjectID that started with PY with the following SQL statement: mysql> SELECT * FROM Projects WHERE ProjectID LIKE "PY%"; The LIKE command can compare two strings to see if they are similar and allows the percent symbol % to be treated as a wildcard that can match zero of more unknown characters. The NOT operator can negate the value of a comparison. For example, to view the projects that do not have a ProjectID that starts with PY, you could use the following statement: mysql> SELECT * FROM Projects WHERE ProjectID NOT LIKE "PY%";

Carrier sense multiple access with collision detection (CSMA/CD): The end device monitors the media for the presence of a data signal. If a data signal is absent and therefore the media is free, the device transmits the data. If signals are then detected that show another device was transmitting at the same time, all devices stop sending and try again later. Traditional forms of Ethernet use this method. CSMA/Collision Detection In CSMA/Collision Detection (CSMA/CD), the device monitors the media for the presence of a data signal. If a data signal is absent, indicating that the media is free, the device transmits the data. If signals are then detected that show another device was transmitting at the same time, all devices stop sending and try again later. Traditional forms of Ethernet were developed to use this method. The widespread incorporation of switched technologies in modern networks has largely displaced the original need for CSMA/CD in local-area networks. Almost all wired connections between devices in a LAN today are full-duplex connections - a device is able to send and receive simultaneously. This means, that while Ethernet networks are designed with CSMA/CD technology, with today's intermediate devices, collisions do not occur and the processes utilized by CSMA/CD are really unnecessary. However, wireless connections in a LAN environment still have to take collisions into account. Wireless LAN devices utilize the CSMA/Collision Avoidance (CSMA/CA) media access method.

Carrier sense multiple access with collision avoidance (CSMA/CA): The end device examines the media for the presence of a data signal. If the media is free, the device sends a notification across the media of its intent to use it. Once it receives a clearance to transmit, the device then sends the data. This method is used by 802.11 wireless networking technologies. A logical multi-access topology enables a number of nodes to communicate by using the same shared media. Data from only one node can be placed on the medium at any one time. Every node sees all the frames that are on the medium, but only the node to which the frame is addressed processes the contents of the frame. Having many nodes share access to the medium requires a data link media access control method to regulate the transmission of data and thereby reduce collisions between different signals. In CSMA/CA, the device examines the media for the presence of a data signal. If the media is free, the device sends a notification across the media of its intent to use it. The device then sends the data. This method is used by 802.11 wireless networking technologies.

Cancelling commits To cancel the commit, we need to create a commit that deletes the changes saved by unwanted commit. Run: *git revert HEAD* Go to the editor, where you can edit the default commit message or leave it as is. Save and close the file. Next let us look at the technique that can be used to remove the last commit from the history of the repository. Let us mark the last commit with tag, so you can find it after removing commits. Run: *git tag oops* Reset commit to previous Oops At the history log (see above), the commit tagged «v1» is committing previous wrong commit. Let us reset the branch to that point. As the branch has a tag, we can use the tag name in the reset command (if it does not have a tag, we can use the hash value). Run: *git reset --hard v1* *git hist* Nothing is ever lost What happens to the wrong commits? They are still in the repository. Actually, we still can refer to them. At the beginning of the lesson, we created «oops» tag for the canceled commit. Let us take a look at all commits. Run: *git hist --all* Reset dangers Resets on local branches are usually harmless. The consequences of any "accident" can be reverted by using the proper commit. Though, other users sharing the branch can be confused if the branch is shared on remote repositories. Removal of the oops tag Oops tag has performed it's function. Let us remove that tag and permit the garbage collector to delete referenced commit. Run: *git tag -d oops* *git hist --all*

Changing commits Oops... email required After making the commit you understand that every good comment should include the author's email.Refresh the hello page, to provide an email. Change the previous commit We do not want to create another commit for e-mail. Let us change the previous commit and add an e-mail address. RUN: *git add hello.html* *git commit --amend -m "Add an author/email comment* Searching for the last commit Run: *hist --max-count=1* Result: *$ git hist --max-count=1* * 8029c07 2011-03-09 | Added index.html. (HEAD, master) [Alexander Shvets]* Run: *git cat-file -t <hash>* *git cat-file -p <hash>* I see this ... Result: $ git cat-file -t 8029c07 commit $ git cat-file -p 8029c07 tree 096b74c56bfc6b40e754fc0725b8c70b2038b91e parent 567948ac55daa723807c0c16e34c76797efbcbed author Alexander Shvets <[email protected]> 1299684476 -0500 committer Alexander Shvets <[email protected]> 1299684476 -0500 Added index.html. Tree search We can display the tree referenced in the commit. This should be a file description (top level) in our project (for a specific commit). Use the SHA1 hash of the tree string from the list above. Run: git cat-file -p <treehash> Here is my tree ... Result: $ git cat-file -p 096b74c 100644 blob 28e0e9d6ea7e25f35ec64a43f569b550e8386f90 index.html 040000 tree e46f374f5b36c6f02fb3e9e922b79044f754d795 lib I can see the index.html file and lib folder. Display lib directory Run: git cat-file -p <libhash> Result: $ git cat-file -p e46f374 100644 blob c45f26b6fdc7db6ba779fc4c385d9d24fc12cf72 hello.html There is a hello.html file. Display hello.html file Run: git cat-file -p <hellohash> Result: $ git cat-file -p c45f26b <!-- Author: Alexander Shvets ([email protected]) --> <html> <head> </head> <body> <h1>Hello, World!</h1> </body> </html> And there it is. Tree objects, commit objects and blob objects are displayed directly from the git repository. That's all there is - trees, blobs and commits

11.11 *Monitoring Processes While the *'ps'* command can display active processes, the *'top'* command provides the ability to monitor processes in real-time, as well as manage the processes* *The ""k"" and ""r"" keys are used to manage tasks or processes within the top program.* Pressing the k key will allow a user to "kill" or send a signal to a process. After pressing k, top will prompt for a PID and then for a signal to send to that process. Pressing the r key will allow a user to "renice" a process by prompting for the PID and then the new niceness value.

Consider This To understand why the 'cpio' command might be used for copying files from one directory to another instead of using the 'cp' command recursively, consider the following advantages: The 'cpio' command automatically preserves file attributes (metadata) like links, permissions, timestamps and ownerships. These attributes are not preserved with using the 'cp' command. The 'cpio' command also works with special files better than the 'cp' command. To specify the pass-through mode of the 'cpio 'command, specify the -p option. Again, if any directories are included, the -d option needs to be specified. To copy all the files from the home directory to a directory called /tmp/destination, use the following command line: sysadmin@localhost:~$ find ~ | cpio -pd /tmp/destination

Atdditionally Furthermore Moreover

Contention-based access: All nodes compete for the use of the medium but have a plan if there are collisions. Controlled access: Each node has its own time to use the medium.

routinely

Contribute to our Open Dictionary as part of the usual way of doing something Satellite images are routinely used in weather forecasting. Synonyms and related words Ordinary and normal:BAU, identikit, normal...

Basic Input Output System (BIOS) is used to provide basic input and output services before an operating system is loaded, so the user may provide input through the keyboard or see output on a monitor even before the bootloader or an operating system is executed. BIOS-based systems provide a proprietary menu program that allows integrated devices to be enabled or disabled.

Data storage devices use either serial or parallel interfaces. The S in SCSI, in SATA, and in USB all stand for the word serial. That is why they appear as /dev/sda1 meaning DEVice Serial Drive A partition 1. Parallel drives, on the other hand, appear as /dev/hda1 meaning DEVice Hard Drive A partition 1. The "df -h" command can be used to determine which type of drive is being used in a Linux based computer.

To view many of the devices that are connected to your system, use the "lsusb" and the "lspci" commands. Most of the devices that are inside a computer will be displayed with the "lspci" command, as these devices typically use the Peripheral Component Interconnect (PCI) bus. Video, sound, network and disk controllers are normally found on the PCI bus. For viewing external devices, the "lsusb" command will show those that are connected to the Universal Serial Bus (USB). Using the -v option with either "lsusb" or "lspci" commands can be helpful to get these commands to display more detail about connected devices. Note: For even more verbose information, the lspci command also supports the -vv and -vvv options. To troubleshoot a device that isn't working, one of the first steps is to identify the device specifically. With the lspci command, use the -nn option to show all the devices with a vendor and device code: Use the vendor and device code to get detailed information about a device by using the -d option. sysadmin@localhost:~$ lspci -v -d 1022:2000

Display all of the SATA drives on the system by executing the following command: ls /dev/sd* Devices that begin with "sd" in the /dev directory are device files that represent SATA or SCSI devices.

When a computer is powered on, it loads the OS, normally from a disk drive, into RAM. The portion of the OS code that interacts directly with the computer hardware is known as the kernel. The portion that interfaces with the applications and user is known as the shell. The user can interact with the shell using either the command-line interface (CLI) or graphical user interface (GUI). The operating system on home routers is usually called firmware. But how does a host determine the Ethernet MAC address of another device? The sending host sends an ARP Request message to the entire LAN. The ARP Request is a broadcast message. The ARP Request contains the IP address of the destination device. Every device on the LAN examines the ARP Request to see if it contains its own IP address. Only the device with the IP address contained in the ARP Request responds with an ARP Reply. The ARP Reply includes the MAC address associated with the IP address in the ARP Request.

Encoding is the process of converting information into another, acceptable form, for transmission. Decoding reverses this process in order to interpret the information. *Data - The general term for the PDU used at the application layer Segment - Transport layer PDU Packet - Network layer PDU Frame - Data Link layer PDU Bits - A Physical layer PDU used when physically transmitting data over the medium* When the sender and receiver of the IP packet are on the same network, the data link frame is sent directly to the receiving device. On an Ethernet network, the data link addresses are known as Ethernet MAC addresses. MAC addresses are 48-bit addresses that are physically embedded on the Ethernet NIC.

requite (It's an international crime that has never been requited)

make appropriate return for (a favor, service, or wrongdoing). they are quick to requite a kindness synonyms: avenge, exact revenge for, revenge, pay someone back for, take reprisal հատուցել compensate, redeem, recompense, indemnify, reimburse, requite տալ give, hand, allow, afford, lend, requite փոխհատուցել compensate, offset, refund, indemnify, reciprocate, requite

The NOT operator can negate the value of a comparison. For example, to view the projects that do not have a ProjectID that starts with PY, you could use the following statement: mysql> SELECT * FROM Projects WHERE ProjectID NOT LIKE "PY%"; To delete a record from a table, the most common approach is to use a WHERE clause set to be true for the value of the primary key for that record. For example, to delete the Python Advanced project, use the following statement: mysql> DELETE FROM Projects WHERE ProjectID="PY3";

Execute the chkconfig mysqld on command to configure the MySQL server to start automatically in the future: chkconfig mysqld on

11.4 Foreground Processes So far, the commands that have been presented in this course have been executing in what is known as the foreground. A foreground process is one that prevents the user from using the shell until the process is complete. When one process starts another, the first process is referred to as the parent process and the new process is called a child process. So, another way of thinking of a foreground process is that when run in the foreground, a child process doesn't allow any further commands to be executed in the parent process until the child process ends. You do not need to add anything to a command in order to make that command execute in the foreground, as that is the default behavior.

For example, to create an alias called welcome which outputs the current user, the date, and the current directory listing, execute the following command: sysadmin@localhost:~$ alias welcome="whoami;date;ls" A real-life scenario involving multiple commands occurs when an administrator needs to take down and restart the network connection remotely. 11.6 Background Processes When a command may take some time to execute, it may be better to have that command execute in the "background". When executed in the background, a child process releases control back to the parent process (the shell, in this case) immediately, allowing the user to execute other commands. *To have a command execute as a background process, add the ""&"" (ampersand character) after the command* *While there are still background processes being run in the terminal, they can be displayed by using the 'jobs' command. It is important to point out that the 'jobs' command will only show background processes in the current terminal. If background processes are running in another terminal, they will not be shown by running the 'jobs' command in the current terminal. The following is an example of using the 'jobs' command*: You can see background processes by executing the jobs command: *./test.sh & jobs*

This is contrary to how new file group ownership would normally function, as by default new files are group owned by the primary group of the user who created the file. sysadmin@localhost:~$ ls -li source 2076 -rw-rw-r-- 1 sysadmin sysadmin 5 Apr 12 13:27 source sysadmin@localhost:~$ The Linux operating system uses inodes to keep track of the information about a file. A directory entry associates an inode with a file name. *Creating a hard link creates another directory entry associated with an existing inode, and will increase the link count number.* Hard links allow you to have multiple names to refer to the same file. If any one of these names is removed, then the other names can still be used to refer to the file. In fact, these other names can even be used to create additional links. All of these names are considered equivalent as they all refer to an existing inode. Note: You cannot create hard links to directories. Also, a hard link to a file also must exist within the same filesystem (partition) as the file that it links to. Another type of link that can be created is known as a symbolic link or soft link. Symbolic links do not increase the link count of files with which they are linked. *Symbolic link files have their own inode and type of file. Instead of linking and sharing an inode, they link to the file name. Unlike hard links, soft links can be linked to directories and can cross devices and partitions to their targets.* Create a symbolic link to the source file and view the details of both files: *ln -s source softlink* *ls -li source softlink*

In order to understand hard links, it is helpful to understand a little bit about how the file system keeps track of files. For every file created, there is a block of data on the file system that stores the meta information of the file. Meta information includes information about the file like the permissions, ownerships and timestamps. Meta information does not include the file name or the contents of the file, but it does include just about all other information about the file. This meta information is called the file's *inode table*. The inode table also includes pointers to the other blocks on the file system called data blocks where the data is stored. *Every file on a partition has a unique identification number called an inode number. The ls -i command will display the *inode number* of a file. Like users and groups, what really defines a file is not its name, but rather the number it has been assigned.* *When you attempt to access the /etc/passwd file, the system uses this table to translate the file name into an inode number. It then retrieves the file data by looking at the information in the inode table for the file.* *Hard links are two file names that point to the same inode. For example, consider the following directory entries:* sysadmin@localhost:~$ *ln file.original file.hard.1* sysadmin@localhost:~$ ls -li file.* To create a symbolic link, use the '-s' option with the ln command: sysadmin@localhost:~$ ln -s /etc/passwd mypasswd On the other hand, a regular file with a hard link count value greater than one is a file that has a hard link. Using the file's the inode number, it is possible to find all the linked files by using the find command with the -inum option. For example: sysadmin@localhost:/tmp$ ls -i hosts 23338 hosts sysadmin@localhost:/tmp$ find -inum 23338 ./hosts ./myhosts

The boot process takes places in four main stages, some of which are modified by administrators, while for the others it is sufficient just to be aware of the actions taking place: Firmware Stage As previously mentioned, most firmware is referred to as the Basic Input Output System (BIOS) and is stored on the motherboard in non-volatile memory such as Read Only Memory (ROM) or flash memory. The BIOS has a number of jobs to perform as part of the first stage of the boot process. One of these jobs is the execution of a Power-On Self Test (POST) in order to ensure the hardware of the system is functioning properly. The POST runs some basic sanity checks on the CPU, memory, and peripherals so that obvious errors, such as missing memory chips, are found early in the boot cycle. The final job of the BIOS is to find the proper boot drive from the available storage devices, and load the Master Boot Record (MBR) from that device. The Master Boot Record is the first sector (or 512 bytes) of the disk. It contains a partition table and a very small amount of executable code called the first stage bootloader whose purpose is to load the more feature-rich second stage bootloader. Bootloader The bootloader will perform several operations, but the primary task is to load the Linux kernel into memory and execute it. Once that has occurred, the kernel takes over booting the system. As the bootloader is just some software that gets a kernel to run, it is possible to boot multiple operating systems at different times off of one computer in a process known as dual booting. The kernel that the bootloader is trying to run could be a Linux kernel, it could be a Microsoft Windows image, or it could be a bootable CD. Kernel Stage Now that the bootloader has loaded the kernel into memory, there is much work to be done before programs can be loaded. The kernel must initialize any hardware drivers and get the root filesystem mounted for the next stage. These two tasks are actually quite complicated because the facilities provided by the BIOS to access the hardware are quite limited. The kernel must boot the system in several phases. The Linux kernel must mount the root file system / in order to get to the next step and to make the system useful. However it is possible that the root filesystem exists on a device that the kernel does not know how to support. The solution to this is the initial RAM disk initrd. The kernel drivers necessary to continue the boot are bundled into a filesystem that is stored beside the kernel itself in /boot. The kernel boots, mounts the initrd, loads the drivers inside, and then remounts the real root filesystem using the new drivers. This allows drivers to be added to the kernel easily and for the kernel to mount the root filesystem over almost any storage hardware even if it's over a network. As the kernel is booting it is able to initialize hardware and make detected devices available to the rest of the operating system. The kernel's final job is to start the first process on the system. As it is the first process, it will normally have a process id (PID) of 1; the name of this process is init. Init Stage The init stage finishes booting the system; the first process of the operating system is started and this process is responsible for starting all other system processes. The first process to be booted has two important responsibilities: The first is to continue the booting process to get services running, login screens displaying, and consoles listening. The second is some basic process management. Any process that loses a parent gets adopted by init.

Kernel messages and other system-related messages are typically stored in the /var/log/messages file. This file, which is considered the main log file, is alternatively named /var/log/syslog in some distributions. This system supports GRUB2. View the first 10 lines of the /boot/grub/grub.cfg -- > NO root@localhost:~# vi /etc/default/grub -- > YES This system supports traditional GRUB. View the /boot/grub/grub.conf file by executing the following command:

Software dependencies occur when one software package depends on one or more other software packages to function correctly. Unfortunately, the dependency packages may have their own dependencies, which means to install the particular software may require determining all of these dependencies and installing each of the dependency software packages. This can be a daunting task! Not only are these "cascading dependencies" problematic, but circular dependencies are possible where one software package depends on another software package, and that other software package depends on the one that depends on it! Although it is possible to resolve these dependency issues manually with the rpm command, they can be solved more easily and automatically with the yum command. The -U option can be used with the rpm command to either install or update a package: [sysadmin@localhost ~]$ rpm -U x3270-4.3.6-10.5.el6.i686.rpm On the other hand, when using the rpm command with the -F option, the package will only be updated if the package is already installed; this is called freshening the package: [sysadmin@localhost ~]$ rpm -F x3270-4.3.6-10.5.el6.i686.rpm Important Note: The kernel package is so critical that when a new version is available, it should be installed rather than updated or freshened. The kernel files are organized to allow for multiple versions to exist on the system simultaneously. In this way, if an updated kernel is installed on your system and it is not functional, simply reboot the system and, from the boot menu, choose an earlier kernel version that does function.

Most administrators will simply attempt to install an RPM and, if the command fails, use the output to determine the missing dependencies if necessary to succeed. *However, it is also possible to manually check the requirements or dependencies of a package with the following rpm query shown below with its partial output:* [sysadmin@localhost ~]$ rpm -qpR x3270-x11-3.3.6-10.5.el6.i686.rpm /bin/sh /usr/bin/mkfontdir gtk2 >= 2.6 libICE.so.6 libicuuc.so.42 libnsl.so.1 libssl.so.10 libutil.so.1 x3270 = 3.3.6 To manually look at what each package provides, perform a query with the --provides option. The output from the following command demonstrates that this package provides the required x3270 package with the version equal to 3.3.6: [sysadmin@localhost ~]$ rpm -qp --provides x3270-3.3.6-10.5.el6.i686.rpm config(x3270) = 3.3.6-10.5.el6 x3270 = 3.3.6-10.5.el6 x3270(x86-32) = 3.3.6-10.5.el6 Occasionally, a package needs to be reinstalled, perhaps because a file from that package is missing. Normally, the rpm command will refuse to install a package that is already installed, but it can be forced by adding the --force option. For example, to reinstall the x3270 package, execute the following command: [sysadmin@localhost ~]$ rpm --force -i x3270-3.3.6-10.5.el6.i686.rpm 25.4 Erasing Packages with rpm The rpm command can be used to erase (remove) packages from the system with the -e option, however, dependency issues may arise. If there were dependency issues when a group of packages was installed, then there may also be dependency issues when that group of packages is removed. For example, if an attempt was made to remove the x3270 or libicu packages without first removing the x3270-x11 package, then an error would occur: [sysadmin@localhost ~]$ rpm -e x3270 libicu error: Failed dependencies: x3270 = 3.3.6 is needed by (installed) x3270-x11-3.3.6-10.5.el6.i686 libicuuc.so.42 is needed by (installed) x3270-x11-3.3.6-10.5.el6.i686 In other words, the rpm command will not allow a package to be erased if it is a requirement of another package. If the x3270-x11 package were erased first, then the other two packages could be erased. In the case of circular dependencies, when packages depend on each other, then all the packages can be removed with a single rpm command by specifying all package names as an argument: [sysadmin@localhost ~]$ rpm -e x3270-x11 x3270 libicu

RESEARCH WRITING : STARTER PHRASES INTRODUCTION ... is an important component of -- > Central to the discipline of ... is ... -- > ... in an increasingly important issue in ... -- > Recent developments in ... have shown the need for ... -- > R. d. in the field of ... have leas to a renewed interest in ...--> This study builds on ... and contributes to ... -- > Over the past century, there has been a major decline in ...-> Recently there has been a renewed interest in ... -- > To date, there has been a little agreement in ... -- > A theoretical issue that has been dominated in the field for many years is ... -- > The controversy over ... has raged for many years. -- > The issue of ... has recently grown in importance. -- > Most studied of ... have only been carried out on ... -- > Until now, little importance has been given to ... -- > Until now, this method has only been applied to ... -- > LITERATURE REVIEW A considerable amount of literature has been published on> However, there has been relatively little liter published on > Numerous studies have argued that ... -- > Several studies have revealed ... -- > The research to date has tended to focus on ... -- > Data from several studies have identified the ... -- > It has been suggested that ... -- > It has been conclusively shown that ... -- > It has been demonstrated that ... --> It is thought that ... --> Other studies have considered the relationship between .--> The first systematic study of ... was reported by ... --> The study of ... was first carried out by ... -- > Detailed examination of ... by ... showed that ... -- > A comparative study of ... found that ... -- > This view is supported by ... who argues that ... -- > A key problem with this argument is ... -- > One question that need to be asked, however, is ... --> One problem with this approach is ... --> The main limitation of X's study is ... -- > However, this method of analysis has a number of limitations However, this research does not take into account ... --> The author offers no explanation for ... -- > The main weakness of this study is ... --> Previous studies have only focused on ... --> The existing research fails to ... --> Much of the recent literature has not ... --> Other than by giving a clear negative statement, a 'niche' can be indicated by raising a question in some way: However, it remains unclear whether... It would thus be of interest to learn how... It would seem, therefore, that further investigations are necessary in order to... METHODS The methodology has a number of advantages such as ... --> Limitations to the study design include... -- > Data were gathered from ... --> ... was prepared according to the approach outlined by ...

RESULTS It is apparent from Table 1 that ... --> The data in Figure 2 indicates that ... --> Strong evidence of ... was found when ... --> A positive correlation was found between ... and ... The results, as seen in Table 3, indicate that ... --> No significant reduction in ... was found -- > A comparison of the two results reveals that ... --> CONCLUSION This research has investigated ... --> The study set out to ... --> The purpose of the present research was to ... --> The study has shown that ... --> An important finding to emerge in this study is ... -> The results are significant in three respects: -- > In general, therefore, the results show ... --> However, a number of limitation need to be considered. For instance -- > The research was limited in several ways ... --> However, the findings are subject of at least four limitations ... --> Several limitations need to be acknowledged --> Further research need to be done to investigate -> Future research should concentrate on ... -- > More research is needed to better understand -- > An implication of this findings is that ... The findings of this study have a number of important implications for ... --- >The aim of the present paper is to give... This paper reports on the results obtained... In this paper we give preliminary results for... The main purpose of the experiment reported here was to... This study was designed to evaluate... The present work extends the use of the last model by... We now report the interaction between.. The primary focus of this paper is on... The aim of this investigation was to test... Our preliminary objective in this paper is to provide... The contribution of this paper is to... In this paper we provide a novel formulation...This work aims to...s In the following we tackle... This paper develops... In this study, we describe... Our goal... The goal of this work... LTE aims at supporting ...Introductions - "move 3e" - stating the structure of the paper: Initial sentence: The plan of the paper is as follows. The remainder of this paper is organized as follows. The rest of the paper is structured as follows. The structure of the rest of the paper is as follows. The remaining sections are arranged as follows: The paper is organized as follows: The following is the outline of our paper. We first..... After that we... Finally we...

Lesson learned: The 'w' permission allows a user to delete files from a directory, but only if the user also has 'x' permission on the directory. The access to the directory only requires 'x' permission; even though 'r' permission would be useful to list files in a directory, it isn't required to "get into" the directory and access files within the directory.

Recall the 'stat' command discussed earlier in this chapter. This command provided more detailed information than the 'ls -l' command provided. Use the 'chown' command to change the user and group owner of the pub-dir to the root user and the root group. Then view the details of the directory: chown root:root pub-dir

To archive all the files and directories in the /usr/lib/perl5 directory to the myperl.zip file, execute the following command: zip -r myperl.zip /usr/lib/perl5 To list the contents of the myperl.zip file without unzipping it, execute the following command: unzip -l myperl.zip The gzip and gunzip commands are used to compress and uncompress a file. The compression technique used by gzip differs from the zip command. The gzip command replaces the original file with the compressed ".gz" file. The gunzip command reverses the action of gzip, i.e. the ".gz" file is uncompressed and replaced by the original file. To retain the original file while compressing using the gzip command, use the -c option. This allows you to redirect the binary output of the gzip command to another file. To do this with the words file, execute the following commands: gzip -c words > words.gz The -l and -v options to the gunzip command can be used to view the ratio of compression of the archived file to the original file. To view the amount of compression on the archived file, execute the following command: gunzip -l words.gz To create a file named /tmp/swapex with 500 "one megabyte" size blocks of zeroes, execute the following command: dd if=/dev/zero of=/tmp/swapex bs=1M count=500 ls -lh /tmp The dd command is a utility for copying files at the bit level. It can be used to clone or delete entire disks or partitions, creating large "empty" files to be used as swap files (as in the example above) and copy raw data to removable devices.

Similar to the gzip and gunzip commands, the bzip2 and bunzip2 commands are also used to compress and uncompress a file. The compression algorithm used by both commands is different, but the usage is very similar. The extension of the files created by bzip2 command is .bz2. Note: The bzip2 command does not support a separate option for recursion. So, bzip2 cannot be used to compress a nested directory structure. To create a tar archive of the /etc/vim directory and place the tar file in the current directory, execute the following commands: tar -cf vim.tar /etc/vim To view the contents of the vim.tar file, execute the following command: tar -tvf vim.tar To extract the files from the vim.tar into the current directory, execute the following commands: tar -xf vim.tar To extract the files from the vim.tar into another directory, use the -C option to the tar command. For example, execute the following commands: tar -xvf vim.tar -C /tmp The cpio command is another archival command, which can merge multiple files into a single file. It operates in two modes: copy-in and copy-out. The copy-out mode is used to create a new archive file. The files can be provided via standard input or redirected from the output of another command to produce a file stream which will be archived. To archive all the *.conf files in the current directory, use the -o option to the cpio command (-v is for "verbose"): cp /etc/*.conf . ls *.conf | cpio -ov > conf.cpio ls *.cpio The copy-in mode is used to extract files from a "cpio" archive file. The -i option enables "copy-in mode". The -u option is used to overwrite existing files and the -d option is used to indicated that directories should be created. To extract the files from the conf.cpio file into the current directory, first delete the original files and then use the cat command to send the data into the cpio command: rm *.conf cat conf.cpio | cpio -iud ls *.conf

If you wanted to add more to the PATH variable, you could either edit the ".bashrc" file directly with a text editor or execute the following commands: echo '*PATH=$PATH:/home/sysadmin/mybin' >> .bashrc* tail .bashrc

The -d option to the ls command also important. *When listing a directory, the ls command normally will show the contents of that directory, but when the -d option is added, then it will display the directory itself*: sysadmin@localhost:~$ ls -ld /var/log drwxrwxr-x 1 root syslog 216 Sep 29 18:48 /var/log To reverse the results of any listing option, use the *"-r"* option. To reverse the sorting based on file size for the /etc/ssh directory, execute the following command: ls -lSr /etc/ssh To display only the directory, not the contents of the directory, execute the following command: ls -d /usr/lib In other words, the pattern [!a-v]* would match a file name that does not begin with a letter a through v: To view the filenames that begin with "rc" in the /etc directory, excluding those containing the numbers 3 - 6, execute the following command: echo /etc/rc[^3-6]* Note: The wildcard characters lose their special meaning inside the [] notation and are treated like regular characters. For example, if you specify [*]*, it will try to match with a filename starting with the * character. Typically filenames don't include wildcard characters, so this feature is rarely needed.

Before searching the PATH variable for the command, the shell will first determine if the command is an alias or function, which may result in the PATH variable not being utilized when that specific command is executed. Additionally, if the command happens to be built-in to the shell, the PATH variable will not be utilized. Lastly, if the user uses an absolute path such as /bin/ls, or a relative path such as ./lsthen the PATH variable is not utilized. The directories listed in the PATH will be searched in the order they are entered, from left to right.

To execute commands that are not contained in the directories that are listed in the PATHvariable, several options exist: • The command may be executed by typing the absolute path to the command. • The command may be executed with a relative path to the command. • The PATH variable can be set to include the directory where the command is located. • The command can be relocated or copied to a directory that is listed in the PATH variable.

The "ifup" and "ifdown" commands are used to bring up and bring down a network interface respectively. It is also necessary to bring down a network device before assigning an IP address to the device. For example, if the IP address of the eth1 device has to be changed, then the steps to be followed are as follows: 1. Bring down eth1 using the ifdown command. 2. Use the ifconfig command to assign the new IP address to eth1. 3. Use the ifconfig command to view the updated IP address. 4. Bring up eth1 again using the ifup command. The network interface can be temporarily disabled by using the ifdown command as follows: root@localhost:~$ ifdown eth1 ' On a Debian-derived system, the file "/etc/network/interfaces" file should to be updated and any references to the "eth1" interface should be commented out or removed: After modifying this file, the networking service should be restarted with the following command: root@localhost:~$ */etc/init.d/networking restart*

The routing table on a Linux system is built into the kernel. To set up the routing table manually, the "ip" command is used. To make any changes in the setup, root privileges are required. To view the existing routing table, execute the "route" command: The second column contains the defined Gateway for the specified destination. In the event an asterisk *is shown, a gateway is not needed to access the destination network. The Genmask column shows the netmask for the destination network. In the Flags column, a U means the route is up and available, whereas the G means that the specified gateway should be used for this route. Finally, the Iface column is used to define the exiting interface for this route. A default gateway can be set either automatically (DHCP), or manually. To add a default gateway manually, execute with root privileges the command: root@localhost:~# *route add default gw 192.168.1.1 eth1*

Execute the following command to create a ext4 partition on the /dev/sda5 partition: mkfs -t ext4 /dev/sda5 Create a directory to use as a mount point for the new partition by using the mkdir command. Then mount the new partition and verify that it mounted correctly by executing the mount commands as shown: mkdir /data mount /dev/sda5 /data mount

The superblock is where critical filesystem data is stored. If the primary superblock is corrupted, then you need to use a backup superblock to fix the primary superblock. To view the backup superblocks of a filesystem, execute the following command: dumpe2fs /dev/sda5 | grep superblock

To connect to a particular host via ftp, execute the command: ftp ftp_server_host_name [or IP address] For example: sysadmin@localhost:~$ ftp 127.0.0.1 ftp> The lcd command can be used to change your local working directory to affect where files will get downloaded or uploaded. ftp> lcd Local Directory now /home/sysadmin ftp> lcd /tmp Local Directory now /tmp To execute other commands on your local machine while logged in to the FTP server, prefix a command with an exclamation point !. ftp> !ping 127.0.0.1 To retrieve or download a file from the remote machine to your local machine, use the get command. For example, to download the devsrccode.tar file (binary) from the FTP server named server1 to the /tmp directory on the local machine, execute the following ftp commands: sysadmin@localhost:~$ ftp server1 ftp> bin ftp> lcd /tmp Local Directory now /tmp ftp> get devsrccode.tar

To send or upload a file from your local machine to the remote machine, use the putcommand. For example, to upload the devsrccode.tar file from the local machine to the server, execute the following command: ftp> put devsrccode.tar To download multiple files, use the mget command. If you wanted to download all the *.tar files in a particular directory from the server to the local machine, execute the following command: ftp> mget *.tar To quit ftp, execute the following command: ftp> quit

If the mount command is given two arguments, the filesystem identifier and the directory pathname to mount it on, then the mount command will allow the root user to mount a partition on an existing directory: root@localhost:~# mount /dev/sdb1 /mnt Mounting a filesystem on a directory that has files will render those files inaccessible. Therefore be careful to mount on directories known to be empty. Once a filesystem is mounted on a directory, only the contents of that filesystem will be visible. What was previously visible in a directory is not gone, but will become visible only after the new filesystem is unmounted. For example, consider the situation in which the /data directory already contains files and then it is used as a mount point: root@localhost:~# ls /data file1 file2 root@localhost:~# mount /dev/sda3 /data root@localhost:~# ls /data file3 file4 It appears that file1 and file2 were deleted, but they are just hidden from view. If the filesystem was unmounted, then these files would reappear: root@localhost:~# ls /data file3 file4 root@localhost:~# umount /data root@localhost:~# ls /data file1 file2

To unmount a filesystem, use the umount command with either the filesystem or the directory given as an argument. For example, to unmount the /mnt directory that was previously mounted, execute the following command: root@localhost:~# umount /mnt Because the /dev/sdb1 filesytem was mounted under the /mnt directory, the following command would have also worked: root@localhost:~# umount /dev/sdb1 To determine what is making the filesystem busy, use the lsof or the fuser commands as suggested in the output of the previous example. The /etc/fstab file is used to configure what filesystems will be mounted automatically at boot. It can also be used to automatically activate swap devices. It may be helpful to think of this file as the filesystem table to remember its name. To those familiar with mounting a filesystem manually the format of the file should make sense. After updating the /etc/fstab file, don't reboot the system to test the changes. Instead, use the -o remount option. If the changes are correct, no message will be displayed, but if a mistake was made, an error like the following will be displayed: root@localhost:~# mount -o remount /

*26.6 Searching for Packages With apt-cache* If the system has the appropriate repositories configured in the /etc/apt/sources.list file and the administrator has already refreshed the cached information about which packages are available by executing the apt-get update command, then any user can search for packages by using the *""""apt-cache search keyword""""* command. The apt-cache command can also search for packages a different way. *To find out what dependencies a package has, the """"apt-cache depends package-name""""* command will list the packages required by the package-name. For example, to determine the dependencies of the apache2 package, execute the *apt-cache depends apache2* command. 26.7 Installing/Updating Packages With apt-get After searching for a package, you may want to install that package and its required dependencies. *Using ""apt-get install package-name"" command will download and prompt the administrator to install that package as well as its dependencies.* For example, to install the apache2 package and its dependencies, execute the apt-get install apache2 command. The ""apt-get install package"" command can also update a package, if that package is installed and a newer version is available. If the package is not already on the system, it would be installed; if it is on the system, it would be updated. To only update, execute the apt-get --only-upgrade install package command. *@@@@To update all packages of the system, two commands are executed. First, the command to update the cache of all packages available should be executed: apt-get update. Second, execute the apt-get upgrade command; all packages and dependencies will be updated.@@@@* 26.8 Removing/Purging Packages with apt-get Just as the dpkg command is able to either remove or purge a package, so can the apt-get command. Recall that the difference between the two is that purging deletes all package files, while removing deletes all but the configuration files for the package. *An administrator can execute the """apt-get remove package""" command to remove a package or the """apt-get purge package""" command to purge a package completely from the system.*For example, to purge the web server completely, execute the apt-get purge apache2 command.

View the details of the aptitude package by the executing the following command: apt-cache show aptitude The dpkg command can also be used to install software packages. Use the dpkg command to install the xfsdump package: dpkg -i /var/www/debs/amd64/xfsdump_3.1.1ubuntu2_amd64.deb

enigma

a person or thing that is mysterious, puzzling, or difficult to understand. His diaries record recurrent struggles to understand the enigma of his own personality, his spiritual emptiness and addictiveness. synonyms: mystery, puzzle, riddle, conundrum, paradox, problem, quandary, a closed book հանելուկ riddle, enigma, conundrum առեղծված enigma, mystery, riddle, conundrum

premise (The ability to charge users for active connections through the network is a fundamental premise of the telecommunication service industry.)

a principle or statement that you consider to be true, that you base other ideas and actions on The conclusions in the report were based on a false premise. We started from the premise that the situation can get no worse. Synonyms and related words Thoughts, ideas and beliefs:thought, idea, belief...

The process that data undergoes from a source node to a destination node is: The user data is segmented by the transport layer, placed into packets by the network layer, and further encapsulated as frames by the data link layer. The physical layer encodes the frames and creates the electrical, optical, or radio wave signals that represent the bits in each frame. These signals are then sent on the media one at a time. The destination node physical layer retrieves these individual signals from the media, restores them to their bit representations, and passes the bits up to the data link layer as a complete frame.

a router: Accepts a frame from a medium De-encapsulates the frame Re-encapsulates the packet into a new frame Forwards the new frame appropriate to the medium of that segment of the physical network Unlike the other PDUs that have been discussed in this course, the data link layer frame includes: HEADER: Contains control information, such as addressing, and is located at the beginning of the PDU (frame start, addressing, type, control). DATA: Contains the IP header, transport layer header, and application data. TRAILER: Contains control information for error detection added to the end of the PDU (Error Detection, Frame Stop). Media access control is the equivalent of traffic rules that regulate the entrance of motor vehicles onto a roadway. The absence of any media access control would be the equivalent of vehicles ignoring all other traffic and entering the road without regard to the other vehicles. However, not all roads and entrances are the same. Traffic can enter the road by merging, by waiting for its turn at a stop sign, or by obeying signal lights. A driver follows a different set of rules for each type of entrance.

thorn (Problems are only opportunities with thorns on them)

a stiff, sharp-pointed, straight or curved woody projection on the stem or other part of a plant. Roses ramble over walls, branches stiff with thorns and laden with huge blossoms. synonyms: prickle, spike, barb, spine a thorny bush, shrub, or tree, especially a hawthorn. 'They threw me over the back of a camel and told me they would kill me if I cried,' he said, sitting quietly under a thorn tree on the outskirts of Turalei. an Old English and Icelandic runic letter, Þ or þ, representing the dental fricatives / T͟H / and / TH / . In English it was eventually superseded by the digraph th. Similarly, thorn may represent either a voiceless or a voiced sound: compare the current use of the digraph th in three and these. փուշ thorn, needle, bur, sticker, prick, prickle ոզնի hedgehog, thorn ալոճենի hawthorn, haw, thorn, whitethorn փշոտ թուփ thorn

crisp

adjective (of a substance) firm, dry, and brittle, especially in a way considered pleasing or attractive. crisp bacon synonyms: crunchy, crispy, brittle, crumbly, friable, breakable, firm, dry verb give (something, especially food) a crisp surface by placing it in an oven or grill. crisp the pita rounds in the oven noun a dessert of fruit baked with a crunchy topping of brown sugar, butter, and flour. rhubarb crisp 1 more definitions See also crisp toast, potato crisp adjective փխրուն fragile, crisp, brittle, crumbly, delicate, frail գանգուր curling, curly, crisp, wavy, fuzzy, fleecy noun փրփրող crisp

slick

adjective (of an action or thing) done or operating in an impressively smooth, efficient, and apparently effortless way. a slick piece of software synonyms: efficient, smooth, smooth-running, polished, well-organized, well run, streamlined noun an oil slick. Nicholls was competing in France in 2002 when the slick from the oil tanker Prestige hit the beach. verb make (one's hair) flat, smooth, and glossy by applying water, oil, or cream to it. his damp hair was slicked back synonyms: smooth, sleek, grease, oil, gel 4 more definitions See also oil slick լպրծուն

flimsy

adjective comparatively light and insubstantial; easily damaged. voyagers who crossed the sea in flimsy boats synonyms: insubstantial, fragile, breakable, frail, shaky, unstable, wobbly, tottery, rickety, ramshackle, makeshift, jerry-built, badly built, shoddy, chintzy, gimcrack noun a document, especially a copy, made on very thin paper. credit-card flimsies adjective խախուտ flimsy, cranky, shaky, slack, crazy, slimpsy անհիմն groundless, unfounded, baseless, flimsy, insubstantial, idle փխրուն անկայուն flimsy noun թղթադրամ greenbacks, flimsy, bill, bank note, assignation բարակ թուղթ fli

treacherous

adjective guilty of or involving betrayal or deception. a treacherous Gestapo agent synonyms: traitorous, disloyal, faithless, unfaithful, duplicitous, deceitful, deceptive, false դավաճանական treacherous, traitorous, perfidious, disloyal, trappy, treasonable նենգ insidious, treacherous, deceitful, wily, serpentine, tortuous ուխտադրուժ apostate, treacherous, perfidious, renegade, false, unfaithful մատնողական treacherous

solicit (High-quality original papers are solicited)

ask for or try to obtain (something) from someone. he called a meeting to solicit their views synonyms: ask for, request, seek, apply for, put in for, call for, press for, beg, plead for 1 [TRANSITIVE] FORMAL to ask someone for something such as money or support The organization decided to solicit aid for the new campaign. time spent soliciting funds from overseas investors Synonyms and related words To ask someone to give you something:ask for, request, insist on something... Explore Thesaurus 2 [INTRANSITIVE/TRANSITIVE] to offer to have sex with someone in exchange for money Police have been carrying out raids on prostitutes suspected of soliciting. Synonyms and related words Sex for money:bordello, brothel, call girl...

*mugging (mug)*

attack and rob (someone) in a public place. he was mugged by three men who stole his bike synonyms: assault, attack, set upon, beat up, rob, jump, rough up, lay into, do over make faces, especially silly or exaggerated ones, before an audience or a camera. he mugged for the camera learn or review a subject as much as possible in a short time; cram. I'm constantly having to mug up things ahead of teaching them կողոպուտ robbery, looting, plunder, loot, pillage, mugging թալան robbery, plunder, loot, pillage, swag, mugging գողություն theft, stealing, pinch, robbery, steal, mugging

oust (pashtinank anel)

drive out or expel (someone) from a position or place. he ousted a long-term incumbent by only 500 votes synonyms: drive out, expel, force out, throw out, remove (from office/power), դուրս մղել oust, extrude, supplant, dislodge, expel, supersede վտարել evict, banish, expel, deport, oust, exclude տեղից հանել oust to remove someone from a position of power, especially in order to take that position The president was ousted in a coup last year. oust someone from something: The committee wanted to oust him from the union. Synonyms and related words To rebel or protest:agitate, black, blacklist...

So you have a directory that contains one file. Run the "git init" in order to create a git repo from that directory. Run: *git init* Another aspect is that the status message hints about what to do next. If you want to add these changes to the repository, use "git add". To undo the changes use "git checkout." Now command git to stage changes. Check the status *git add hello.html* *git status* Should you decide not to commit the change, the status command will remind you that you can use the "git reset" command to unstage these changes. Add the following to the .gitconfig file in your $HOME directory. File: .gitconfig [alias] co = checkout ci = commit st = status br = branch hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short type = cat-file -t dump = cat-file -p Note: Do not forget to define "hist" in your .gitconfig file? If you do not remember how, review the lesson on aliases. *$ git hist* Check the log data and find the hash for the first commit. *git checkout <hash>* Returning to the latest version in the master branch *git checkout master*

et's call the current version of the hello program version 1 (v1). First of all we will checkout the previous version. Instead of looking up the hash, we are going to use the ^ notation indicating "the parent of v1". *git tag v1-beta* *git checkout v1* *git checkout v1-beta* You can see the available tags using the git tag command. *$ git tag* Discarding local changes (before staging) Make changes to the hello.html file in the form of an unwanted comment. Undoing the changes in the working directory Use the checkout command in order to checkout the repository's version of the hello.html file. *git checkout hello.html* Cancel Staged changes (before committing) Check the status of unwanted changes . *git reset HEAD hello.html* The reset command resets the buffer zone to HEAD. This clears the buffer zone from the changes that we have just staged. The reset command (default) does not change the working directory. Therefore, the working directory still contains unwanted comments. We can use the checkout command from the previous tutorial to remove unwanted changes from working directory. *git checkout hello.html*

*frazzle*

extremely tired Synonyms and related words Tired:tired, exhausted, sleepy... completely burnt Synonyms and related words Burnt:charred, scorched, carbonised.. informal a state of being very tired in a nervous or slightly anxious (= worried and nervous) way after a lot of mental or physical effort: մաշված

usher (to lead someone politely somewhere, for example into a room or towards a seat Inspector Malley ushered us into his office. Synonyms and related words To go somewhere with someone or something:come, drive, walk.)

noun a person who shows people to their seats, especially in a theater or at a wedding. An usher at the cinema said the attendance had been better when the film was first released some weeks ago, but there were no sell-outs. synonyms: guide, attendant, escort, sidesman an assistant teacher. It was modest in size, with perhaps 40 pupils taught by one master, assisted by an usher , in the room above the guildhall, both of which survive and are still used by the school. verb show or guide (someone) somewhere. a waiter ushered me to a table synonyms: escort, accompany, take, show, see, lead, conduct, guide, steer, shepherd, marshal cause or mark the start of something new. the railroads ushered in an era of cheap mass travel See also usher i ուղեկցել accompany, convoy, attend, usher, see, saw

surrogate

noun a substitute, especially a person deputizing for another in a specific role or office. she was regarded as the surrogate for the governor during his final illness synonyms: substitute, proxy, replacement, deputy, representative, stand-in, standby, stopgap, relief, pinch-hitter, understudy See also surrogate mother, surrogate key փոխանորդ surrogate փոխարինող successor, substitute, surrogate, understudy, incomer, vicar

thrust

noun a sudden or violent lunge with a pointed weapon or a bodily part. he drove the blade upward with one powerful thrust synonyms: shove, push, lunge, poke the propulsive force of a jet or rocket engine. After liftoff, at nearly 100 percent of rated thrust , the engine throttles back momentarily. synonyms: force, propulsive force, propulsion, power, impetus, momentum verb push (something or someone) suddenly or violently in the specified direction. she thrust her hands into her pockets synonyms: shove, push, force, plunge, stick, drive, propel, ram, poke, jam; force, foist, impose, inflict See also to thrust, thrust out, thrust forward, pelvic thrust, thrust bearing, thrust ring, thrust upon, thrust into, thrust up, thrust fault noun հարված blow, shock, stroke, impact, thrust, stab verb ներխուժել invade, burst, intrude, thrust, raid, violate խծկել thrust հրել thrust, jog, shove, dig, bunt, jab խրել thrust, stick, jab, job, plunge, stab նետել throw, sling, dump, pitch, thrust, toss ծակել thrill, puncture, tap, gore, thrust, peck բոթել shoulder, thrust, jab, jog, joggle վարսել thrust

bust

noun a woman's chest as measured around her breasts. a 36-inch bust verb break, split, or burst (something). they bust the tunnel wide open synonyms: break, smash, fracture, shatter, crack, disintegrate, snap, split, burst adjective bankrupt. firms will go bust 5 more definitions See also go bust, to bust, bust up, bust out, bust-up, drug bust հարբեցողությամբ տարվել bust

book

noun գիրք book, volume, itinerary, codex, writing լիբրետտո book verb հրավիրել invite, convene, summon, bid, ask, book պատվիրել enjoin, direct, bespeak, prescribe, require, book վաճառել sell, unload, vend, handle, book

By executing chown <newuser> pathname, the root user can change the owner of the file <pathname> to the <newuser> account.

setuid on a file An s replaces the x for the user owner permissions Set with u+s 4000 Causes an executable file to execute under user owner identity, instead of the user running the command. setgid on a file An s replaces the x for the group owner permissions Set with g+s 2000 Causes an executable file to execute under group owner identity, instead of the user running the command setgid on a directory An s replaces the x for the group owner permissions Set with g+s 2000 Causes new files and directories that are created inside to be owned by the group that owns the directory. sticky on a directory A t replaces the x for the others permissions Set with o+t 1000 Causes files inside directory to be able to be removed only by the user owner, or the root user.

Some commands will produce both stdout and stderr. These two different outputs can be redirected into two separate files by using the following syntax: sysadmin@localhost:~$ find /etc -name passwd > /tmp/output.txt 2> /tmp/error.txt To discard these error messages, use the /dev/null file. What if you wanted all output (standard error and standard out) sent to one file? There are two techniques to redirect both standard error and standard out: sysadmin@localhost:~$ ls > /tmp/ls.all 2>&1 sysadmin@localhost:~$ ls &> /tmp/ls.all Both of the preceding command lines will create a file called /tmp/ls.all that contains all stdout and stderr. The first command redirects stdout to /tmp/ls.all and the 2>&1 means "send stderr wherever stdout is going". In the second example, the &> means "redirect all output". Note: The notation "2>&1" means send stderr to where stdout is going and the notation "&>" means redirect all output. The "<" symbol is used for INPUT redirection and used to pass the contents of a file as input to a command. To translate all the lower-case characters to upper-case in the /etc/hosts file, execute the following command: tr 'a-z' 'A-Z' < /etc/hosts

sysadmin@localhost:~$ tr 'a-z' 'A-Z' hello HELLO It might get frustrating after typing for a while because the tr command doesn't stop reading from standard input unless it's terminated or receives an "End Of Transmission" character. This can be accomplished by typing CTRL+D. The tr command won't accept a file name on the command line as an argument. To perform a translation, using a file as input, utilize input redirection. To use input redirection, type the command with its options and arguments followed by the < character (less than symbol) and a path to a file to use for input. For example: sysadmin@localhost:~$ cat test/animals.txt 1 retriever 2 badger 3 bat 4 wolf 5 eagle sysadmin@localhost:~$ tr 'a-z' 'A-Z' < test/animals.txt 1 RETRIEVER 2 BADGER 3 BAT 4 WOLF 5 EAGLE The output shows the animals.txt file "translated" into all uppercase characters. Warning! Do not attempt to use the same file for input and output redirection, as the results are probably not desirable (you end up losing all data). Instead, capture the output and place it into another file, use a different file name as shown below: sysadmin@localhost:~$ tr 'a-z' 'A-Z' < test/animals.txt > animals.new Command pipelines become really powerful when three or more commands are combined. For example, the following command line will extract some fields from a file with the cut command, then sort these lines with the sort command and finally eliminate duplicate lines with the uniq command: sysadmin@localhost:~$ cut -f1 -d',' test/os.csv | sort -n | uniq 1970 1987 1991

abstinence

the fact or practice of restraining oneself from indulging in something, typically alcohol. I started drinking again after six years of abstinence synonyms: teetotalism, temperance, sobriety, abstemiousness, abstention, nephalism ժուժկալություն abstinence, temperance, abstention, abstinency չափավորություն moderation, abstinence, sobriety, frugality, temperance, abstention

interplay

the ways that people or things affect each other or react when they are put together The summit highlighted the often hostile interplay between the two countries. Synonyms and related words Reactions and ways of responding:reaction, response, reply.. փոխազդեցություն

insinuate (անուղղակի կերպով ակնարկել )

to say something unpleasant in an indirect way insinuate (that): He even went as far as insinuating that Roger was a liar. Synonyms and related words Being careful about what you say:imply, get at, convey... Claire was angry at the insinuation that she was badly prepared. Synonyms and related words Being careful about what you say:imply, get at, convey... ներշնչել

untangle (separate something from something else:)

to solve a complicated situation or problem Officials are trying to untangle the stalled peace talks. Synonyms and related words To successfully deal with a problem or difficulty:cope, overcome, carry off... Explore Thesaurus 2 to separate things that are twisted around each other Cranes were needed to untangle the wrecked coaches. It took ages to untangle her hair. Synonyms and related words To separate something from something else:separate, spread out, divide...

crave (Moves That Women Crave)

verb feel a powerful desire for (something). a program to give the infants the human touch they crave synonyms: long for, yearn for, desire, want, wish for, hunger for, thirst for, sigh for, pine for, hanker after, covet, lust after, ache for, set one's heart on, dream of, be bent on, have a yen for, have a jones for, itch for, be dying for See also to crave, crave for, crave for rice

intriguing (arousing one's curiosity or interest; fascinating. an intriguing story)

very interesting, especially because of being strange or mysterious an intriguing subject for future research Synonyms and related words Interesting:buzzworthy, water cooler, interesting... Explore Thesaurus Synonyms and related words Unusual in an interesting way:unusual, special, unique... Explore Thesaurus DERIVED WORD intriguingly intriguingly pronunciation in British English /ɪnˈtriːɡɪŋli/ ADVERB It's an intriguingly complex film. Synonyms and related words Interesting:buzzworthy, water cooler, interesting... Explore Thesaurus Synonyms and related words Unusual in an interesting way:unusual, special, unique...

ovulate (ovum - an egg that can grow into a baby inside the body of a woman or a female animal)

when a woman or female animal ovulates, she produces an egg in her body and can become pregnant Synonyms and related words Menstruation and the menstrual cycle:amenorrhoea, biological clock, the change of life...

crave (խիստ կարիք)

you will crave verb feel a powerful desire for (something). "a program to give the infants the human touch they crave" synonyms: long for, yearn for, desire, want, wish for, hunger for, thirst for, sigh for, pine for, hanker after, covet, lust after, ache for, set one's heart on, dream of, be bent on, have a yen for, have a jones for, itch for, be dying for See also to crave, crave for, crave for rice

haunted house

կախարդված տուն


Conjuntos de estudio relacionados

Stress health and human flourishing

View Set

Larry Krieger 500 SAT Vocabulary Words

View Set

Chapter 41: Fluid, Electrolytes, and Acid-Base Balance

View Set

Chapter 19 - Family Nursing (QUESTIONS)

View Set

Gazdaságpolitika (A014) - Fogalmak

View Set

CSC 411 - Introduction to Artificial Intelligence Lecture 2 - Agents

View Set

1.10: Peer Review and Safe Harbor Laws

View Set