Configuring CentOS 6 GNOME Screen Resolution and Multiple Monitors Configuring the CentOS 6 GNOME Desktop Display Resolution. Red Hat Enterprise Linux 6 Essentials – First Edition. International Book CentOS is a community driven project that takes the source code to Red Hat. Title CentOS 6 Essentials; Author(s) Neil Smyth; Publisher: Payload Media; 1 edition (March, ); Paperback N/A; ebook Online, HTML, PDF, ePub, site, etc.
|Language:||English, Indonesian, Portuguese|
|ePub File Size:||17.62 MB|
|PDF File Size:||19.60 MB|
|Distribution:||Free* [*Sign up for free]|
download and download the full PDF, ePub & site versions of this CentOS 6 eBook for only $ site/ePub/PDF edition contains Listings 10 - 15 Foundations of CentOS Linux: Enterprise Linux On the Cheap. Copyright © by Ryan Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Instead of providing just the essentials for starting an X session. More information and resrastraknabest.tk available at resrastraknabest.tk Feel free to contact . 6. Red Hat. . download a CentOS 7 image.
The contents are written in simple and easy to understand format, mainly keeping in mind about the newbie Linux users who have come from other OS or just have installed any Linux Distros for the first time. The first chapter of this book has focused on the traditional history of Unix, Linux, Users Interface, features of Linux, and the various desktop environment. Then you will be getting quickstart documentation on initial setup, login, password, GUI, Command Line Interface, files management, and necessary Linux command.
In the third chapter, you will be able to play with the Linux files system and partitioning. The fourth chapter will allow you to learn about various processing task related to users, Boot, Grub, and Multi-tasking inside out. Moreover, it gives detailed information about Desktop environment, Graphical User interface, Shell Script, and setup, X window system and configuration, keyboard, date, language and fonts set up, installing software, and package management.
There is a detailed step to learn about printing. Though Linux system is versatile and stable OS sometimes, it may get broken due to some tweaks. There is a separate chapter which will teach you about backup and restoration of files and system image.
Now we are living in an era of technology and networking. In the networking section, you will be learning about the local host and remote access networking, Internet setup and file transfer protocol , and above all the security aspects.
The sound and audio chapter teaches you about how to play music and movies on your system, streaming Internet television and a little bit of information about Internet telephony.
Table of Contents. If you find a mistake in one of our books maybe a mistake in the text or the code we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title. The required information will appear under the Errata section.
Piracy Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at with a link to the suspected pirated material. We appreciate your help in protecting our authors and our ability to bring you valuable content. Questions If you have a problem with any aspect of this book, you can contact us at and we will do our best to address the problem. All too often, I find that those first experiences have never been good ones or to be looked back upon with much fondness.
Guiding you through the initially unfathomable regime of vi, we are going to make sure that you are the master of vi and you leave wanting to use this tool from the gods. Remember how you persevered for many hours riding your bicycle as a toddler and became a master, despite a few bruised knees?
I want you to persevere with vi too.
We will start with a little command-line magic to make the whole command-line interface CLI experience a better one. We will then be ready to start our black-belt experience in vi. In this chapter, we will go through the following topics: CLI trickery shortcuts that you will love Vim and vi: In this section, you will learn to differentiate between these twins and meet their graphical cousin Getting the. Linux is my passion, as is automation.
I am always keen to create scripts to carry out tasks so that those tasks become repeatedly correct. Once the script is created and tested, we will have the knowledge and faith that it will run in the same way every time and we will not make mistakes or miss critical steps, either because it gets boring or we are working late on a Friday night and just want to go home.
Scripting itself is just knowing the command line well and being able to use it at its best. This truth remains across all systems that you will work with.
The double pipe or vertical bar indicates that we will attempt the next command only if the first command fails. This means that if we fail to switch to the dir1 directory, we will run the mkdir dir1 command to create it. If the directory creation succeeds, we then change into that directory. The part denotes that the second command will run only on the failure of the first.
The Tiger: A True Story of Vengeance and Survival
The command history is a little more and hugely better than just an up arrow key! More importantly, we can specify the start characters for the last command. If it was merely the last command, then the up arrow key would suffice.
If we were working on a web server configuration, we may want to edit the configuration file with vi, start the service, and then test with a command-line browser.
We can now abbreviate the command list to the following:! This way, we can appear to be terribly proficient and working really quickly, thus gaining more time to do what really interests us, perhaps a short 9 holes? In a similar fashion to our first glance at the history using the!
This would look for 73 anywhere as an argument or part of an argument. With my current history, this would relate to the date command we ran earlier.
We make a note that we exclusively look for 73, meaning we are looking for the character 7 followed by the character 3. We have to then bear in mind that we would also match or if they existed in my history. Having mastered a little of the Bash shell history functions, we should practice to make this second nature. They sound like some ancient mystic potion that ensures long life and wisdom. Alas though, they are not. I can honestly say that the majority of, if not all, tasks can be performed by me more quickly in vi.
That being said, in CentOS, you will not find vi; vi is purely a default alias that is provided for convenience, and links to the vim command. We can view this on my CentOS 6. It has been common in the Linux platform since the early s. As the name suggests, it is based on vi and is improved; on CentOS, it is distributed with the vim-enhanced package. Another such improvement is that it can work traditionally on the command line or with a GUI frontend.
System Administration Guide - CentOS
To install the graphical interface for Vim, you will need to add the vim-x11 package as follows: yum install -y vim-x11 One limitation, of course, is that you will require the X11 server to be running.
In an enterprise, the server will often run without a GUI and you can connect using secure shell to a command-line shell only.
Starting vimx without the -g option just starts the normal Vim program. Getting the. With this file, especially with our own version, you can customize how Vim appears and controls its functionalities. Firstly, we will look at line numbering. Often when we edit a file, we do so as the console has reported an error on a particular line just after we have tried running a script or starting a service; we know we have a syntax error. Let's say we want to go directly to the offending line 97 of the test.
However, in the case of the word search, the word that was search is highlighted in color. If that is not desirable, then we can simply turn off that feature. Within Vim, we can type: :nohlsearch [ 13 ] 29 Taming vi If there are settings that we want to make permanent within Vim, we can edit the. This is our own personal settings file and as such, changes made here will not affect anyone else. As we view our files though, from within Vim, we may prefer to have line numbering turned on.
Sometimes this makes life easier, but other times, we may prefer to have line numbering off, especially in cases where we have lines starting with numbers because the display can become confusing. To enable line numbering, run the following command: :set number To turn line numbering off, we can use the following command: :set nonumber As before, we can always put the desired start-up value in the.
However, before we do this, let's look at key mappings within Vim and how we can create a shortcut to toggle line numbering on and off. We would like to create a mapping for the normal mode in Vim. This is the mode when we first enter Vim and we are not editing, just navigating the file; using the Esc key, we can always return to the normal mode.
Now we are really starting to make some steam with this product, and you can gain some appreciation of why it is so popular. Before we make the final edit to the. Making sure that we are in the normal mode using the Esc key, we can use 2G or 2gg to navigate to line 2 of the current file; likewise, G or gg would go to line and G or gg would navigate to the end of the file. Simple but not simple enough; I would prefer to type the line number followed by the Enter key.
For this, we map the Enter key to G. If we choose to use the Enter key without a preceding number, then we are taken directly to the end of the document, just as we would is we used the key G by itself. This in turn is interpreted as the number followed by G.
In this way, we can navigate easily to the correct line. We can persist this setting by adding the following text to the.
Search and replace So we are not exactly on a "search and destroy" mission, but if it helps by adding a little enjoyment to our learning, then we can embark upon a search and replace mission. Linux has a huge amount of power available on the command line and nothing less than the stream editor, sed. Even without entering the Vim editor, we can search for and replace text in a single file or even across multiple files. Not having to use an interactive editor opens up more administrative scope to us by being able to script updates across a single or many servers.
The functionality we have in the sed command is available to us for use from within Vim or as a standalone application. We will be learning in this subsection how to search for and replace text within files using sed and from within Vim, building skills that we can use across CentOS and other operating systems including OS X on the Mac. Firstly, let's take a scenario that we have recently changed our company name and we need to change all the references of Dungeons in a text document to Dragons.
The -i option allows for in-pace edits, meaning we edit the file without the need to redirect the output from sed to a new file. The g option allows for the replacement to occur across all instances of Dragon even if it appears more than once per line. These lines may represent the contents of an if statement, for example, that we would like to indent.
There is no need for the global option as the start of a line obviously only occurs once per line. Using this method, we can quickly add indents to a file as required, and we are again Zen superheroes of Vim. Learning to remove extraneous comments from a file with a few deft key strokes Now that we are the administrator, the Zen master of search and replace, we can use these skills to tidy configuration files that often have many hundreds of commented lines within them.
I do not mind documentation but when it becomes such an overwhelming majority, it can take over. Consider the httpd.
This has commented lines. We perhaps want to keep the original file as a reference.
Psychology - A Self-Teaching Guide
So let's first make a copy by executing the following command; we know how to do this from the Preface of this book and if you did not read it, now is your chance to read it before a letter goes home to your parents. Summary In each chapter, I want to make sure that there has been at least one item of value that you feel you can take away with you and use; how did I do in this chapter?
If you recall, we have reviewed a few shortcuts that may help us navigate the command history effectively. Quickly, we moved on to discover the text editor vi or, more commonly now, Vim. For those that need a little help getting started with Vim, we additionally have gvim available to use if we are working on the desktop. Customizing any system is important to make us feel that we own the system and it works for us. With Vim, we can use the. We were able to add a little bling to Vim with some extra key mapping and desirable options.
From then on, it was straight down to work to see what Vim could do, and how the search and replace and delete options that we reviewed worked. When it does finally splutter into some form of life, we then have to contend with a steering wheel too cold to hold. Thankfully, starting up a Linux system is not so unpleasant; perhaps air-conditioned server rooms have something to do with this, I am not sure Working through this chapter, we are going to build upon what you have already mastered helping you understand your Linux systems.
When is the root filesystem not the root filesystem? Working on the GRUB console: In this section, you will learn how to enable some powerful recovery tools. Protecting the GRUB menu with passwords: In this section, you will learn how to enforce physical security of your systems: desktops or servers.
Boot splashing with plymouth: A little fun to finish the section with, we will look at the range of boot splash screens that we can use with CentOS. By the end of this chapter, your Linux system will never have been so well dressed. This tiny piece of bootstrap code is used to load the kernel and allows us to dual boot different Linux versions or even with Microsoft Windows operating systems.
The GRUB has been the bootloader of choice for many years, although other bootloaders do exist. The MBR makes up the first bytes of the disk, allowing up to bytes of storage for the bootloader; the additional space will be used to store the partition table for that drive.
Rather than duplicating the entire disk, we limit the backup to a count of one block of bytes. The MBR now is effectively cleared. The system remains usable as the partition table is resident to the RAM on the running system; however, until we are able to restore the MBR, a reboot will soon identify how much of a disaster we are in. Never fear, we can restore the MBR from the backup. What dd takes away, dd can return, simply by using the dd command as follows.
Quickly, before someone notices! Remember, it only contains the bytes that make up the MBR.
We use fdisk in the second example as lsblk reads from memory and not the disk. In general, the default selection is loaded without user interaction.Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Getting the.
However, before we do this, let's look at key mappings within Vim and how we can create a shortcut to toggle line numbering on and off. Linux kernel crash analysis is not an everyday topic. With my current history, this would relate to the date command we ran earlier. Electronic Engineering.
In the networking section, you will be learning about the local host and remote access networking, Internet setup and file transfer protocol , and above all the security aspects. The command history is a little more and hugely better than just an up arrow key! We will be learning in this subsection how to search for and replace text within files using sed and from within Vim, building skills that we can use across CentOS and other operating systems including OS X on the Mac.