Escolar Documentos
Profissional Documentos
Cultura Documentos
ID - 4254310
GRUB_CMDLINE_LINUX="text"
Now use update-grub command to re-generate a GRUB2 config file in /boot based on
these changes.
$ sudo update-grub
For systemd-enabled desktop only: If your desktop uses systemd (e.g., for Debian 8
or later or Ubuntu 15.04 or later), there is one additional step needed. That is to change
the default target from "graphical" target to "multi-user" target. Skip this step if your
desktop does not use systemd.
$ sudo systemctl set-default multi-user.target
You can always revert to desktop boot later by restoring GRUB config file and running:
$ sudo systemctl set-default graphical.target
At this point, your desktop should boot into the command line when you reboot it.
shutdown does its job by signalling the init process, asking it to change
the runlevel. Runlevel 0 is used to halt the system, runlevel 6 is used
to reboot the system, and runlevel 1 is used to put the system into a state
where administrative tasks can be performed (single-user mode). Runlevel 1
is the default, unless the -h or -r options are specified.
First, open a command-line terminal (select Applications > Accessories > Terminal). For
remote system, login using ssh. Next, switch to the root user by typing su - or sudo -
s and entering the root password, when prompted. Finally, type the following command
to shutdown system immediate as root user:
# shutdown -h now
OR
# shutdown -h +0
2. What are Core System services
Ans- Linux system has five core services: init, inetd, xinetd, syslog, and cron.
init. Always has a process ID of 1. The mysterious force that tells init when to
change runlevels
is actually the telinit command.
inetd. Not in version 7.0? The role of inetd is as a supervisor for other network server-related
processes, such as telnet and ftp. The directory is /etc/inetd.conf. The file is empty
the inetd.conf.
But xinetd.conf. Another file used instead of inetc.
Security for inetd.conf. Youll find that in most installations of Linux, many services are
turned on
by default. If your system will be available to the Internet at large, the first thing youll want to
do is
turn everything off! Never assume that just because your system is unadvertised to the public,
other
people wont find it.
Needs curly brackest { }syslogd. The syslogd daemon provides a standardized means of
performing logging. Many other UNIXs employ a compatible daemon, thus providing a means
for
cross-platform logging over the network.
The log files that syslogd stores to are straight text files, usually stored in the /var/log directory.
Each log entry consists of a single line containing the date, time, hostname, process name,
process
PID, and the message form that process.
Linux logs all of the processes, straight text files.
The location to which syslogd can send log messages is also quite flexible. It can save messages
to
files and send messages to FIFOs, to a list of users, or to a master log host.
Cron. The cron program allows any user in the system to schedule a program to run on any date,
at
any time, or on a particular day of week, down to the minute. It is a scheduler. It is a
command-line
tool.
sudo vi /etc/network/interfaces
sudo vi /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.3.90
gateway 192.168.3.1
netmask 255.255.255.0
network 192.168.3.0
broadcast 192.168.3.255
After entering all the details you need to restart networking services using the
following command
sudo /etc/init.d/networking restart
sudo vi /etc/network/interfaces
auto eth0:1
iface eth0:1 inet static
address 192.168.1.60
netmask 255.255.255.0
network x.x.x.x
broadcast x.x.x.x
gateway x.x.x.x
Example
To set the hostname directly you can become root and run
If you want to know more about how to setup host name check here
Setting up DNS
When it comes to DNS setup Ubuntu doesn't differ from other distributions.
You can add hostname and IP addresses to the file /etc/hosts for static
lookups.
To cause your machine to consult with a particular server for name lookups
you simply add their addresses to /etc/resolv.conf.
For example a machine which should perform lookups from the DNS server
at IP address 192.168.3.2 would have a resolv.conf file looking like this
sudo vi /etc/resolv.conf
search test.com
nameserver 192.168.3.2
There are two ways to start network-admin first thing is you can use your terminal
to type "sudo network-admin" it will start up or you can go to System---
>Administration --->Networking
Once it opens you should see the following screen
In the above screen select wired connection and click on properties tab you
should see the following screen my network card is curretly configured for DHCP
client and you need to make sure "Enable this connection" tick box is checked
If you want to configure the Static ipaddress you need to select drop down box
under "Configuration" select static ip address and you need to make sure
"Enable this connection" tick box is checked
Once you select the static ip address you need to select ip address,subnet
mask,gateway address and click on ok
Now you click on "General" tab here you can enter your hostname,domain name
Next one you need to click on "DNS" tab to configure your system's DNS
settings, hostname, or DNS search path.
Click the Hosts tab, and then either click the Add or Properties button (after
selecting a host) to create or edit an entry in your system's /etc/hosts file
Highlight an existing entry, and then click the Properties button to change
/etc/hosts entries in the Hosts tab of the Network Configuration screen.
You can also assign different locations to your computer, especially very useful if
you are on a laptop and move between several networks each requiring different
configurations. Just select the gray bar at the top of the network-admin window
and select Create Location. Enter a name, such as Home and then repeat this
again to create another location, Work. Each time you switch between locations,
Ubuntu detects that it needs to use configurations specific to those locations, so
for instance you might want to use DHCP at work, but not at home. Simple; just
select the Home location, configure your ethernet connection to use a Static IP
and you are all set to switch between your home and corporate networks.
Security Overview:
Clicking on this entry will toggle the status of the setting to either enabled or disabled.
Configure
Clicking on this entry will launch another YaST module for configuration. You will
return to the Security Overview when leaving the module.
Unknown
A setting's status is set to unknown when the associated service is not installed. Such a
setting does not represent a potential security risk.
With this option turned on, the last successful login attempt is
recorded in /var/log/lastlog and displayed when logging in. This data
is also used by the commandfinger.
Password Settings :
Passwords that are easy to guess are a major security issue. The Password
Settings dialog provides the means to ensure that only secure passwords
can be used.
Password Age
sshSecure Shell
ssh tux@sun
ssh -l tux sun
scpSecure Copy
sftp sun
Enter passphrase for key '/home/tux/.ssh/id_rsa':
Connected to sun.
sftp> help
Available commands:
bye Quit sftp
cd path Change remote directory
to 'path'
[...]
Port Forwarding