Linux Network Configuration. Linux TCPIP Network Configuration Files. File. Descriptionetcresolv. List DNS servers for internet domain name resolution. Manual page for etcresolv. Lists hosts to be resolved locally not by DNS. Manual page for etchostsetcnsswitch. List order of host name search. Typically look at local files, then NIS server, then DNS server. Manual page for etcnsswitch. Red HatFedoraCent. OS etcsysconfignetwork. Specify network configuration. Fedoragdm Here is an example of what we did on a vanilla install of FedoraC3 seems to use gdm by default. Add a line like this to etcX11gdmInit0. Weekly Edition Daily updates Events Calendar Book reviews Penguin Gallery. About LWN. net The LWN. net Linux Distribution List You have found the LWN. net Linux. Linuxlike environment for Windows making it possible to port software running on POSIX systems such as Linux, BSD, and Unix systems to Windows. News, documentation. Dpkg is the main package management program in Debian and Debian based System. It is used to install, build, remove, and manage Debian packages. Static IP, DHCP, NIS, etc. Red HatFedoraCent. OS etcsysconfignetwork scriptsifcfg device. Specify TCP network information. UbuntuDebian etcnetworkinterfaces. Specify network configuration and devices. Static IP and info, DHCP, etc. Domain Resolution Configuration Files. File etcresolv. Name of your domain or ISPs domain if using their name server. XXX. XXX. XXX. XXX IP address of primary name server. XXX. XXX. XXX. XXX IP address of secondary name server. This configures Linux so that it knows which DNS server will be resolving. IP addresses. If using DHCP client, this will automatically. ISP and loaded into this file as part of the DHCP protocol. If using a static. IP address, ask the ISP or check another machine on your network. Red HatFedora GUI usrsbinsystem config network select tab DNS. File etchosts locally resolve node names to IP addresses. XXX. XXX. XXX. XXXnode name. Note when adding hosts to this file, place the fully qualified name. It helps sendmail identify your server correctly i. XXX. XXX. XXX. XXX superserver. This informs Linux of local systems on the network which are. DNS server. or for all systems in your LAN if you are not using DNS or NIS. The file format for the hosts file is specified by RFC 9. Red HatFedora configuration GUI usrsbinsystem config network select tab Hosts. File etcnsswitch. System Databases and Name Service Switch configuration file. This example tells Linux to first resolve a host name by looking at the. DNS server as defined by etcresolv. NIS server. In the past this file has had the following names. Fedora Red Hat Network Configuration Files. Red Hat network configuration file used by the system during the boot process. File etcsysconfignetwork scriptsifcfg eth. Configuration settings for your first ethernet port 0. Your. second port is eth. File. etcmodprobe. Example statement for Intel ethernet card. Modules for other devices on the system will also be listed. This tells the kernel which device driver to use if configured as a. Red Hat. Fedora Red Hat Network GUI Configuration Tools. The following GUI tools edit the system configuration files. There is no difference in the configuration developed with the GUI tools and. TCPIP ethernet configuration Network configuration. FC 23 GUI shown here. RH 7. 2 FC 1. Text console configuration tool. Text User Interface TUI for Fedora Core 23. RH 9. 0 FC 1. Text console network configuration tool. First interface only eth. GUI last available with RH 7. Gnome Desktop Gnome Desktop Network Configuration. RH 9. 0 FC 3. Proxy configuration. Choose one of three options. Direct internet connection. Manual proxy configuration specify proxy and port. Automatic proxy configuration give URL. Assigning an IP address. Computers may be assigned a static IP address or assigned one dynamically. Typically a server will require a static IP while a workstation will use DHCP dynamic IP assignment. The Linux server requires a static IP so that those who wish to use its resources can find the system. It is more easily found if the IP address does not change and is static. This is not important for the Linux client workstation and thus it is easier to use an automated Dynamic Host Configuration Protocol DHCP for IP address assignment. Static IP address assignment. Choose one of the following methods. Network address by convention would be the lowest 1. Broadcast address by convention would be the highest 1. The gateway can be anything, but following convention 1. Note the highest and lowest addresses are based on the netmask. The previous example is based on a netmask of 2. Red Hat Fedora GUI tools. Gnome GUI network administration tool. Handles all interfaces. Configure for Static IP or DHCP client. First available with Red Hat 7. Handles all interfaces last available in Red Hat 7. Red Hat Fedora Console tools. Text User Interface. Only seems to work for the first network interface eth. Directly edit configuration filesscripts. See format below. The ifconfig command does NOT store this information permanently. Upon reboot this information is lost. Manually add the network configuration to etcsysconfignetwork scriptsifcfg eth. Red HatFedoraCent. OS for the first NIC, ifcfg eth. Ubuntu as shown below. Any other commands you may want to add to the system boot sequence can be added to the end of the file etcrc. The commands netcfg and netconfig make permanent changes to system network configuration files located in etcsysconfignetwork scripts. The IANA has allocated IP addresses in the range of 1. Command line IP Configuration ifconfig. TCPIP, default, inet. IPv. 6, ax. 25 AMPR Packet Radio, ddp Appletalk Phase 2, ipx Novell IPX or netrom AMPR Packet radio. Option. Descriptionup. Activate the interface. Implied if IP addresses are specified. Shut down interfacearp. Enable ARP protocol on this interface. Allow ARP to detect the addresses of computer hosts attached to the network. arp. Disable ARP protocol on this interfacepromisc. Enable promiscuous mode. Receive all packets on the network not just those destined for this interface. promisc. Disable promiscuous mode. Specify the Maximum Transfer Unit MTU of the interface. The MTU is the maximum number of octets the interface is able to handle in a single transaction. Defaults Ethernet 1. SLIP 2. 96broadcast XXX. XXX. XXX. XXXSet the network broadcast address for this interface. XXX. XXX. XXX. XXXSet the IP network mask for this interface. Man page ifconfig. Ubuntu Debian IP Configuration Files. File etcnetworkinterfaces. Static IP example. Dynamic IP DHCP example. Loopback interface network within your system without slowing down for the real ethernet based network. First ethernet interface card. First wireless network interface. Also see man interfaces. Ubuntu GUI Network Tools. Red Hat Fedora Cent. OS IP Configuration Files. The Red Hat configuration tools store the configuration information in the file. They will also allow one to configure routing information. File etcsysconfignetwork. Static IP address Configuration Configure gateway address. HOSTNAMEmy hostname Hostname is defined here and by command hostname. FORWARDIPV4true True for NAT firewall gateways and linux routers. False for everyone else desktops and servers. GATEWAYXXX. XXX. XXX. YYY Used if your network is connected to another network or the internet. Static IP configuration. Gateway not defined here for DHCP client. OR for DHCP client configuration. HOSTNAMEmy hostname Hostname is defined here and by command hostname. Gateway is assigned by DHCP server. OR for NIS client configuration. HOSTNAMEmy hostname Hostname is defined here and by command hostname. NISDOMAINNISProject. NIS domain to attach. File Red HatFedora etcsysconfignetwork scriptsifcfg eth. S. u. s. e. etcsysconfignetworkifcfg eth id XX XX XX XX XX. This file used by the command scripts ifup and ifdown. Static IP address configuration. BOOTPROTOstatic. BROADCASTXXX. XXX. XXX. 2. 55. IPADDRXXX. XXX. XXX. XXX. NETMASK2. NETWORKXXX. XXX. XXX. 0. ONBOOTyes Will activate upon system boot. RHEL4FC3 additions. TYPEEthernet. HWADDRXX XX XX XX XX XXGATEWAYXXX. XXX. XXX. XXX. OR for DHCP client configuration. RHEL4FC3 additions. IPV6. INITno. USERCTLno. PEERDNSyes. TYPEEthernet. HWADDRXX XX XX XX XX XX. Used by script etcsysconfignetwork scriptsifup to bring the various network interfaces on line. To disable DHCP change BOOTPROTOdhcp to BOOTPROTOnone. In order for updated information in any of these files to take effect. Network IP aliasing. Assign more than one IP address to one ethernet card. XXX. XXX. XXX. XXX netmask 2. XXX. XXX. XXX. 2. XXX. XXX. XXX. XXX dev eth. In this example 0 and 1 are aliases in addition to the regular eth. The result of the ifconfig command. Link encap Ethernet HWaddr 0. C 2. 5 7. A 3. F. inet addr XXX. XXX. XXX. XXX Bcast XXX. XXX. XXX. 2. 55 Mask 2. UP BROADCAST RUNNING MULTICAST MTU 1. Linux Administration Linux Practice Test. SELECT FOR ANSWER. Suppose that you have an application whose behavior depends on the environment variable BAR. Which of the following command lines may be used in a bash shell to configure the application A. export BARbaz echo BARB. BARbaz. C. BARbaz export BARD. BARbaz. E. declare x BARbaz. F. echo BARbaz. 1. SELECT FOR ANSWER. Which of the following commands can be used to assure that a file myfile exists A. cp myfile devnull. B. touch myfile. C. D. mkfile myfile. SELECT FOR ANSWER. Which of the following command lines can be used to convert a file containing DOS style CR LF line endings into Unix style LF line endings Assume for this question that the DOS style file is called dosfile, and we want the modified contents in unixfileA. B. tr d r lt dosfile unixfile. C. dos. 2unix dosfile unixfile. D. strip r lt dosfile unixfile. SELECT FOR ANSWER. Suppose for this question that you have a file called wordlist that contains a number of words, one per line. You would like to produce an ad hoc report that contains a numbered list of the first five words, according to alphabetical order. Which of the following command lines can be used to produce this report to the console A. sort wordlist nl head 5. B. split 1 wordlist cat xa C. nl wordlist sort sed 1. D. nl wordlist sort head 5. SELECT FOR ANSWER. The command ps A displays an ordered list of all running processes, with the right justifed process ID in the first space separated field. Suppose you would like to display to screen a list of the five most recently launched processes those with the highest process IDs. Which of the following. A. ps A tail 5 cut f 1 d B. A tail 5 sed s 0 9C. A head 5 nl. D. ps A tac head 5 cut b 0 5. SELECT FOR ANSWER. Suppose that a file names contains a list of names in the form, firstname lastname, one per line. These names are unsorted, and you would like them sorted by lastname however, the format of names on each line should remain the same. Which ONE of the following commands will NOT output an appropriately sorted list of names to the console A. cut f 2 d names paste names sort k 3 cut f 1. B. sort k 2 names. C. sed sw w212 names sort cut f. D. cut f 2 d names sort. E. cut f 2 d names paste names sort cut f 2. SELECT FOR ANSWER. Assume that your current working directory is tmp and your home directory is homejane. Which of the below commands will copy all the content of tmptest to a test subdirectory of your home directory A. cp r testhomejane. B. cp r. test C. D. cp r tmptest homejanetest. SELECT FOR ANSWER. Suppose that you have several files matching the filename pattern file0 9. You would like to visually compare the contents of all such files, in a side by side fashion. Which of the following commands would let you view the desired adhoc reportA. ls file0 9 xargs paste less. B. paste ls file0 9 report vi report rm report. C. cat file0 9 paste more less. D. ls file0 9 tee fnames paste cat fnamesE. F. ls ord fnames paste lt xargs cat fnames vi. SELECT FOR ANSWER. Which of the following Linux utilities does NOT include the capability to list the process IDs of running applications A. jobs. B. ps. C. D. top. 1. 352alphabetic. SELECT FOR ANSWER jobs l. Running kedit amp. Stopped signal pine. Stopped tty output vi. Given the jobs display in the exhibit, which command could you use to switch display focus to the application vi A. bg 3. B. fg 3. C. top p 5. 45. D. switch 5. 45. SELECT FOR ANSWER jobs l. Running kedit amp. Stopped signal pine. Stopped tty output vi. Given the jobs display in the exhibit, which command could you use to terminate the application viA. bg 3. B. kill 9 5. C. term i 3. D. SELECT FOR ANSWER. Suppose you have a running program called myprog, that is a child of the current shell. You would like to decrease the CPU usage of this program. Which of the following command lines can you use to make myprog yield more CPU resources A. nice 1 myprog. B. ps h o pid C myprog xargs nice 1 C. D. renice 1 p ps a grep myprog cut b 1 61. SELECT FOR ANSWERint doubleint n. Correctly parsing a C source file requires a full fledged parser such as that built into a C compiler. Nonetheless, regular expressions can be used to provide a pretty good approximate descriptions of many program constructs. Which of the following searches will locate at least most of the C functions that accept an int as a first argument, and return an int and will not produce false positives very often. The exhibit contains a fragment of C code with several annotated matching and non matching functions for non C programmers. A. grep E int tw t tnt B. grep E intwA Za zwwnt C. grep E int. tint. D. grep E int tA Za z tint SELECT FOR ANSWER. Some tools that use regular expressions support so called extended regular expressions. For example, GNU grep with the E option uses extended regular expressions. Other tools like sed only support basic regular expressions. As a consequence, one must be careful in selecting the right regular expression syntax. Which of the following characters have a special meaning in extended regular expressions, but not in basic regular expressions. That is, which of the following is an extended regular expression meta character, but only a regular character in basic regular expressions SELECT FOR ANSWER. Based on Linux partition naming system, which of the following device names point to logical partitions assuming the corresponding partitions exist at all on the system in questionA. devsda. 3B. devfd. C. devhdb. 7D. devhda. E. devfd. 7F. devsdc. SELECT FOR ANSWER. Which of the following command lines can possibly be used to format a partition Assume required partitions exist, and also that logical partitioning is used on each hard disk. A. mkfs t msdos devsda. B. mkfs. ext. 2 devnull. C. mkfs t ext. 2 devhda. D. mkfs typeext. SELECT FOR ANSWER. Which Linux command can be used to repair improperly shutdown, or otherwise potentially corrupt partitions A. chkdsk. B. scandisk. C. fsck. D. fdisk. SELECT FOR ANSWER. Which of the following command lines will produce an ad hoc report on the total disk space used personally by the current user A. fsck B. df. C. quota used. D. du hs 2. 423alphabetic. SELECT FOR ANSWER. Which Linux command can be used to determine the available space on local hard disk partitions A. free. B. df. C. D. fdisk. 2. 431alphabetic. SELECT FOR ANSWER. Please examine the exhibit for this question which displays the actual etcfstab file for the system on which this exam was created. Which of the following lines in the file causes a fixed and user writeable partition to be mounted A. Line 5. B. Line 1. C. Line 9. D. Line 7. SELECT FOR ANSWER. Which Linux command can be used to limit the disk space usage allowance of a particular userAssume for this question that quotas are enabled for the filesystems in use on the system in question. A. edquota. B. setquota. C. quotaon. D. repquota. SELECT FOR ANSWER. Suppose you have created a new application myapp, and copied it to the directory usrlocalbin. You would like all the users of the system to be able to run your application. Which of the following command lines would allow the appropriate accessA. chmod ox usrlocalbinmyapp. B. chgrp bin usrlocalbinmyapp. C. umask 0. 02. 2 usrlocalbinmyapp. D. chown 7. 55 usrlocalbinmyapp. SELECT FOR ANSWER. Proper file security is particularly important for CGI applications invoked over the web, given the diversity of users. Which of the command lines setup reasonable file permissions for a CGI applications Even though particular web servers may require slightly different configurations, you should be able to rule out all the wrong answers below. A. chmod a x wwwcgi binmyapp. B. chmod 0. 75 wwwcgi binmyapp. C. chmod 7. 11 wwwcgi binmyapp. D. chmod ow wwwcgi binmyapp. SELECT FOR ANSWER. Which Linux command is used to assign privileges over a particular file to a designated user. A. chroot. B. chown. C. assign. D. chgrp. SELECT FOR ANSWER.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
November 2017
Categories |