Difference between revisions of "Configure System Settings"
| (13 intermediate revisions by the same user not shown) | |||
| Line 3: | Line 3: | ||
Windows users will be familiar the registry, which stores system settings in a proprietary database spanned across two files named ''system.dat'' and ''user.dat''. Both of these files are susceptible to corruption, tampering and security issues, and a Windows system cannot boot without them. Almost every setting in a Linux system is stored in a text-based configuration file stored somewhere within the filesystem. All of these files are accessible from a command prompt and can be modified using a simple text editor such as [http://www.nano-editor.org/ nano]. | Windows users will be familiar the registry, which stores system settings in a proprietary database spanned across two files named ''system.dat'' and ''user.dat''. Both of these files are susceptible to corruption, tampering and security issues, and a Windows system cannot boot without them. Almost every setting in a Linux system is stored in a text-based configuration file stored somewhere within the filesystem. All of these files are accessible from a command prompt and can be modified using a simple text editor such as [http://www.nano-editor.org/ nano]. | ||
| − | + | ||
| + | ---- | ||
| + | '''Using nano''' | ||
* Open files for writing using the command '''nano -w /path/to/file''' | * Open files for writing using the command '''nano -w /path/to/file''' | ||
| Line 9: | Line 11: | ||
* Delete an entire line of text using '''Ctrl-k''' | * Delete an entire line of text using '''Ctrl-k''' | ||
* Save the file and exit nano using '''Ctrl-x''' | * Save the file and exit nano using '''Ctrl-x''' | ||
| + | ---- | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | -- | + | There are many options in Linux for setting the system clock. By setting the clock to ''local'', it will read the time from the system BIOS. Set the timezone here as well. |
| + | '''#''' nano -w /etc/conf.d/hwclock | ||
| + | ===/etc/conf.d/hwclock=== | ||
| + | CLOCK="local" | ||
| + | To finish setting the system time zone, you can create a symbolic link to the file relating to your region stored in ''/usr/share/zoneinfo/''. In this example I use the Canada Pacific (Vancouver) setting. | ||
| + | '''#''' unlink /etc/localtime | ||
| + | '''#''' ln -s /usr/share/zoneinfo/Canada/Pacific /etc/localtime | ||
| + | For your system to be recognized by name by others on the network you'll need to set the hostname. Your system's hostname is stored in the file ''/etc/conf.d/hostname''. Simply replace ''yourcomputersname'' with your computer's name. | ||
| + | '''#''' nano -w /etc/conf.d/hostname | ||
| + | ===/etc/conf.d/hostname=== | ||
| + | HOSTNAME="''yourcomputersname''" | ||
| + | The system domain is set in the file ''/etc/conf.d/net''. Simply replace ''yourdomain'' with your domain. | ||
| + | '''#''' nano -w /etc/conf.d/net | ||
| + | ===/etc/conf.d/net=== | ||
| + | ... | ||
| + | dns_domain_lo="''yourdomain''" | ||
| + | ... | ||
| + | To complete the networking configuration we'll configure our ''/etc/hosts'' file. This is the same as the ''C:\Windows\system32\drivers\etc\hosts'' file in Windows. You can also use this file to create aliases for other computers and devices on your network. In this example, we'll create an alias for another computer on the network called ''smack'', located at ''192.168.1.65'', and a network printer called ''laserbeak'' located at ''192.168.0.104''. | ||
| + | '''#''' nano -w /etc/hosts | ||
| − | + | ===/etc/hosts=== | |
| + | 127.0.0.1 ''yourcomputersname.domain.com'' ''yourcomptuersname'' localhost | ||
| + | 192.168.1.65 smack | ||
| + | 192.168.0.104 laserbeak | ||
| − | passwd | + | ===root password=== |
| + | To complete the basic system settings, we'll set the root password. This will be the most important password in your Gentoo Linux system, and if you're fortunate you'll never have to use it: however, make a note of not forgetting it. You'll need to enter it twice to set it successfully. | ||
| + | '''#''' passwd | ||
| + | Now that your root password has been set, you can [[Configure make.conf]]. | ||
Latest revision as of 17:51, 31 May 2011
Installing Gentoo - Configure System Settings
Windows users will be familiar the registry, which stores system settings in a proprietary database spanned across two files named system.dat and user.dat. Both of these files are susceptible to corruption, tampering and security issues, and a Windows system cannot boot without them. Almost every setting in a Linux system is stored in a text-based configuration file stored somewhere within the filesystem. All of these files are accessible from a command prompt and can be modified using a simple text editor such as nano.
Using nano
- Open files for writing using the command nano -w /path/to/file
- Search for text using Ctrl-w (press Ctrl-w again to find next instance)
- Delete an entire line of text using Ctrl-k
- Save the file and exit nano using Ctrl-x
There are many options in Linux for setting the system clock. By setting the clock to local, it will read the time from the system BIOS. Set the timezone here as well.
# nano -w /etc/conf.d/hwclock
/etc/conf.d/hwclock
CLOCK="local"
To finish setting the system time zone, you can create a symbolic link to the file relating to your region stored in /usr/share/zoneinfo/. In this example I use the Canada Pacific (Vancouver) setting.
# unlink /etc/localtime # ln -s /usr/share/zoneinfo/Canada/Pacific /etc/localtime
For your system to be recognized by name by others on the network you'll need to set the hostname. Your system's hostname is stored in the file /etc/conf.d/hostname. Simply replace yourcomputersname with your computer's name.
# nano -w /etc/conf.d/hostname
/etc/conf.d/hostname
HOSTNAME="yourcomputersname"
The system domain is set in the file /etc/conf.d/net. Simply replace yourdomain with your domain.
# nano -w /etc/conf.d/net
/etc/conf.d/net
... dns_domain_lo="yourdomain" ...
To complete the networking configuration we'll configure our /etc/hosts file. This is the same as the C:\Windows\system32\drivers\etc\hosts file in Windows. You can also use this file to create aliases for other computers and devices on your network. In this example, we'll create an alias for another computer on the network called smack, located at 192.168.1.65, and a network printer called laserbeak located at 192.168.0.104.
# nano -w /etc/hosts
/etc/hosts
127.0.0.1 yourcomputersname.domain.com yourcomptuersname localhost 192.168.1.65 smack 192.168.0.104 laserbeak
root password
To complete the basic system settings, we'll set the root password. This will be the most important password in your Gentoo Linux system, and if you're fortunate you'll never have to use it: however, make a note of not forgetting it. You'll need to enter it twice to set it successfully.
# passwd
Now that your root password has been set, you can Configure make.conf.