<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://studioware.com/wikislax/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wikislax</id>
		<title>Wikislax - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://studioware.com/wikislax/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wikislax"/>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Special:Contributions/Wikislax"/>
		<updated>2026-05-07T14:03:55Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.29.2</generator>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Creating_VMs&amp;diff=186</id>
		<title>Creating VMs</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Creating_VMs&amp;diff=186"/>
				<updated>2026-04-06T20:55:03Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Creating a PV VM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== the xl tool ==&lt;br /&gt;
&lt;br /&gt;
There is a variety of tools and commands to handle virtual machines. Here we will use the Xen '''xl''' command.&lt;br /&gt;
&lt;br /&gt;
* '''xl create ''file''''' affords creating a virtual machine based on the configuration in file ''file''. A one-starting sequential domain id is created.&lt;br /&gt;
&lt;br /&gt;
* '''xl destroy ''domid''''' affords destroying a virtual machine with domain id ''domid''. Of course using the system in the VM will be a preferred method to terminate.&lt;br /&gt;
&lt;br /&gt;
* '''xl help''' affords getting more information on other xm commands.&lt;br /&gt;
&lt;br /&gt;
Xen supports paravirtualisation and hardware virtualization. Both can be used at the same time on a single Xen system.&lt;br /&gt;
&lt;br /&gt;
== Creating a PV VM ==&lt;br /&gt;
&lt;br /&gt;
* in paravirtualization (PV) guest operating systems are modified so they are able to interlock with Xen without emulation or virtual emulated hardware. Xen PV guest kernels exist for Linux, NetBSD, FreeBSD, OpenSolaris and Novell Netware. Upstream kernel.org Linux kernels since Linux 2.6.24 include Xen PV guest (domU) support based on the Linux pvops framework, so every upstream Linux kernel can be automatically used as Xen PV guest kernel without any additional patches or modifications.&lt;br /&gt;
&lt;br /&gt;
Paravirtualization requires storing the kernel to boot in the dom0 filesystem, and populating the system in a virtual partition. The kernel generated must be able to manage [http://wiki.qemu.org/download/qemu-doc.html#QEMU-PC-System-emulator the QEMU devices] and include the .config file [http://wiki.xen.org/wiki/Mainline_Linux_Kernel_Configs#Configuring_the_kernel domU options]. Here is a minimal example of such a [{{SERVER}}/wikislax/download/config-domU .config domU] file. The swap partition and VM filesystem can be created as below. Don't forget to update the root device in fstab :&lt;br /&gt;
&lt;br /&gt;
 # dd if=/dev/zero of=sl12.swp bs=1024k count=1024 status=progress&lt;br /&gt;
 # mkswap sl12.swp&lt;br /&gt;
 # dd if=/dev/zero of=sl12.img bs=1024k count=16384 status=progress&lt;br /&gt;
 # mkfs -t ext3 sl12.img&lt;br /&gt;
 # mkdir loop&lt;br /&gt;
 # mount -o loop sl12.img loop&lt;br /&gt;
 # cp -ax /mnt/sl12/{0,bin,boot,etc,home,lib,lib64,media,mnt,opt,root,run,sbin,srv,sys,usr,var} loop&lt;br /&gt;
 # mkdir loop/{dev,proc,tmp}&lt;br /&gt;
 # chmod 777 loop/tmp&lt;br /&gt;
 # vi loop/etc/fstab&lt;br /&gt;
 # umount loop&lt;br /&gt;
 # dd if=/dev/zero bs=1G count=8 &amp;gt;&amp;gt; sl12.img&lt;br /&gt;
 # e2fsck -f sl12.img&lt;br /&gt;
 # resize2fs sl12.img&lt;br /&gt;
&lt;br /&gt;
Then a PV config file needs to be created. Samples are available from the /etc/xen directory. Here is an [{{SERVER}}/wikislax/download/sl12 example] running in a X window for slackware 12.1 (32 bits). The main config options to modify are :&lt;br /&gt;
&lt;br /&gt;
 # Kernel image file in dom0 filesystem&lt;br /&gt;
 kernel = &amp;quot;/boot/vmlinuz-3.4.2-domU&amp;quot;&lt;br /&gt;
 # Not using any optional ramdisk&lt;br /&gt;
 #ramdisk = &amp;quot;/boot/initrd.gz&amp;quot;&lt;br /&gt;
 # Initial memory allocation (in megabytes) for the new domain.&lt;br /&gt;
 memory = 2048&lt;br /&gt;
 # A name for the new domain. All domains have to have different names,&lt;br /&gt;
 name = &amp;quot;sl12&amp;quot;&lt;br /&gt;
 # Number of virtual CPUs&lt;br /&gt;
 vcpus = 2&lt;br /&gt;
 # Define network interfaces&lt;br /&gt;
 vif = [ ' ' ]&lt;br /&gt;
 # Define disk devices. Note the device names xvda and xvdb&lt;br /&gt;
 disk = [ 'file:/mnt/xen/sl12.img,xvda1,w', 'file:/mnt/xen/sl12.swap,xvdb,w' ]&lt;br /&gt;
 # Define frame buffer device. Use sdl to view virtual machine in a window&lt;br /&gt;
 vfb = [ 'sdl=1' ]&lt;br /&gt;
 # Set root device.&lt;br /&gt;
 root = &amp;quot;/dev/xvda1 ro&amp;quot;&lt;br /&gt;
 # Window resolution additional parameters&lt;br /&gt;
 extra = &amp;quot;xen-fbfront.video=16,1680,1024&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The VM can then be launched with '''xl create ''file''''' :&lt;br /&gt;
&lt;br /&gt;
 root@inner:/etc/xen# xl create sl12&lt;br /&gt;
 Parsing config from sl12&lt;br /&gt;
 root@inner:/etc/xen#&lt;br /&gt;
&lt;br /&gt;
== Creating a HVM ==&lt;br /&gt;
&lt;br /&gt;
* in full hardware virtualization (HVM) guests require CPU virtualization extensions from the host CPU (Intel VT-x, AMD-V). Xen uses a modified version of Qemu to emulate full PC hardware, including BIOS, IDE disk controller, VGA graphic adapter, USB controller, network adapter etc for HVM guests. CPU virtualization extensions are used to boost performance of the emulation. Fully virtualized guests do not require kernel support, so for example Windows operating systems can be used as Xen HVM guest. Fully virtualized guests are usually slower than paravirtualized guests, because of the required emulation.&lt;br /&gt;
&lt;br /&gt;
Full hardware virtualization requires only a disk image to execute in. Then a HV config file needs to be created. Samples are available from the /etc/xen directory. Here is an [{{SERVER}}/wikislax/download/win7 example] running in a X window for Windows 7. The main config options to modify are :&lt;br /&gt;
&lt;br /&gt;
 # Initial memory allocation (in megabytes) for the new domain.&lt;br /&gt;
 memory = 2048&lt;br /&gt;
 # A name for the new domain. All domains have to have different names,&lt;br /&gt;
 name = &amp;quot;win7&amp;quot;&lt;br /&gt;
 # Number of virtual CPUs&lt;br /&gt;
 vcpus = 4&lt;br /&gt;
 # Define network interfaces&lt;br /&gt;
 vif = [ 'type=ioemu, bridge=br0' ]&lt;br /&gt;
 # Define disk devices. Note the device names xvda and xvdb&lt;br /&gt;
 disk = [ 'file:/mnt/xen/win7.img,hda,w', 'file:/mnt/xen/win7.iso,hdc:cdrom,r' ]&lt;br /&gt;
 # enable SDL library for graphics, default = 0&lt;br /&gt;
 sdl=1&lt;br /&gt;
 # enable VNC library for graphics, default = 1&lt;br /&gt;
 vnc=0&lt;br /&gt;
 # set VNC display number, default = domid&lt;br /&gt;
 vncdisplay=7&lt;br /&gt;
&lt;br /&gt;
The VM can then be launched with '''xl create ''file''''' :&lt;br /&gt;
&lt;br /&gt;
 root@inner:/etc/xen# xl create win7&lt;br /&gt;
 Parsing config from win7&lt;br /&gt;
 root@inner:/etc/xen#&lt;br /&gt;
&lt;br /&gt;
== A little screen shot ==&lt;br /&gt;
&lt;br /&gt;
The 3 VMs displayed on this slackware 13.37 dom0 are slackware 12.1, windows 7 and windows 8. &lt;br /&gt;
&lt;br /&gt;
[[file:Screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Using Grub2]]|[[Main Page]]|[[OpenSSL]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Creating_VMs&amp;diff=185</id>
		<title>Creating VMs</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Creating_VMs&amp;diff=185"/>
				<updated>2026-04-01T13:52:33Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Creating a PV VM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== the xl tool ==&lt;br /&gt;
&lt;br /&gt;
There is a variety of tools and commands to handle virtual machines. Here we will use the Xen '''xl''' command.&lt;br /&gt;
&lt;br /&gt;
* '''xl create ''file''''' affords creating a virtual machine based on the configuration in file ''file''. A one-starting sequential domain id is created.&lt;br /&gt;
&lt;br /&gt;
* '''xl destroy ''domid''''' affords destroying a virtual machine with domain id ''domid''. Of course using the system in the VM will be a preferred method to terminate.&lt;br /&gt;
&lt;br /&gt;
* '''xl help''' affords getting more information on other xm commands.&lt;br /&gt;
&lt;br /&gt;
Xen supports paravirtualisation and hardware virtualization. Both can be used at the same time on a single Xen system.&lt;br /&gt;
&lt;br /&gt;
== Creating a PV VM ==&lt;br /&gt;
&lt;br /&gt;
* in paravirtualization (PV) guest operating systems are modified so they are able to interlock with Xen without emulation or virtual emulated hardware. Xen PV guest kernels exist for Linux, NetBSD, FreeBSD, OpenSolaris and Novell Netware. Upstream kernel.org Linux kernels since Linux 2.6.24 include Xen PV guest (domU) support based on the Linux pvops framework, so every upstream Linux kernel can be automatically used as Xen PV guest kernel without any additional patches or modifications.&lt;br /&gt;
&lt;br /&gt;
Paravirtualization requires storing the kernel to boot in the dom0 filesystem, and populating the system in a virtual partition. The kernel generated must be able to manage [http://wiki.qemu.org/download/qemu-doc.html#QEMU-PC-System-emulator the QEMU devices] and include the .config file [http://wiki.xen.org/wiki/Mainline_Linux_Kernel_Configs#Configuring_the_kernel domU options]. Here is a minimal example of such a [{{SERVER}}/wikislax/download/config-domU .config domU] file. The swap partition and VM filesystem can be created as below. Don't forget to update the root device in fstab :&lt;br /&gt;
&lt;br /&gt;
 # dd if=/dev/zero of=sl12.swp bs=1024k count=1024 status=progress&lt;br /&gt;
 # mkswap sl12.swp&lt;br /&gt;
 # dd if=/dev/zero of=sl12.img bs=1024k count=16384 status=progress&lt;br /&gt;
 # mkfs -t ext3 sl12.img&lt;br /&gt;
 # mkdir loop&lt;br /&gt;
 # mount -o loop sl12.img loop&lt;br /&gt;
 # cp -ax /mnt/sl12/{0,bin,boot,etc,home,initrd*,lib,lib64,media,mnt,opt,root,run,sbin,srv,sys,usr,var,vmlinuz*} loop&lt;br /&gt;
 # mkdir loop/{dev,proc,tmp}&lt;br /&gt;
 # chmod 777 loop/tmp&lt;br /&gt;
 # vi loop/etc/fstab&lt;br /&gt;
 # umount loop&lt;br /&gt;
 # dd if=/dev/zero bs=1G count=8 &amp;gt;&amp;gt; sl12.img&lt;br /&gt;
 # e2fsck -f sl12.img&lt;br /&gt;
 # resize2fs sl12.img&lt;br /&gt;
&lt;br /&gt;
Then a PV config file needs to be created. Samples are available from the /etc/xen directory. Here is an [{{SERVER}}/wikislax/download/sl12 example] running in a X window for slackware 12.1 (32 bits). The main config options to modify are :&lt;br /&gt;
&lt;br /&gt;
 # Kernel image file in dom0 filesystem&lt;br /&gt;
 kernel = &amp;quot;/boot/vmlinuz-3.4.2-domU&amp;quot;&lt;br /&gt;
 # Not using any optional ramdisk&lt;br /&gt;
 #ramdisk = &amp;quot;/boot/initrd.gz&amp;quot;&lt;br /&gt;
 # Initial memory allocation (in megabytes) for the new domain.&lt;br /&gt;
 memory = 2048&lt;br /&gt;
 # A name for the new domain. All domains have to have different names,&lt;br /&gt;
 name = &amp;quot;sl12&amp;quot;&lt;br /&gt;
 # Number of virtual CPUs&lt;br /&gt;
 vcpus = 2&lt;br /&gt;
 # Define network interfaces&lt;br /&gt;
 vif = [ ' ' ]&lt;br /&gt;
 # Define disk devices. Note the device names xvda and xvdb&lt;br /&gt;
 disk = [ 'file:/mnt/xen/sl12.img,xvda1,w', 'file:/mnt/xen/sl12.swap,xvdb,w' ]&lt;br /&gt;
 # Define frame buffer device. Use sdl to view virtual machine in a window&lt;br /&gt;
 vfb = [ 'sdl=1' ]&lt;br /&gt;
 # Set root device.&lt;br /&gt;
 root = &amp;quot;/dev/xvda1 ro&amp;quot;&lt;br /&gt;
 # Window resolution additional parameters&lt;br /&gt;
 extra = &amp;quot;xen-fbfront.video=16,1680,1024&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The VM can then be launched with '''xl create ''file''''' :&lt;br /&gt;
&lt;br /&gt;
 root@inner:/etc/xen# xl create sl12&lt;br /&gt;
 Parsing config from sl12&lt;br /&gt;
 root@inner:/etc/xen#&lt;br /&gt;
&lt;br /&gt;
== Creating a HVM ==&lt;br /&gt;
&lt;br /&gt;
* in full hardware virtualization (HVM) guests require CPU virtualization extensions from the host CPU (Intel VT-x, AMD-V). Xen uses a modified version of Qemu to emulate full PC hardware, including BIOS, IDE disk controller, VGA graphic adapter, USB controller, network adapter etc for HVM guests. CPU virtualization extensions are used to boost performance of the emulation. Fully virtualized guests do not require kernel support, so for example Windows operating systems can be used as Xen HVM guest. Fully virtualized guests are usually slower than paravirtualized guests, because of the required emulation.&lt;br /&gt;
&lt;br /&gt;
Full hardware virtualization requires only a disk image to execute in. Then a HV config file needs to be created. Samples are available from the /etc/xen directory. Here is an [{{SERVER}}/wikislax/download/win7 example] running in a X window for Windows 7. The main config options to modify are :&lt;br /&gt;
&lt;br /&gt;
 # Initial memory allocation (in megabytes) for the new domain.&lt;br /&gt;
 memory = 2048&lt;br /&gt;
 # A name for the new domain. All domains have to have different names,&lt;br /&gt;
 name = &amp;quot;win7&amp;quot;&lt;br /&gt;
 # Number of virtual CPUs&lt;br /&gt;
 vcpus = 4&lt;br /&gt;
 # Define network interfaces&lt;br /&gt;
 vif = [ 'type=ioemu, bridge=br0' ]&lt;br /&gt;
 # Define disk devices. Note the device names xvda and xvdb&lt;br /&gt;
 disk = [ 'file:/mnt/xen/win7.img,hda,w', 'file:/mnt/xen/win7.iso,hdc:cdrom,r' ]&lt;br /&gt;
 # enable SDL library for graphics, default = 0&lt;br /&gt;
 sdl=1&lt;br /&gt;
 # enable VNC library for graphics, default = 1&lt;br /&gt;
 vnc=0&lt;br /&gt;
 # set VNC display number, default = domid&lt;br /&gt;
 vncdisplay=7&lt;br /&gt;
&lt;br /&gt;
The VM can then be launched with '''xl create ''file''''' :&lt;br /&gt;
&lt;br /&gt;
 root@inner:/etc/xen# xl create win7&lt;br /&gt;
 Parsing config from win7&lt;br /&gt;
 root@inner:/etc/xen#&lt;br /&gt;
&lt;br /&gt;
== A little screen shot ==&lt;br /&gt;
&lt;br /&gt;
The 3 VMs displayed on this slackware 13.37 dom0 are slackware 12.1, windows 7 and windows 8. &lt;br /&gt;
&lt;br /&gt;
[[file:Screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Using Grub2]]|[[Main Page]]|[[OpenSSL]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=IPTables&amp;diff=184</id>
		<title>IPTables</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=IPTables&amp;diff=184"/>
				<updated>2026-04-01T07:25:09Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Iptables Filtering */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
Packet filtering affords opening access only to these services you have decided to open. The TCP or UDP packets include a piece of information called the port number, that is used to identify the type of service. Secure ports were defined as SSL counterparts of the native ports but were superseded by [https://en.wikipedia.org/wiki/Transport_Layer_Security TLS] and are now deprecated due to security weaknesses in the SSL protocol. SSL should not be used any longer. Instead, use TLS. Current version is v1.2.&lt;br /&gt;
&lt;br /&gt;
{| {{thead}}&lt;br /&gt;
|-&lt;br /&gt;
! {{chead}} width=&amp;quot;100&amp;quot; | Protocol&lt;br /&gt;
! {{chead}} | Port #&lt;br /&gt;
! {{chead}} | Secure Protocol&lt;br /&gt;
! {{chead}} | Secure Port #&lt;br /&gt;
! {{chead}} | Service&lt;br /&gt;
|-&lt;br /&gt;
|SMTP||25||SMTPS||465||Mail exchange&lt;br /&gt;
|-&lt;br /&gt;
|HTTP||80||HTTPS||443||Web browsing&lt;br /&gt;
|-&lt;br /&gt;
|POP3||110||POP3S||995||Mail retrieval&lt;br /&gt;
|-&lt;br /&gt;
|NTTP||119||NTTPS||563||News exchange&lt;br /&gt;
|-&lt;br /&gt;
|IMAP||143||IMAPS||993||Mail retrieval&lt;br /&gt;
|-&lt;br /&gt;
|LDAP||389||LDAPS||636||Ldap Directory&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On server side, the services are provided by applications that may have vulnerabilities and be attacked. Examples of attacks are buffer overflow or format string attacks, that afford getting full access on the target machine by crafting special strings sent to it. An attacker could then obtain any information present there or modify or destroy the system.&lt;br /&gt;
&lt;br /&gt;
To reduce the number of possible attacks, the number of services authorized, or who can access the system, must be restricted. This is known as packet filtering. It is only an aspect of security (obviously, the applications on the server side must also be secured ...), but it is important. &amp;lt;u&amp;gt;Never *** ever *** connect to the network a computer not protected by a packet filter !&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To illustrate, let's configure our two-interfaces computer to be its own firewall. '''eth0''' is the Internet interface, it uses network 192.168.0.x, the gateway is an ADSL router/switch at 192.168.0.254. '''eth1''' is the (Intranet) interface to the internal network 192.168.1.x.&lt;br /&gt;
&lt;br /&gt;
== Iptables Filtering ==&lt;br /&gt;
&lt;br /&gt;
Since Linux 2.4, packet filtering is effected inside the kernel, and configuration effected by the '''iptables''' user-space program. In addition to rules for incoming and outgoing packets, iptables affords defining rules for routing between the interfaces. The '''iptables''' command affords entering the rules '''one by one'''. Using a script affords entering all the rules. '''iptable -L -v''' affords viewing the current rules.&lt;br /&gt;
&lt;br /&gt;
For more information, see the [http://www.netfilter.org/ netfilter] official site. This site has links to various documents, including a simple introduction to packet filtering in this [http://www.netfilter.org/documentation/HOWTO/packet-filtering-HOWTO.html HOWTO].&lt;br /&gt;
&lt;br /&gt;
In Slackware, the script used is &amp;lt;tt&amp;gt;'''/etc/rc.d/rc.firewall'''&amp;lt;/tt&amp;gt;. It is called  automatically when the system starts or stops, using commands &amp;lt;tt&amp;gt;'''./rc.firewall start'''&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;'''./rc.firewall stop'''&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 #! /bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # startup script for local packet filter&lt;br /&gt;
 #&lt;br /&gt;
 fw_start () {&lt;br /&gt;
 echo &amp;quot;Loading packet filter rules&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The flush command affords deleting all the active nat and filtering rules:&lt;br /&gt;
&lt;br /&gt;
 # flush old rules&lt;br /&gt;
 iptables -t nat --flush&lt;br /&gt;
 iptables -flush&lt;br /&gt;
&lt;br /&gt;
The -P option affords defining the default policy. A good practise is to forbid by default everything not authorized. This is done here for packets incoming, outgoing, and routed between the interfaces:&lt;br /&gt;
&lt;br /&gt;
 # drop by default&lt;br /&gt;
 iptables -P INPUT DROP&lt;br /&gt;
 iptables -P FORWARD DROP&lt;br /&gt;
 iptables -P OUTPUT DROP&lt;br /&gt;
&lt;br /&gt;
Connections already established are authorized to continue:&lt;br /&gt;
&lt;br /&gt;
 # accept packets that are part of previously OK'ed sessions&lt;br /&gt;
 iptables -A INPUT -j ACCEPT -m conntrack --ctstate ESTABLISHED,RELATED&lt;br /&gt;
 iptables -A OUTPUT -j ACCEPT -m conntrack --ctstate ESTABLISHED,RELATED&lt;br /&gt;
 iptables -A FORWARD -j ACCEPT -m conntrack --ctstate ESTABLISHED,RELATED &lt;br /&gt;
&lt;br /&gt;
The -A option affords adding a rule. Here all the packets on the loopback interface are accepted:&lt;br /&gt;
&lt;br /&gt;
 # INBOUND POLICY&lt;br /&gt;
 &lt;br /&gt;
 # pass all traffic for network 127.0.0.0/8 on loopback interface&lt;br /&gt;
 iptables -A INPUT -i lo -s 127.0.0.0/8 -d 127.0.0.0/8 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
Addresses of RFC 1918 private networks are not routable on the Internet. So packets with such addresses are not expected on the internal network. However as anti-spoofing is ensured by Internet box we do not need to introduce anti-spoofing rules here:&lt;br /&gt;
 &lt;br /&gt;
 # anti-spoofing done by Internet box so not needed here&lt;br /&gt;
 # iptables -A INPUT -s 10.0.0.0/8 -j LOG --log-prefix &amp;quot;INPUT spoofed IP &amp;quot;&lt;br /&gt;
 # iptables -A INPUT -s 10.0.0.0/8 -j DROP&lt;br /&gt;
 # . . .&lt;br /&gt;
&lt;br /&gt;
The protocols corresponding to services offered or used externally are accepted:&lt;br /&gt;
&lt;br /&gt;
 # services SMTP HTTP HTTPS&lt;br /&gt;
 # iptables -A INPUT -p tcp -j ACCEPT --dport 25 -m conntrack --ctstate NEW&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 80 -m conntrack --ctstate NEW&lt;br /&gt;
 # iptables -A INPUT -p tcp -j ACCEPT --dport 143 -m conntrack --ctstate NEW&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 443 -m conntrack --ctstate NEW&lt;br /&gt;
&lt;br /&gt;
The protocols corresponding to services offered on the local network are accepted:&lt;br /&gt;
&lt;br /&gt;
  # services on local network FTP DNS BOOTP NNTP SUBMIT VNC&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 20 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 21 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 53 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 53 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 69 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 119 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 587 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  # iptables -A INPUT -p tcp -j ACCEPT --dport 5900:5912 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
&lt;br /&gt;
We accept X-Window traffic on the local network:&lt;br /&gt;
&lt;br /&gt;
  # SSH-tunnelled X-Window output appears as input on interface lo&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 177 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 6000:6063 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -i lo -p tcp -j ACCEPT --dport 6000:6063 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
&lt;br /&gt;
We accept NFS on the local network and fix the NFS ports:&lt;br /&gt;
&lt;br /&gt;
  # NFS ports&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 111 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 111 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 2049 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 2049 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 32764:32769 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 32764:32769 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
&lt;br /&gt;
We accept samba traffic on the local network:&lt;br /&gt;
&lt;br /&gt;
  # samba ports&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 135 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 135 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 137 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 137 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 138 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 139 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 445 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 445 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
&lt;br /&gt;
Broadcast traffic is also OK:&lt;br /&gt;
&lt;br /&gt;
  # broadcast traffic&lt;br /&gt;
  iptables -A INPUT -p udp -s 0.0.0.0 -sport 67:68 -d 255.255.255.255 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
We accept pings on the local network:&lt;br /&gt;
&lt;br /&gt;
  # accept some icmp packets&lt;br /&gt;
  iptables -A INPUT -p icmp --icmp-type echo-request -s 192.168.53.0/24 -j ACCEPT&lt;br /&gt;
  iptables -A INPUT -p icmp --icmp-type destination-unreachable -j ACCEPT&lt;br /&gt;
  iptables -A INPUT -p icmp --icmp-type time-exceeded -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
We could log anything not accepted above:&lt;br /&gt;
&lt;br /&gt;
 # log anything not accepted above&lt;br /&gt;
 # iptables -A INPUT -j LOG --log-prefix &amp;quot;INPUT bad traffic &amp;quot;&lt;br /&gt;
&lt;br /&gt;
We accept all outbound packets, which would for example afford using a network scanner. In a production environment, there would be a stricter policy:&lt;br /&gt;
&lt;br /&gt;
 # OUTBOUND POLICY&lt;br /&gt;
 &lt;br /&gt;
 # accept all outbound packets&lt;br /&gt;
 iptables -A OUTPUT -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
For routing between the interfaces, everything is accepted. In a production environment, there might be a stricter policy:&lt;br /&gt;
&lt;br /&gt;
 # FORWARD POLICY&lt;br /&gt;
 &lt;br /&gt;
 # forward all outbound packets&lt;br /&gt;
 iptables -A FORWARD -j ACCEPT&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
After the fw_start() function ends, the fw_stop() function is defined to authorize everything:&lt;br /&gt;
&lt;br /&gt;
 fw_stop () {&lt;br /&gt;
   echo &amp;quot;Unloading all packet filter rules&amp;quot;&lt;br /&gt;
   iptables -t nat --flush&lt;br /&gt;
   iptables -flush&lt;br /&gt;
 &lt;br /&gt;
 # accept by default&lt;br /&gt;
   iptables -P INPUT ACCEPT&lt;br /&gt;
   iptables -P FORWARD ACCEPT&lt;br /&gt;
   iptables -P OUTPUT ACCEPT&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
 case &amp;quot;$1&amp;quot; in&lt;br /&gt;
 ‘start’)&lt;br /&gt;
   fw_start&lt;br /&gt;
   ;;&lt;br /&gt;
 ’stop’)&lt;br /&gt;
   fw_stop&lt;br /&gt;
   ;;&lt;br /&gt;
 ’restart’)&lt;br /&gt;
   fw_start&lt;br /&gt;
   ;;&lt;br /&gt;
 *)&lt;br /&gt;
   echo &amp;quot;usage $0 start | stop | restart&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Testing the firewall ==&lt;br /&gt;
&lt;br /&gt;
Use '''nmap -sU hostname''' (UDP) and '''nmap -sT hostname''' (TCP) to make sure what ports are visible locally and do the same from the outside.&lt;br /&gt;
&lt;br /&gt;
== Download example ==&lt;br /&gt;
&lt;br /&gt;
[{{SERVER}}/wikislax/download/rc.firewall Download file rc.firewall]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Configuration files]]|[[Main Page]]|[[X11 configuration]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=183</id>
		<title>Compiling Xen</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=183"/>
				<updated>2026-03-30T09:35:23Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Installing acpica */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is Xen ? ==&lt;br /&gt;
&lt;br /&gt;
[http://wiki.xen.org/wiki/Xen_Overview Xen] is an hypervisor, a thin software layer executing multiple virtual machines, each running its own operating system. Xen is normally used as a server virtualization platform, running on headless servers without graphical console and controlled through the network. However it is also possible to run Xen on graphical desktops, and with proper hardware virtualization, to dedicate the primary graphics card (and keyboard / mouse) to a virtual machine, making it possible to have high performance full 3D and video acceleration in a virtual machine (see [http://wiki.xen.org/wiki/Xen_VGA_Passthrough Xen VGA Passthru]). Xen is otherwise free and open source.&lt;br /&gt;
&lt;br /&gt;
== A few quirks ==&lt;br /&gt;
&lt;br /&gt;
The '''dev86-0.16.21-x86_64-1.txz''' package included with Slackware 14.2 does not afford compiling '''xen-4.9.0''' properly, and must be replaced by '''[{{SERVER}}/wikislax/download/dev86-0.16.17-x86_64-2.txz dev86-0.16.17-x86_64-2.txz]''', that can be found on the Slackware 13.37, 14.0, or 14.1 distribution disks, in directory '''slackware64/d'''. Trying to compile dev86 [http://v3.sk/~lkundrak/dev86/ from source] is not an alternative : dev86 source versions 0.16.18 to 0.16.21 have the same issue compiling xen-4.9.0, and older 0.16.17 does not compile on Slackware 14.2. No such issue compiling xen-4.18.4 on slackware 15.0.&lt;br /&gt;
&lt;br /&gt;
 # removepkg /var/log/packages/dev86-0.16.21-x86_64-1.txz&lt;br /&gt;
 # installpkg dev86-0.16.17-x86_64-2.txz&lt;br /&gt;
&lt;br /&gt;
Also, the '''grub-2.00''' included with Slackware 14.2 does not afford booting xen. However, getting the latest version '''grub-2.02''' from source does work. Slackware 15.0 includes grub-2.06 which is no problem.&lt;br /&gt;
&lt;br /&gt;
== Hardware requirements ==&lt;br /&gt;
&lt;br /&gt;
Xen runs on Intel X86 hardware and requires a processor and motherboard supporting VT-x and optionally VT-d for hardware virtualization. See this [http://www.intel.com/support/motherboards/desktop/sb/cs-030922.htm page] for a list of Intel compatible motherboards and chipsets and this [http://ark.intel.com/ page] for a list of compatible processors. Our system running Xen successfully at the time of this writing (and since June 2012) is based on a DZ77GA70K Intel motherboard, an Intel® Core™ i7-3770 Processor (the overclockable i7-3770 &amp;quot;K&amp;quot; model does not afford virtualization), 32 Gb of PC12800 memory and an MSI GeForce G210 graphics board.&lt;br /&gt;
&lt;br /&gt;
== Documentation difficulties ==&lt;br /&gt;
&lt;br /&gt;
Although the software itself works well and is pretty straighforward, good quality Internet information is missing. The volume of information on the Xen wiki is plethoric, but mostly irrelevant as pertaining to old versions of everything. Building the big picture requires interpretation of tiny bits in forum messages, a pretty painful process, although I have to recognize that it worked for me in the end. An alternative is to use one of these old-style information repositories named &amp;quot;books&amp;quot;. Yes it is pretty old-fashionned ;) but actually there are good ones on the topic. Here is [http://www.amazon.co.uk/The-Book-Xen-Practical-Administrator/dp/1593271867/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1341037874&amp;amp;sr=1-1 the most recent I found], it is a good value but of course you can find more on [http://www.amazon.co.uk/s/ref=nb_sb_noss_2?url=search-alias%3Dstripbooks&amp;amp;field-keywords=xen&amp;amp;x=0&amp;amp;y=0 amazon(.co.uk)].&lt;br /&gt;
&lt;br /&gt;
== Software constraints ==&lt;br /&gt;
&lt;br /&gt;
To make a long story short, at the time of this writing (and since June 2012) working with nVidia graphic boards on Xen and X11 requires the &amp;quot;nouveau&amp;quot; driver. Other drivers like nv or the nVidia proprietary driver do not support Xen and switch off the screen when launched or do not display properly. &amp;quot;Nouveau&amp;quot; requires a fairly recent version of X11. Slackware 13.37 or newer is required. &amp;quot;Nouveau&amp;quot; is available in kernel 3.4.2 upstream and was previously included as a staging driver. Xen dom0 support was included in kernel 3.0. To benefit from both Xen and &amp;quot;Nouveau&amp;quot;, the best is to use kernel 3.4.2 upstream.&lt;br /&gt;
&lt;br /&gt;
== Installing acpica ==&lt;br /&gt;
&lt;br /&gt;
Xen requires acpica. [https://www.acpica.org/downloads Download] then install as below :&lt;br /&gt;
&lt;br /&gt;
Note : the choice of license pertains to software redistribution. 1 - Intel, 2 - GPLV2 or BSD.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf acpica-unix-yyyymmdd.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root acpica-unix-yyyymmdd&lt;br /&gt;
 # cd acpica-unix-yyyymmdd&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
&lt;br /&gt;
== Installing yajl ==&lt;br /&gt;
&lt;br /&gt;
Xen 4.19.1 requires yajl. [http://lloyd.github.io/yajl/ Download] then install as below. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : there is no option to specify the target library directory so the files need to be moved manually.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf lloyd-yajl-17b1790.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root lloyd-yajl-17b1790&lt;br /&gt;
 # cd lloyd-yajl-17b1790&lt;br /&gt;
 # ./configure&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
 # cd ../lib&lt;br /&gt;
 # mv libyajl* ../lib64&lt;br /&gt;
 # ldconfig&lt;br /&gt;
&lt;br /&gt;
== Compiling Xen ==&lt;br /&gt;
&lt;br /&gt;
[http://xen.org/products/xen_source.html Download Xen] from the official [http://www.xen.org xen.org] site. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : File stubs-32.h is missing in the compiler includes so we add a link to the existing stubs-64.h. Also, some Xen Python scripts are installed in /usr/local/lib64/python-2.7/site-packages which python cannot find so we add links from the standard library as well.&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/include/gnu&lt;br /&gt;
 # ln -s stubs-64.h stubs-32.h&lt;br /&gt;
 # cd&lt;br /&gt;
 # tar -C /usr/local -xvf xen-x.y.z.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root xen-x.y.z&lt;br /&gt;
 # cd xen-x.y.z&lt;br /&gt;
 # ./configure --libdir=/usr/local/lib64 --with-initddir=/etc/rc.d&lt;br /&gt;
 # make world&lt;br /&gt;
 # make install&lt;br /&gt;
 # make clean&lt;br /&gt;
 # cd ../lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen /usr/lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen-3.0-py2.7.egg-info /usr/lib64/python2.7/site-packages&lt;br /&gt;
&lt;br /&gt;
== Adjusting rc.local* ==&lt;br /&gt;
&lt;br /&gt;
Xen needs a couple of daemons to run to ensure VM management. Add these lines to rc.local and rc.local_shutdown :&lt;br /&gt;
&lt;br /&gt;
 PATH=/usr/local/sbin:/usr/local/bin:$PATH&lt;br /&gt;
 export PATH&lt;br /&gt;
 &lt;br /&gt;
 # start xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons start&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # stop xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons stop&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
== Compiling a dom0 Kernel ==&lt;br /&gt;
&lt;br /&gt;
Domain-0 (dom0 for short) is a special guest (virtual machine) that the Xen hypervisor always loads on host startup. Dom0 is used to control and manage the Xen hypervisor, and provides virtual disks and networks for other unprivileged guests (=domUs). Dom0 support was introduced in Linux kernel 3.0. The kernel generated must include the .config file domU and [http://wiki.xen.org/wiki/Mainline_Linux_Kernel_Configs#Configuring_the_kernel dom0 options]. Here is a minimal example of such a [{{SERVER}}/wikislax/download/config-dom0 .config dom0] file. Feel free to use it as a base, replacing device drivers as required. The rest of the kernel compilation is nominal :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/src -xvf linux-4.4.88.tar.bz2&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # rm linux&lt;br /&gt;
 # ln -s linux-4.4.88 linux&lt;br /&gt;
 # cd linux&lt;br /&gt;
 # make menuconfig&lt;br /&gt;
 # make&lt;br /&gt;
 # make modules_install&lt;br /&gt;
 # cp arch/x86_64/boot/bzImage /boot/vmlinuz-4.4.88-dom0&lt;br /&gt;
 # cp System.map /boot/System.map-4.4.88-dom0&lt;br /&gt;
 # cp .config /boot/config-4.4.88-dom0&lt;br /&gt;
&lt;br /&gt;
We're now all set up, Xen is ready to be booted by grub2 !&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ pFoot |[[Compiling from Source]]|[[Main Page]]|[[Using Grub2]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=182</id>
		<title>Linux basics</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=182"/>
				<updated>2026-03-29T19:38:40Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Useful linux commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using VI ==&lt;br /&gt;
&lt;br /&gt;
'''vi''' (pronounced vee-eye) is the Unix standard text editor so affords editing the configuration files by hand. If you don’t know it yet, it can be a bit surprising. Actually, '''vi''' was created at a time when the keyboards did not have any arrow or insert keys. So there are two modes: the «open» mode and the «insert» mode.&lt;br /&gt;
&lt;br /&gt;
The open mode affords moving the cursor. '''j''', '''k''', '''l''', '''m''' move the cursor by one character. '''ctrl-f''' moves one page forward and '''ctrl-b''' moves one page backwards. '''w''' moves one word forward and  '''b''' moves one word backwards. It is also possible to use the arrow keys.&lt;br /&gt;
&lt;br /&gt;
'''i''' goes into insert mode before the cursor, '''a''' goes into insert mode after the cursor, and '''A''' goes into insert mode at the end of the line. '''o''' adds a line after the current line, and '''O''' adds a live before the current line. '''R''' goes into rewrite mode.&lt;br /&gt;
&lt;br /&gt;
'''esc''' affords getting out of the insert mode.&lt;br /&gt;
&lt;br /&gt;
'''c$''' affords replacing the end of the line and '''d$''' affords deleting the end of the line. '''cw''' affords replacing one word and '''dw''' affords deleting one word. '''dd''' affords deleting the current line.&lt;br /&gt;
&lt;br /&gt;
''':q''' affords quitting without saving. If the file has been modified, quitting must be forced by typing ''':q!'''. ''':x''' affords saving and quitting. If the file does not have the write rigths, saving must be forced by typing ''':x!'''. ''':w''' affords writing the text in a new file. If the new file already exists, writing must be forced by typing ''':w!'''.&lt;br /&gt;
&lt;br /&gt;
''':num''' affords moving to the line number num. ''':$''' affords moving to the end of the file.&lt;br /&gt;
''':num1copynum2''' affords copying the line number num1 after the line number num2. ''':num1mnum2''' affords moving the line number num1 after the line number num2.&lt;br /&gt;
&lt;br /&gt;
For detailed information, check the [http://vimdoc.sourceforge.net/htmldoc/help.html VIM Documentation]. To enter special characters check the page on [http://vimdoc.sourceforge.net/htmldoc/digraph.html digraphs]. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
&lt;br /&gt;
To get syntax highligting instead of '''vi''' use the '''vim'''(vi improved) replacement :&lt;br /&gt;
&lt;br /&gt;
 # '''cd /usr/bin'''&lt;br /&gt;
 # '''rm vi'''&lt;br /&gt;
 # '''ln -s vim vi'''&lt;br /&gt;
&lt;br /&gt;
== Using SSH ==&lt;br /&gt;
&lt;br /&gt;
SSH is a suite of tools affording connecting remotely over encrypted communications. On the client side, '''ssh''' offers a command line terminal, '''scp''' affords copying a file, and '''sftp''' behaves like ftp. The server side consists of sshd, sftp-server, and ssh-agent. ssh-add, ssh-keysign, ssh-keyscan, and ssh-keygen afford key management. The SSH present on Slackware and the BSDs is [https://www.openssh.com/ OpenSSH], developped by members of the [https://www.openbsd.org/ OpenBSD] project.&lt;br /&gt;
&lt;br /&gt;
'''ssh''' obviously requires your password every time it is executed. This can be avoided by creating on the client a pair of rsa keys and copying the public key to the server. Not specifying a passphrase is not very secure but will afford avoiding having to enter it every time :&lt;br /&gt;
&lt;br /&gt;
 # '''ssh-keygen -t rsa'''&lt;br /&gt;
 Generating public/private rsa key pair.&lt;br /&gt;
 Enter file in which to save the key (/root/.ssh/id_rsa): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter passphrase (empty for no passphrase): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter same passphrase again: '''cr&amp;gt;'''&lt;br /&gt;
 Your identification has been saved in /root/.ssh/id_rsa.&lt;br /&gt;
 Your public key has been saved in /root/.ssh/id_rsa.pub.&lt;br /&gt;
 The key fingerprint is:&lt;br /&gt;
 SHA256:ATSDdER5/l8OJvr+jpINIReJtd81zntVbTjuJW5aobE root@client&lt;br /&gt;
 The key's randomart image is:&lt;br /&gt;
 +---[RSA 2048]----+&lt;br /&gt;
 |   ..=O+..       |&lt;br /&gt;
 |    ..o++.     ..|&lt;br /&gt;
 |       oo.    = +|&lt;br /&gt;
 |      . +o . = +.|&lt;br /&gt;
 |       oSo. o * o|&lt;br /&gt;
 |        . o o*.=.|&lt;br /&gt;
 |         = +E+* .|&lt;br /&gt;
 |        + ...+.. |&lt;br /&gt;
 |         ++o+    |&lt;br /&gt;
 +----[SHA256]-----+&lt;br /&gt;
 # '''scp root@client:.ssh/id_rsa.pub root@server:.ssh/id_rsa.pub'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 id_rsa.pub                                          100% 394      1.8MB/s   00:00&lt;br /&gt;
 # '''ssh server'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 # '''cd .ssh'''&lt;br /&gt;
 # '''cat &amp;gt;&amp;gt; authorized_keys &amp;lt; id_rsa.pub'''&lt;br /&gt;
 # '''chmod 600 authorized_keys'''&lt;br /&gt;
 # '''rm id_rsa.pub'''&lt;br /&gt;
&lt;br /&gt;
== Useful linux commands ==&lt;br /&gt;
&lt;br /&gt;
{| {{thead}}&lt;br /&gt;
|-&lt;br /&gt;
! {{chead}} width=&amp;quot;220&amp;quot; | Command&lt;br /&gt;
! {{chead}} | Effect&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''cd'''&amp;lt;/tt&amp;gt;||change directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chmod -R ppp ddd'''&amp;lt;/tt&amp;gt;||recursively change permissions on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chown -R uuu:ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change user:group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chgrp -R ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''command xxx &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; grep yyy'''&amp;lt;/tt&amp;gt;||search for string yyy in output of command xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ethtool -s eth0 wol g'''&amp;lt;/tt&amp;gt;||puts interface eth0 in wake-on-lan status.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''find xxx -name yyy -print'''&amp;lt;/tt&amp;gt;||find file yyy in in subdirectories of xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''groupadd &amp;lt;&amp;lt;i&amp;gt;group&amp;lt;/i&amp;gt;&amp;gt;'''&amp;lt;/tt&amp;gt;||add group &amp;lt;&amp;lt;i&amp;gt;group&amp;lt;/i&amp;gt;&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ifconfig -a'''&amp;lt;/tt&amp;gt;||print the network interfaces configuration.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''iptables -L'''&amp;lt;/tt&amp;gt;||print the firewall rules.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''killall xxx'''&amp;lt;/tt&amp;gt;||kill program named xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ldconfig'''&amp;lt;/tt&amp;gt;||reload libraries taking into account new libraries just built.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ln -s existing new'''&amp;lt;/tt&amp;gt;||create a symbolic link new to an existing directory or file.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ls -al'''&amp;lt;/tt&amp;gt;||list the working directory, including files beginning with a dot.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''man xxx'''&amp;lt;/tt&amp;gt;||display the xxx command manual page.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''mkisofs -o xxx.iso -J -r xxx'''&amp;lt;/tt&amp;gt;||Put directory or file xxx into an iso image.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''more xxx'''&amp;lt;/tt&amp;gt;||display file xxx with the possibility of moving up and down. '''less''' and '''most''' are similar commands.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''mount -t ttt /dev/xxx /mnt/ddd'''&amp;lt;/tt&amp;gt;||mount device xxx as type ttt under directory ddd.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''(u)mount /mnt/ddd'''&amp;lt;/tt&amp;gt;||(u)mount device ddd as specified in /etc/fstab.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''nmap &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||check filtering status of ports on &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;. '''-sU''' for UDP.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ntpdate -bv 0.fr.pool.ntp.org'''&amp;lt;/tt&amp;gt;|| force ntp synchronization.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ps -ef'''&amp;lt;/tt&amp;gt;||list the running processes.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''pwd'''&amp;lt;/tt&amp;gt;||print working directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''rm -r'''&amp;lt;/tt&amp;gt;||remove file or directory recursively.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''route'''&amp;lt;/tt&amp;gt;||display the network routing table.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''scp -p usr1@hst1:/str1  usr2@hst2:/str2'''&amp;lt;/tt&amp;gt;||copy files between hosts. -p to preserve attributes.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''screen &amp;lt;i&amp;gt;-S&amp;lt;name&amp;gt;&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||screen offers a frame to run a shell, detach from it (&amp;lt;ctrl&amp;gt;-a d) and later reattach to it.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ssh &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||connect remotely to site &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''su -l uuuu'''&amp;lt;/tt&amp;gt;||execute shell as another user. if -l is used an environment similar to what the other user would have had with a direct login is provided.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''telinit n'''&amp;lt;/tt&amp;gt;||go to the runlevel n (1=single-user, 3=multi-user, 4=graphical, 6=reboot).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''umask'''&amp;lt;/tt&amp;gt;||edit /etc/profile to change the default umask value of 022 and '''set it to 027''' (files not readable by other users), a good setting except when installing as root server software to be ran as a standard user account (permission issues).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''useradd &amp;lt;&amp;lt;i&amp;gt;group&amp;lt;/i&amp;gt;&amp;gt; &amp;lt;&amp;lt;i&amp;gt;user&amp;lt;/i&amp;gt;&amp;gt;'''&amp;lt;/tt&amp;gt;||add &amp;lt;&amp;lt;i&amp;gt;user&amp;lt;/i&amp;gt;&amp;gt; as a member of group &amp;lt;&amp;lt;i&amp;gt;group&amp;lt;/i&amp;gt;&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''vi'''&amp;lt;/tt&amp;gt;||run the vi text editor. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Maintaining Slackware]]|[[Main Page]]|[[Configuration files]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=181</id>
		<title>Linux basics</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=181"/>
				<updated>2026-03-29T11:46:16Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Useful linux commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using VI ==&lt;br /&gt;
&lt;br /&gt;
'''vi''' (pronounced vee-eye) is the Unix standard text editor so affords editing the configuration files by hand. If you don’t know it yet, it can be a bit surprising. Actually, '''vi''' was created at a time when the keyboards did not have any arrow or insert keys. So there are two modes: the «open» mode and the «insert» mode.&lt;br /&gt;
&lt;br /&gt;
The open mode affords moving the cursor. '''j''', '''k''', '''l''', '''m''' move the cursor by one character. '''ctrl-f''' moves one page forward and '''ctrl-b''' moves one page backwards. '''w''' moves one word forward and  '''b''' moves one word backwards. It is also possible to use the arrow keys.&lt;br /&gt;
&lt;br /&gt;
'''i''' goes into insert mode before the cursor, '''a''' goes into insert mode after the cursor, and '''A''' goes into insert mode at the end of the line. '''o''' adds a line after the current line, and '''O''' adds a live before the current line. '''R''' goes into rewrite mode.&lt;br /&gt;
&lt;br /&gt;
'''esc''' affords getting out of the insert mode.&lt;br /&gt;
&lt;br /&gt;
'''c$''' affords replacing the end of the line and '''d$''' affords deleting the end of the line. '''cw''' affords replacing one word and '''dw''' affords deleting one word. '''dd''' affords deleting the current line.&lt;br /&gt;
&lt;br /&gt;
''':q''' affords quitting without saving. If the file has been modified, quitting must be forced by typing ''':q!'''. ''':x''' affords saving and quitting. If the file does not have the write rigths, saving must be forced by typing ''':x!'''. ''':w''' affords writing the text in a new file. If the new file already exists, writing must be forced by typing ''':w!'''.&lt;br /&gt;
&lt;br /&gt;
''':num''' affords moving to the line number num. ''':$''' affords moving to the end of the file.&lt;br /&gt;
''':num1copynum2''' affords copying the line number num1 after the line number num2. ''':num1mnum2''' affords moving the line number num1 after the line number num2.&lt;br /&gt;
&lt;br /&gt;
For detailed information, check the [http://vimdoc.sourceforge.net/htmldoc/help.html VIM Documentation]. To enter special characters check the page on [http://vimdoc.sourceforge.net/htmldoc/digraph.html digraphs]. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
&lt;br /&gt;
To get syntax highligting instead of '''vi''' use the '''vim'''(vi improved) replacement :&lt;br /&gt;
&lt;br /&gt;
 # '''cd /usr/bin'''&lt;br /&gt;
 # '''rm vi'''&lt;br /&gt;
 # '''ln -s vim vi'''&lt;br /&gt;
&lt;br /&gt;
== Using SSH ==&lt;br /&gt;
&lt;br /&gt;
SSH is a suite of tools affording connecting remotely over encrypted communications. On the client side, '''ssh''' offers a command line terminal, '''scp''' affords copying a file, and '''sftp''' behaves like ftp. The server side consists of sshd, sftp-server, and ssh-agent. ssh-add, ssh-keysign, ssh-keyscan, and ssh-keygen afford key management. The SSH present on Slackware and the BSDs is [https://www.openssh.com/ OpenSSH], developped by members of the [https://www.openbsd.org/ OpenBSD] project.&lt;br /&gt;
&lt;br /&gt;
'''ssh''' obviously requires your password every time it is executed. This can be avoided by creating on the client a pair of rsa keys and copying the public key to the server. Not specifying a passphrase is not very secure but will afford avoiding having to enter it every time :&lt;br /&gt;
&lt;br /&gt;
 # '''ssh-keygen -t rsa'''&lt;br /&gt;
 Generating public/private rsa key pair.&lt;br /&gt;
 Enter file in which to save the key (/root/.ssh/id_rsa): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter passphrase (empty for no passphrase): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter same passphrase again: '''cr&amp;gt;'''&lt;br /&gt;
 Your identification has been saved in /root/.ssh/id_rsa.&lt;br /&gt;
 Your public key has been saved in /root/.ssh/id_rsa.pub.&lt;br /&gt;
 The key fingerprint is:&lt;br /&gt;
 SHA256:ATSDdER5/l8OJvr+jpINIReJtd81zntVbTjuJW5aobE root@client&lt;br /&gt;
 The key's randomart image is:&lt;br /&gt;
 +---[RSA 2048]----+&lt;br /&gt;
 |   ..=O+..       |&lt;br /&gt;
 |    ..o++.     ..|&lt;br /&gt;
 |       oo.    = +|&lt;br /&gt;
 |      . +o . = +.|&lt;br /&gt;
 |       oSo. o * o|&lt;br /&gt;
 |        . o o*.=.|&lt;br /&gt;
 |         = +E+* .|&lt;br /&gt;
 |        + ...+.. |&lt;br /&gt;
 |         ++o+    |&lt;br /&gt;
 +----[SHA256]-----+&lt;br /&gt;
 # '''scp root@client:.ssh/id_rsa.pub root@server:.ssh/id_rsa.pub'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 id_rsa.pub                                          100% 394      1.8MB/s   00:00&lt;br /&gt;
 # '''ssh server'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 # '''cd .ssh'''&lt;br /&gt;
 # '''cat &amp;gt;&amp;gt; authorized_keys &amp;lt; id_rsa.pub'''&lt;br /&gt;
 # '''chmod 600 authorized_keys'''&lt;br /&gt;
 # '''rm id_rsa.pub'''&lt;br /&gt;
&lt;br /&gt;
== Useful linux commands ==&lt;br /&gt;
&lt;br /&gt;
{| {{thead}}&lt;br /&gt;
|-&lt;br /&gt;
! {{chead}} width=&amp;quot;220&amp;quot; | Command&lt;br /&gt;
! {{chead}} | Effect&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''cd'''&amp;lt;/tt&amp;gt;||change directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chmod -R ppp ddd'''&amp;lt;/tt&amp;gt;||recursively change permissions on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chown -R uuu:ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change user:group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chgrp -R ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''command xxx &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; grep yyy'''&amp;lt;/tt&amp;gt;||search for string yyy in output of command xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ethtool -s eth0 wol g'''&amp;lt;/tt&amp;gt;||puts interface eth0 in wake-on-lan status.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''find xxx -name yyy -print'''&amp;lt;/tt&amp;gt;||find file yyy in in subdirectories of xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''groupadd &amp;lt;&amp;lt;i&amp;gt;group&amp;lt;/i&amp;gt;&amp;gt;'''&amp;lt;/tt&amp;gt;||add group &amp;lt;&amp;lt;i&amp;gt;group&amp;lt;/i&amp;gt;&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ifconfig -a'''&amp;lt;/tt&amp;gt;||print the network interfaces configuration.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''iptables -L'''&amp;lt;/tt&amp;gt;||print the firewall rules.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''killall xxx'''&amp;lt;/tt&amp;gt;||kill program named xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ldconfig'''&amp;lt;/tt&amp;gt;||reload libraries taking into account new libraries just built.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ln -s existing new'''&amp;lt;/tt&amp;gt;||create a symbolic link new to an existing directory or file.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ls -al'''&amp;lt;/tt&amp;gt;||list the working directory, including files beginning with a dot.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''man xxx'''&amp;lt;/tt&amp;gt;||display the xxx command manual page.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''mkisofs -o Windows7SP1.iso -J -r xxx'''&amp;lt;/tt&amp;gt;||Put directory or file xxx into an iso image.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''more xxx'''&amp;lt;/tt&amp;gt;||display file xxx with the possibility of moving up and down. '''less''' and '''most''' are similar commands.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''mount -t ttt /dev/xxx /mnt/ddd'''&amp;lt;/tt&amp;gt;||mount device xxx as type ttt under directory ddd.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''(u)mount /mnt/ddd'''&amp;lt;/tt&amp;gt;||(u)mount device ddd as specified in /etc/fstab.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''nmap &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||check filtering status of ports on &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;. '''-sU''' for UDP.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ntpdate -bv 0.fr.pool.ntp.org'''&amp;lt;/tt&amp;gt;|| force ntp synchronization.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ps -ef'''&amp;lt;/tt&amp;gt;||list the running processes.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''pwd'''&amp;lt;/tt&amp;gt;||print working directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''rm -r'''&amp;lt;/tt&amp;gt;||remove file or directory recursively.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''route'''&amp;lt;/tt&amp;gt;||display the network routing table.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''scp -p usr1@hst1:/str1  usr2@hst2:/str2'''&amp;lt;/tt&amp;gt;||copy files between hosts. -p to preserve attributes.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''screen &amp;lt;i&amp;gt;-S&amp;lt;name&amp;gt;&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||screen offers a frame to run a shell, detach from it (&amp;lt;ctrl&amp;gt;-a d) and later reattach to it.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ssh &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||connect remotely to site &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''su -l uuuu'''&amp;lt;/tt&amp;gt;||execute shell as another user. if -l is used an environment similar to what the other user would have had with a direct login is provided.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''telinit n'''&amp;lt;/tt&amp;gt;||go to the runlevel n (1=single-user, 3=multi-user, 4=graphical, 6=reboot).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''umask'''&amp;lt;/tt&amp;gt;||edit /etc/profile to change the default umask value of 022 and '''set it to 027''' (files not readable by other users), a good setting except when installing as root server software to be ran as a standard user account (permission issues).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''useradd &amp;lt;&amp;lt;i&amp;gt;group&amp;lt;/i&amp;gt;&amp;gt; &amp;lt;&amp;lt;i&amp;gt;user&amp;lt;/i&amp;gt;&amp;gt;'''&amp;lt;/tt&amp;gt;||add &amp;lt;&amp;lt;i&amp;gt;user&amp;lt;/i&amp;gt;&amp;gt; as a member of group &amp;lt;&amp;lt;i&amp;gt;group&amp;lt;/i&amp;gt;&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''vi'''&amp;lt;/tt&amp;gt;||run the vi text editor. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Maintaining Slackware]]|[[Main Page]]|[[Configuration files]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=180</id>
		<title>Linux basics</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=180"/>
				<updated>2026-03-29T11:45:33Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Useful linux commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using VI ==&lt;br /&gt;
&lt;br /&gt;
'''vi''' (pronounced vee-eye) is the Unix standard text editor so affords editing the configuration files by hand. If you don’t know it yet, it can be a bit surprising. Actually, '''vi''' was created at a time when the keyboards did not have any arrow or insert keys. So there are two modes: the «open» mode and the «insert» mode.&lt;br /&gt;
&lt;br /&gt;
The open mode affords moving the cursor. '''j''', '''k''', '''l''', '''m''' move the cursor by one character. '''ctrl-f''' moves one page forward and '''ctrl-b''' moves one page backwards. '''w''' moves one word forward and  '''b''' moves one word backwards. It is also possible to use the arrow keys.&lt;br /&gt;
&lt;br /&gt;
'''i''' goes into insert mode before the cursor, '''a''' goes into insert mode after the cursor, and '''A''' goes into insert mode at the end of the line. '''o''' adds a line after the current line, and '''O''' adds a live before the current line. '''R''' goes into rewrite mode.&lt;br /&gt;
&lt;br /&gt;
'''esc''' affords getting out of the insert mode.&lt;br /&gt;
&lt;br /&gt;
'''c$''' affords replacing the end of the line and '''d$''' affords deleting the end of the line. '''cw''' affords replacing one word and '''dw''' affords deleting one word. '''dd''' affords deleting the current line.&lt;br /&gt;
&lt;br /&gt;
''':q''' affords quitting without saving. If the file has been modified, quitting must be forced by typing ''':q!'''. ''':x''' affords saving and quitting. If the file does not have the write rigths, saving must be forced by typing ''':x!'''. ''':w''' affords writing the text in a new file. If the new file already exists, writing must be forced by typing ''':w!'''.&lt;br /&gt;
&lt;br /&gt;
''':num''' affords moving to the line number num. ''':$''' affords moving to the end of the file.&lt;br /&gt;
''':num1copynum2''' affords copying the line number num1 after the line number num2. ''':num1mnum2''' affords moving the line number num1 after the line number num2.&lt;br /&gt;
&lt;br /&gt;
For detailed information, check the [http://vimdoc.sourceforge.net/htmldoc/help.html VIM Documentation]. To enter special characters check the page on [http://vimdoc.sourceforge.net/htmldoc/digraph.html digraphs]. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
&lt;br /&gt;
To get syntax highligting instead of '''vi''' use the '''vim'''(vi improved) replacement :&lt;br /&gt;
&lt;br /&gt;
 # '''cd /usr/bin'''&lt;br /&gt;
 # '''rm vi'''&lt;br /&gt;
 # '''ln -s vim vi'''&lt;br /&gt;
&lt;br /&gt;
== Using SSH ==&lt;br /&gt;
&lt;br /&gt;
SSH is a suite of tools affording connecting remotely over encrypted communications. On the client side, '''ssh''' offers a command line terminal, '''scp''' affords copying a file, and '''sftp''' behaves like ftp. The server side consists of sshd, sftp-server, and ssh-agent. ssh-add, ssh-keysign, ssh-keyscan, and ssh-keygen afford key management. The SSH present on Slackware and the BSDs is [https://www.openssh.com/ OpenSSH], developped by members of the [https://www.openbsd.org/ OpenBSD] project.&lt;br /&gt;
&lt;br /&gt;
'''ssh''' obviously requires your password every time it is executed. This can be avoided by creating on the client a pair of rsa keys and copying the public key to the server. Not specifying a passphrase is not very secure but will afford avoiding having to enter it every time :&lt;br /&gt;
&lt;br /&gt;
 # '''ssh-keygen -t rsa'''&lt;br /&gt;
 Generating public/private rsa key pair.&lt;br /&gt;
 Enter file in which to save the key (/root/.ssh/id_rsa): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter passphrase (empty for no passphrase): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter same passphrase again: '''cr&amp;gt;'''&lt;br /&gt;
 Your identification has been saved in /root/.ssh/id_rsa.&lt;br /&gt;
 Your public key has been saved in /root/.ssh/id_rsa.pub.&lt;br /&gt;
 The key fingerprint is:&lt;br /&gt;
 SHA256:ATSDdER5/l8OJvr+jpINIReJtd81zntVbTjuJW5aobE root@client&lt;br /&gt;
 The key's randomart image is:&lt;br /&gt;
 +---[RSA 2048]----+&lt;br /&gt;
 |   ..=O+..       |&lt;br /&gt;
 |    ..o++.     ..|&lt;br /&gt;
 |       oo.    = +|&lt;br /&gt;
 |      . +o . = +.|&lt;br /&gt;
 |       oSo. o * o|&lt;br /&gt;
 |        . o o*.=.|&lt;br /&gt;
 |         = +E+* .|&lt;br /&gt;
 |        + ...+.. |&lt;br /&gt;
 |         ++o+    |&lt;br /&gt;
 +----[SHA256]-----+&lt;br /&gt;
 # '''scp root@client:.ssh/id_rsa.pub root@server:.ssh/id_rsa.pub'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 id_rsa.pub                                          100% 394      1.8MB/s   00:00&lt;br /&gt;
 # '''ssh server'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 # '''cd .ssh'''&lt;br /&gt;
 # '''cat &amp;gt;&amp;gt; authorized_keys &amp;lt; id_rsa.pub'''&lt;br /&gt;
 # '''chmod 600 authorized_keys'''&lt;br /&gt;
 # '''rm id_rsa.pub'''&lt;br /&gt;
&lt;br /&gt;
== Useful linux commands ==&lt;br /&gt;
&lt;br /&gt;
{| {{thead}}&lt;br /&gt;
|-&lt;br /&gt;
! {{chead}} width=&amp;quot;220&amp;quot; | Command&lt;br /&gt;
! {{chead}} | Effect&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''cd'''&amp;lt;/tt&amp;gt;||change directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chmod -R ppp ddd'''&amp;lt;/tt&amp;gt;||recursively change permissions on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chown -R uuu:ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change user:group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chgrp -R ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''command xxx &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; grep yyy'''&amp;lt;/tt&amp;gt;||search for string yyy in output of command xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ethtool -s eth0 wol g'''&amp;lt;/tt&amp;gt;||puts interface eth0 in wake-on-lan status.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''find xxx -name yyy -print'''&amp;lt;/tt&amp;gt;||find file yyy in in subdirectories of xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''groupadd &amp;lt;&amp;lt;i&amp;gt;group&amp;lt;/i&amp;gt;&amp;gt;'''&amp;lt;/tt&amp;gt;||add group &amp;lt;&amp;lt;i&amp;gt;group&amp;lt;/i&amp;gt;&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ifconfig -a'''&amp;lt;/tt&amp;gt;||print the network interfaces configuration.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''iptables -L'''&amp;lt;/tt&amp;gt;||print the firewall rules.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''killall xxx'''&amp;lt;/tt&amp;gt;||kill program named xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ldconfig'''&amp;lt;/tt&amp;gt;||reload libraries taking into account new libraries just built.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ln -s existing new'''&amp;lt;/tt&amp;gt;||create a symbolic link new to an existing directory or file.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ls -al'''&amp;lt;/tt&amp;gt;||list the working directory, including files beginning with a dot.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''man xxx'''&amp;lt;/tt&amp;gt;||display the xxx command manual page.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''mkisofs -o Windows7SP1.iso -J -r xxx'''&amp;lt;/tt&amp;gt;||Put directory or file xxx into an iso image.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''more xxx'''&amp;lt;/tt&amp;gt;||display file xxx with the possibility of moving up and down. '''less''' and '''most''' are similar commands.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''mount -t ttt /dev/xxx /mnt/ddd'''&amp;lt;/tt&amp;gt;||mount device xxx as type ttt under directory ddd.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''(u)mount /mnt/ddd'''&amp;lt;/tt&amp;gt;||(u)mount device ddd as specified in /etc/fstab.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''nmap &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||check filtering status of ports on &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;. '''-sU''' for UDP.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ntpdate -bv 0.fr.pool.ntp.org'''&amp;lt;/tt&amp;gt;|| force ntp synchronization.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ps -ef'''&amp;lt;/tt&amp;gt;||list the running processes.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''pwd'''&amp;lt;/tt&amp;gt;||print working directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''rm -r'''&amp;lt;/tt&amp;gt;||remove file or directory recursively.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''route'''&amp;lt;/tt&amp;gt;||display the network routing table.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''scp -p usr1@hst1:/str1  usr2@hst2:/str2'''&amp;lt;/tt&amp;gt;||copy files between hosts.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''screen &amp;lt;i&amp;gt;-S&amp;lt;name&amp;gt;&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||screen offers a frame to run a shell, detach from it (&amp;lt;ctrl&amp;gt;-a d) and later reattach to it.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ssh &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||connect remotely to site &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''su -l uuuu'''&amp;lt;/tt&amp;gt;||execute shell as another user. if -l is used an environment similar to what the other user would have had with a direct login is provided.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''telinit n'''&amp;lt;/tt&amp;gt;||go to the runlevel n (1=single-user, 3=multi-user, 4=graphical, 6=reboot).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''umask'''&amp;lt;/tt&amp;gt;||edit /etc/profile to change the default umask value of 022 and '''set it to 027''' (files not readable by other users), a good setting except when installing as root server software to be ran as a standard user account (permission issues).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''useradd &amp;lt;&amp;lt;i&amp;gt;group&amp;lt;/i&amp;gt;&amp;gt; &amp;lt;&amp;lt;i&amp;gt;user&amp;lt;/i&amp;gt;&amp;gt;'''&amp;lt;/tt&amp;gt;||add &amp;lt;&amp;lt;i&amp;gt;user&amp;lt;/i&amp;gt;&amp;gt; as a member of group &amp;lt;&amp;lt;i&amp;gt;group&amp;lt;/i&amp;gt;&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''vi'''&amp;lt;/tt&amp;gt;||run the vi text editor. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Maintaining Slackware]]|[[Main Page]]|[[Configuration files]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=179</id>
		<title>Linux basics</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=179"/>
				<updated>2026-03-29T11:44:54Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Useful linux commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using VI ==&lt;br /&gt;
&lt;br /&gt;
'''vi''' (pronounced vee-eye) is the Unix standard text editor so affords editing the configuration files by hand. If you don’t know it yet, it can be a bit surprising. Actually, '''vi''' was created at a time when the keyboards did not have any arrow or insert keys. So there are two modes: the «open» mode and the «insert» mode.&lt;br /&gt;
&lt;br /&gt;
The open mode affords moving the cursor. '''j''', '''k''', '''l''', '''m''' move the cursor by one character. '''ctrl-f''' moves one page forward and '''ctrl-b''' moves one page backwards. '''w''' moves one word forward and  '''b''' moves one word backwards. It is also possible to use the arrow keys.&lt;br /&gt;
&lt;br /&gt;
'''i''' goes into insert mode before the cursor, '''a''' goes into insert mode after the cursor, and '''A''' goes into insert mode at the end of the line. '''o''' adds a line after the current line, and '''O''' adds a live before the current line. '''R''' goes into rewrite mode.&lt;br /&gt;
&lt;br /&gt;
'''esc''' affords getting out of the insert mode.&lt;br /&gt;
&lt;br /&gt;
'''c$''' affords replacing the end of the line and '''d$''' affords deleting the end of the line. '''cw''' affords replacing one word and '''dw''' affords deleting one word. '''dd''' affords deleting the current line.&lt;br /&gt;
&lt;br /&gt;
''':q''' affords quitting without saving. If the file has been modified, quitting must be forced by typing ''':q!'''. ''':x''' affords saving and quitting. If the file does not have the write rigths, saving must be forced by typing ''':x!'''. ''':w''' affords writing the text in a new file. If the new file already exists, writing must be forced by typing ''':w!'''.&lt;br /&gt;
&lt;br /&gt;
''':num''' affords moving to the line number num. ''':$''' affords moving to the end of the file.&lt;br /&gt;
''':num1copynum2''' affords copying the line number num1 after the line number num2. ''':num1mnum2''' affords moving the line number num1 after the line number num2.&lt;br /&gt;
&lt;br /&gt;
For detailed information, check the [http://vimdoc.sourceforge.net/htmldoc/help.html VIM Documentation]. To enter special characters check the page on [http://vimdoc.sourceforge.net/htmldoc/digraph.html digraphs]. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
&lt;br /&gt;
To get syntax highligting instead of '''vi''' use the '''vim'''(vi improved) replacement :&lt;br /&gt;
&lt;br /&gt;
 # '''cd /usr/bin'''&lt;br /&gt;
 # '''rm vi'''&lt;br /&gt;
 # '''ln -s vim vi'''&lt;br /&gt;
&lt;br /&gt;
== Using SSH ==&lt;br /&gt;
&lt;br /&gt;
SSH is a suite of tools affording connecting remotely over encrypted communications. On the client side, '''ssh''' offers a command line terminal, '''scp''' affords copying a file, and '''sftp''' behaves like ftp. The server side consists of sshd, sftp-server, and ssh-agent. ssh-add, ssh-keysign, ssh-keyscan, and ssh-keygen afford key management. The SSH present on Slackware and the BSDs is [https://www.openssh.com/ OpenSSH], developped by members of the [https://www.openbsd.org/ OpenBSD] project.&lt;br /&gt;
&lt;br /&gt;
'''ssh''' obviously requires your password every time it is executed. This can be avoided by creating on the client a pair of rsa keys and copying the public key to the server. Not specifying a passphrase is not very secure but will afford avoiding having to enter it every time :&lt;br /&gt;
&lt;br /&gt;
 # '''ssh-keygen -t rsa'''&lt;br /&gt;
 Generating public/private rsa key pair.&lt;br /&gt;
 Enter file in which to save the key (/root/.ssh/id_rsa): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter passphrase (empty for no passphrase): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter same passphrase again: '''cr&amp;gt;'''&lt;br /&gt;
 Your identification has been saved in /root/.ssh/id_rsa.&lt;br /&gt;
 Your public key has been saved in /root/.ssh/id_rsa.pub.&lt;br /&gt;
 The key fingerprint is:&lt;br /&gt;
 SHA256:ATSDdER5/l8OJvr+jpINIReJtd81zntVbTjuJW5aobE root@client&lt;br /&gt;
 The key's randomart image is:&lt;br /&gt;
 +---[RSA 2048]----+&lt;br /&gt;
 |   ..=O+..       |&lt;br /&gt;
 |    ..o++.     ..|&lt;br /&gt;
 |       oo.    = +|&lt;br /&gt;
 |      . +o . = +.|&lt;br /&gt;
 |       oSo. o * o|&lt;br /&gt;
 |        . o o*.=.|&lt;br /&gt;
 |         = +E+* .|&lt;br /&gt;
 |        + ...+.. |&lt;br /&gt;
 |         ++o+    |&lt;br /&gt;
 +----[SHA256]-----+&lt;br /&gt;
 # '''scp root@client:.ssh/id_rsa.pub root@server:.ssh/id_rsa.pub'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 id_rsa.pub                                          100% 394      1.8MB/s   00:00&lt;br /&gt;
 # '''ssh server'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 # '''cd .ssh'''&lt;br /&gt;
 # '''cat &amp;gt;&amp;gt; authorized_keys &amp;lt; id_rsa.pub'''&lt;br /&gt;
 # '''chmod 600 authorized_keys'''&lt;br /&gt;
 # '''rm id_rsa.pub'''&lt;br /&gt;
&lt;br /&gt;
== Useful linux commands ==&lt;br /&gt;
&lt;br /&gt;
{| {{thead}}&lt;br /&gt;
|-&lt;br /&gt;
! {{chead}} width=&amp;quot;220&amp;quot; | Command&lt;br /&gt;
! {{chead}} | Effect&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''cd'''&amp;lt;/tt&amp;gt;||change directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chmod -R ppp ddd'''&amp;lt;/tt&amp;gt;||recursively change permissions on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chown -R uuu:ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change user:group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chgrp -R ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''command xxx &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; grep yyy'''&amp;lt;/tt&amp;gt;||search for string yyy in output of command xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ethtool -s eth0 wol g'''&amp;lt;/tt&amp;gt;||puts interface eth0 in wake-on-lan status.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''find xxx -name yyy -print'''&amp;lt;/tt&amp;gt;||find file yyy in in subdirectories of xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''groupadd &amp;lt;&amp;lt;i&amp;gt;group&amp;lt;/i&amp;gt;&amp;gt;'''&amp;lt;/tt&amp;gt;||add group &amp;lt;&amp;lt;i&amp;gt;group&amp;lt;/i&amp;gt;&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ifconfig -a'''&amp;lt;/tt&amp;gt;||print the network interfaces configuration.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''iptables -L'''&amp;lt;/tt&amp;gt;||print the firewall rules.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''killall xxx'''&amp;lt;/tt&amp;gt;||kill program named xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ldconfig'''&amp;lt;/tt&amp;gt;||reload libraries taking into account new libraries just built.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ln -s existing new'''&amp;lt;/tt&amp;gt;||create a symbolic link new to an existing directory or file.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ls -al'''&amp;lt;/tt&amp;gt;||list the working directory, including files beginning with a dot.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''man xxx'''&amp;lt;/tt&amp;gt;||display the xxx command manual page.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''mkisofs -o Windows7SP1.iso -J -r xxx'''&amp;lt;/tt&amp;gt;||Put xxx in an iso image.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''more xxx'''&amp;lt;/tt&amp;gt;||display file xxx with the possibility of moving up and down. '''less''' and '''most''' are similar commands.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''mount -t ttt /dev/xxx /mnt/ddd'''&amp;lt;/tt&amp;gt;||mount device xxx as type ttt under directory ddd.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''(u)mount /mnt/ddd'''&amp;lt;/tt&amp;gt;||(u)mount device ddd as specified in /etc/fstab.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''nmap &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||check filtering status of ports on &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;. '''-sU''' for UDP.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ntpdate -bv 0.fr.pool.ntp.org'''&amp;lt;/tt&amp;gt;|| force ntp synchronization.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ps -ef'''&amp;lt;/tt&amp;gt;||list the running processes.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''pwd'''&amp;lt;/tt&amp;gt;||print working directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''rm -r'''&amp;lt;/tt&amp;gt;||remove file or directory recursively.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''route'''&amp;lt;/tt&amp;gt;||display the network routing table.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''scp -p usr1@hst1:/str1  usr2@hst2:/str2'''&amp;lt;/tt&amp;gt;||copy files between hosts.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''screen &amp;lt;i&amp;gt;-S&amp;lt;name&amp;gt;&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||screen offers a frame to run a shell, detach from it (&amp;lt;ctrl&amp;gt;-a d) and later reattach to it.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ssh &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||connect remotely to site &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''su -l uuuu'''&amp;lt;/tt&amp;gt;||execute shell as another user. if -l is used an environment similar to what the other user would have had with a direct login is provided.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''telinit n'''&amp;lt;/tt&amp;gt;||go to the runlevel n (1=single-user, 3=multi-user, 4=graphical, 6=reboot).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''umask'''&amp;lt;/tt&amp;gt;||edit /etc/profile to change the default umask value of 022 and '''set it to 027''' (files not readable by other users), a good setting except when installing as root server software to be ran as a standard user account (permission issues).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''useradd &amp;lt;&amp;lt;i&amp;gt;group&amp;lt;/i&amp;gt;&amp;gt; &amp;lt;&amp;lt;i&amp;gt;user&amp;lt;/i&amp;gt;&amp;gt;'''&amp;lt;/tt&amp;gt;||add &amp;lt;&amp;lt;i&amp;gt;user&amp;lt;/i&amp;gt;&amp;gt; as a member of group &amp;lt;&amp;lt;i&amp;gt;group&amp;lt;/i&amp;gt;&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''vi'''&amp;lt;/tt&amp;gt;||run the vi text editor. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Maintaining Slackware]]|[[Main Page]]|[[Configuration files]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=X11_over_the_network&amp;diff=178</id>
		<title>X11 over the network</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=X11_over_the_network&amp;diff=178"/>
				<updated>2026-03-29T08:55:10Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Kdm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
Using X over the network affords accessing remote servers graphically as if you were on the console. So for instance, from your Windows workstation, you can run Windows and Linux side by side, full screen, and switch with function-key combinations such as alt-tab or ctrl-alt-F7 or F8. A very handy feature. X is natively present and fast on Linux. On Windows, it will always be a bit slower, and you need to install an X server. [https://sourceforge.net/projects/vcxsrv/ VcXrv] is a very competent one.&lt;br /&gt;
&lt;br /&gt;
The software presenting an X window on a terminal is called an X server, which is contrary to what we are used to, as the X server is not on the server but actually on the client ! Over the Internet, you will always encapsulate X11 in SSH ('''X11 forwarding''', to configure in '''/etc/ssh/sshd_config''') as the X protocols are not secure. However, X needs a significant bandwidth so it is not likely that you will use it over an ADSL connection as it would be too slow. Optical fiber could be OK though.&lt;br /&gt;
&lt;br /&gt;
For more information on using remote X applications, check this [http://www.xs4all.nl/~zweije/xauth.html mini-HOWTO] or this excellent [http://shop.oreilly.com/product/9780596101954.do O'Reilly book].&lt;br /&gt;
&lt;br /&gt;
== Xdm, Kdm, Gdm ==&lt;br /&gt;
&lt;br /&gt;
X requires a daemon on the server to handle connections. The base daemon is Xdm, that offers a graphical login directly under X, with no desktop manager. Access can be local on the computer console, or can be from an X terminal or X emulated terminal on the network.&lt;br /&gt;
&lt;br /&gt;
The KDE and Gnome desktop environments Kdm and Gdm come with Xdm variants that have a different look and feel. It is possible to run one or several of the three, provided that they will not compete for management of the same terminals.&lt;br /&gt;
&lt;br /&gt;
However it makes sense to use only one. Kdm is a good choice as it affords choosing the Session Window Manager (Kde, Xfce4, ...) from the connection dialog box.&lt;br /&gt;
&lt;br /&gt;
== Kdm ==&lt;br /&gt;
&lt;br /&gt;
For KDE to manage X terminals over the network, update '''/etc/kde/kdm/kdmrc''' specifying '''Enable=true''' for '''[Xdmcp]'''.&lt;br /&gt;
&lt;br /&gt;
To be able to connect as root, update '''/etc/kde/kdm/kdmrc''', specifying '''AllowRootLogin=true''' for '''[X-*-Core]'''.&lt;br /&gt;
&lt;br /&gt;
In '''/etc/kde/kdm/Xaccess''', uncomment line  '''#* # any host can get a login window''' to authorize connection from any incoming IP address (or to restrict usage to your local network).&lt;br /&gt;
&lt;br /&gt;
== Xdm ==&lt;br /&gt;
&lt;br /&gt;
In '''/etc/X11/xdm/xdm-config''', comment out the line '''#DisplayManager.requestPort:    0''' to authorize X terminal access from the network. Else port 177 won't be listened, as can be verified using '''nmap -sU localhost''', that lists the listening UDP ports. If checking with tcpdump, '''udp port xdmcp unreachable''' will be seen on the wire.&lt;br /&gt;
&lt;br /&gt;
In '''/etc/X11/xdm/Xaccess''', uncomment line  '''#* # any host can get a login window''' to authorize connection from any incoming IP address (or to restrict usage to your local network). In '''/etc/X11/xdm/Xservers''', comment out the line with ''':0''' to avoid getting an X login screen on the console.&lt;br /&gt;
&lt;br /&gt;
To automatically launch '''xdm''' during Slackware init, add the following lines to '''/etc/rc.d/rc.local''' :&lt;br /&gt;
&lt;br /&gt;
 # Xdm&lt;br /&gt;
 if [ -x /usr/X11/bin/xdm ]; then&lt;br /&gt;
         /usr/X11/bin/xdm&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
== X11 firewalling ==&lt;br /&gt;
&lt;br /&gt;
At the firewall level, the X terminal must be able to contact the host using '''UDP 177''' and the host must be able to callback the X terminal using '''TCP 6000:6063'''. Open the corresponding ports, but to avoid login information to be sent over the wire, restrict usage to the local network :&lt;br /&gt;
&lt;br /&gt;
 # SSH-tunnelled X-Window output appears as input on interface lo&lt;br /&gt;
 iptables -A INPUT -p udp -j ACCEPT --dport 177 -s 192.168.0.0/24&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 6000:6063 -m state --state NEW -s 192.168.0.0/24&lt;br /&gt;
 iptables -A INPUT -i lo -p tcp -j ACCEPT --dport 6000:6063 -m state --state NEW -s 192.168.0.0/24&lt;br /&gt;
&lt;br /&gt;
For access from the Internet, il will be better to encapsulate X11 within an SSH session, using the X11 forwarding option. Due to encryption, this is however much slower. In this case, instead of KDE, prefer a less network-intensive window manager such as xfce4.&lt;br /&gt;
&lt;br /&gt;
== X11 server ==&lt;br /&gt;
&lt;br /&gt;
The X terminal can be a Linux computer on which you run the X server to display X from a remote client. For instance typing '''nohup X -query &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt; :1 &amp;amp;''' will display X from host &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt; on virtual terminal 8. This way you will be able to keep local X and remote X side by side and switch between them using '''&amp;lt;ctrl&amp;gt;&amp;lt;alt&amp;gt;&amp;lt;F7&amp;gt;''' and '''&amp;lt;ctrl&amp;gt;&amp;lt;alt&amp;gt;&amp;lt;F8&amp;gt;'''.&lt;br /&gt;
&lt;br /&gt;
The X terminal can also be a Windows PC equipped with an X emulator such as [https://sourceforge.net/projects/vcxsrv/ VcXrv] or other software found from the Internet. At the time of this writing though, such software is frustrating due to unstability or poor licensing conditions, so VcXrv seems to currently be the better choice, although a bit slow. &amp;lt;u&amp;gt;'''Note'''&amp;lt;/u&amp;gt; : Specify in the configuration that you will be using XDMCP.&lt;br /&gt;
&lt;br /&gt;
== Windows firewall ==&lt;br /&gt;
&lt;br /&gt;
On Windows, use the firewall with «'''Allow exceptions'''» and create an entry in the firewall for the X11 protocol (port 6000), specifying in the scope the server IP address or the local network (not the Internet).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[X11 configuration]]|[[Main Page]]|[[Compiling the Kernel]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=DVDless_install&amp;diff=177</id>
		<title>DVDless install</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=DVDless_install&amp;diff=177"/>
				<updated>2026-03-26T21:08:41Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Slackware setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
The (local) network is an additional choice to install Slackware from when your hardware has this capability. Installing from the local network is much faster than from a DVD and is a good choice when playing around with the installation. This page explains how to configure a Slackware server for this usage. It was inspired by the [http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:pxe AlienBob's blog page] on the same topic. To install Slackware over the network we need :&lt;br /&gt;
&lt;br /&gt;
* A service to download the Slackware files during the Slackware setup. HTTP, FTP, or NFS can be used. In the example below we show how to use the NFS and FTP services included with Slackware.&lt;br /&gt;
* A service implementing the TFTP protocol. TFTP is used to effectively download the bootstrap code from the server identified. We will use the TFTP protocol included with Slackware.&lt;br /&gt;
&lt;br /&gt;
* A service implementing the BOOTP protocol. BOOTP is used by the PXE firmware to identify on the network a server to download the bootloader code from. The DHCP server included with the Slackware distribution has this capability.&lt;br /&gt;
&lt;br /&gt;
== Configuring NFS ==&lt;br /&gt;
&lt;br /&gt;
NFS is SUN's Network File System. It is lightning fast and can be used as a mount point, but depending on configuration may be unsecure and must be used locally only. Also, it uses some random port numbers that need to be fixed if firewalling. The directories used are defined in '''/etc/exports'''. Edit as follows. '''ro''' means read-only, '''sync''' makes sure that no asynchronous requests are made, '''insecure''' affords using different NFS ports from other NFS implementations, '''all_squash''' maps all uids and gids to the anonymous user for public access, '''no_subtree_check''' improves reliability in some circumstances. See '''man exports''' for more details.&lt;br /&gt;
&lt;br /&gt;
 # See exports(5) for a description.&lt;br /&gt;
 # This file contains a list of all directories exported to other computers.&lt;br /&gt;
 # It is used by rpc.nfsd and rpc.mountd.&lt;br /&gt;
 &lt;br /&gt;
 /var/pub       192.168.53.1/24(ro,sync,insecure,all_squash,no_subtree_check)&lt;br /&gt;
&lt;br /&gt;
The NFS server is launched using '''/etc/rc.d/rc.nfsd'''. Make this script executable so as to use it on every boot. You can also '''start''' it to test it immediately. The NFS client is launched using '''/etc/rc.d/rc.rpc''' and affords using NFS mount points from other NFS servers. Make this script executable if you want to use it and have it started on every reboot. This can be handy to cross-test NFS machines. Otherwise it should not be necessary.&lt;br /&gt;
&lt;br /&gt;
 # chmod u+x /etc/rc.d/rc.nfsd&lt;br /&gt;
 # chmod u+x /etc/rc.d/rc.rpc&lt;br /&gt;
&lt;br /&gt;
== Configuring FTP ==&lt;br /&gt;
&lt;br /&gt;
As SSH affords encrypted authentication and transfers, FTP will be used on our site only for anonymous public downloads. FTP uses fixed port numbers so it is easy to firewall, but it is much slower than NFS. Slackware includes two FTPs : ProFTPd and vsFTP. We will use the latter. Using vsFTP requires very little configuration : setting the home directory of the ftp user to where we want our files to be downloaded from, uncommenting the correct '''ftp''' line in '''/etc/inetd.conf''' and '''/etc/rc.d/rc.inetd restart''', updating the firewall rules. For more details '''man vsftpd.conf'''.&lt;br /&gt;
 &lt;br /&gt;
 # usermod --home /var/pub ftp&lt;br /&gt;
 . . . &lt;br /&gt;
 # Very Secure File Transfer Protocol (FTP) server.&lt;br /&gt;
 ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  vsftpd&lt;br /&gt;
 . . .&lt;br /&gt;
 # /etc/rc.d/rc.inetd restart&lt;br /&gt;
 . . .&lt;br /&gt;
 # services on local network FTP BOOTP HTTP NNTP IMAP HTTPS SUBMIT VNC VOIP&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 20 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 21 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
&lt;br /&gt;
== Putting the Slackware install files online ==&lt;br /&gt;
&lt;br /&gt;
Copy the content of the slackware DVD to a disk directory, for instance '''/var/pub/slackware64-15.0'''&lt;br /&gt;
&lt;br /&gt;
 # mkdir /mnt/dvd&lt;br /&gt;
 # mkdir /var/pub/slackware64-15.0&lt;br /&gt;
 # mount -o loop slackware64-15.0-install-dvd.iso /mnt/dvd&lt;br /&gt;
 # cp -a /mnt/dvd/* /var/pub/slackware64-15.0/&lt;br /&gt;
 # umount /mnt/dvd&lt;br /&gt;
&lt;br /&gt;
During install, when asked for the source directory specify subdirectory '''slackware64''' that is, '''/var/pub/slackware64-15.0/slackware64'''&lt;br /&gt;
&lt;br /&gt;
The Slackware network setup uses NFS version 3 meaning that directory paths are absolute.&lt;br /&gt;
&lt;br /&gt;
== Configuring TFTPBOOT ==&lt;br /&gt;
&lt;br /&gt;
TFTP is the trivial ftp protocol (for use on a local network). Let's create the '''tftp bootp''' file structure under the default '''/tftpboot''' directory. The directory where we store the bootloader files is '''/tftpboot/slackware64-15.0''' :&lt;br /&gt;
&lt;br /&gt;
 # mkdir /tftpboot&lt;br /&gt;
 # mkdir /tftpboot/slackware64-15.0&lt;br /&gt;
 # mkdir /tftpboot/slackware64-15.0/pxelinux.cfg&lt;br /&gt;
 # cp /usr/share/syslinux/pxelinux.0 /tftpboot/slackware64-15.0/&lt;br /&gt;
 # cp /var/pub/slackware64-15.0/isolinux/message.txt /tftpboot/slackware64-15.0/&lt;br /&gt;
 # cp /var/pub/slackware64-15.0/isolinux/f2.txt /tftpboot/slackware64-15.0/&lt;br /&gt;
 # cp -a /var/pub/slackware64-15.0/kernels /tftpboot/slackware64-15.0/&lt;br /&gt;
 # cp /var/pub/slackware64-15.0/usb-and-pxe-installers/pxelinux.cfg_default /tftpboot/slackware64-15.0/pxelinux.cfg/default&lt;br /&gt;
 # cp /var/pub/slackware64-15.0/isolinux/initrd.img /tftpboot/slackware64-15.0/&lt;br /&gt;
&lt;br /&gt;
Tftpboot is handled by '''inetd'''. To activate it, uncomment the tftp line in '''/etc/inetd.conf''' then '''/etc/rc.d/rc.inetd restart''' or reboot.&lt;br /&gt;
&lt;br /&gt;
 tftp  dgram   udp     wait    root    /usr/sbin/in.tftpd  in.tftpd -s /tftpboot -r blksize&lt;br /&gt;
&lt;br /&gt;
== Configuring DHCP ==&lt;br /&gt;
&lt;br /&gt;
We configure '''/etc/dhcpd.conf''' as follows. Our subnet is '''192.168.53.0''', our network mask '''255.255.255.0''', our IP address is '''192.168.53.1''', our router address '''192.168.53.254'''. The IP DHCP range is '''192.168.53.154''' to '''192.168.53.253'''. For more details on other configuration possbilities, '''man dhcpd.conf'''.&lt;br /&gt;
&lt;br /&gt;
 # dhcpd.conf&lt;br /&gt;
 #&lt;br /&gt;
 # Configuration file for ISC dhcpd (see 'man dhcpd.conf')&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 # If this DHCP server is the official DHCP server for the local&lt;br /&gt;
 # network, the authoritative directive should be uncommented.&lt;br /&gt;
 authoritative;&lt;br /&gt;
 ddns-update-style none;&lt;br /&gt;
 &lt;br /&gt;
 # Allow bootp requests&lt;br /&gt;
 allow bootp;&lt;br /&gt;
 &lt;br /&gt;
 # Point to the TFTP server:&lt;br /&gt;
 next-server 192.168.53.1;&lt;br /&gt;
 &lt;br /&gt;
 # Default lease is 1 week (604800 sec.)&lt;br /&gt;
 default-lease-time 604800;&lt;br /&gt;
 # Max lease is 4 weeks (2419200 sec.)&lt;br /&gt;
 max-lease-time 2419200;&lt;br /&gt;
 &lt;br /&gt;
 subnet 192.168.53.0 netmask 255.255.255.0 {&lt;br /&gt;
     option domain-name &amp;quot;studioware.com&amp;quot;;&lt;br /&gt;
     option broadcast-address 192.168.53.255;&lt;br /&gt;
     option subnet-mask 255.255.255.0;&lt;br /&gt;
     option domain-name-servers 192.168.53.1;&lt;br /&gt;
     option routers 192.168.53.254;&lt;br /&gt;
     range dynamic-bootp 192.168.53.154 192.168.53.253;&lt;br /&gt;
     use-host-decl-names on;&lt;br /&gt;
     if substring (option vendor-class-identifier, 0, 9) = &amp;quot;PXEClient&amp;quot; {&lt;br /&gt;
       filename &amp;quot;/slackware64-15.0/pxelinux.0&amp;quot;;&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Next is to create a script '''/etc/rc.d/rc.dhcpd''' to launch dhcp. Our bridged interface is '''br0''' :&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # /etc/rc.d/rc.dhcpd&lt;br /&gt;
 #      This shell script takes care of starting and stopping&lt;br /&gt;
 #      the ISC DHCPD service&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 # Put the command line options here that you want to pass to dhcpd:&lt;br /&gt;
 DHCPD_OPTIONS=&amp;quot;-q '''br0'''&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [ -x /usr/sbin/dhcpd ] || exit 0&lt;br /&gt;
 &lt;br /&gt;
 [ -f /etc/dhcpd.conf ] || exit 0&lt;br /&gt;
 &lt;br /&gt;
 start() {&lt;br /&gt;
       # Start daemons.&lt;br /&gt;
       echo -n &amp;quot;Starting dhcpd:  /usr/sbin/dhcpd $DHCPD_OPTIONS &amp;quot;&lt;br /&gt;
       /usr/sbin/dhcpd $DHCPD_OPTIONS&lt;br /&gt;
       echo&lt;br /&gt;
 }&lt;br /&gt;
 stop() {&lt;br /&gt;
       # Stop daemons.&lt;br /&gt;
       echo -n &amp;quot;Shutting down dhcpd: &amp;quot;&lt;br /&gt;
       killall -TERM dhcpd&lt;br /&gt;
       echo&lt;br /&gt;
 }&lt;br /&gt;
 status() {&lt;br /&gt;
   PIDS=$(pidof dhcpd)&lt;br /&gt;
   if [ &amp;quot;$PIDS&amp;quot; == &amp;quot;&amp;quot; ]; then&lt;br /&gt;
     echo &amp;quot;dhcpd is not running!&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     echo &amp;quot;dhcpd is running at pid(s) ${PIDS}.&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
 }&lt;br /&gt;
 restart() {&lt;br /&gt;
       stop&lt;br /&gt;
       start&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 # See how we were called.&lt;br /&gt;
 case &amp;quot;$1&amp;quot; in&lt;br /&gt;
   start)&lt;br /&gt;
         start&lt;br /&gt;
         ;;&lt;br /&gt;
   stop)&lt;br /&gt;
         stop&lt;br /&gt;
         ;;&lt;br /&gt;
   restart)&lt;br /&gt;
         stop&lt;br /&gt;
         start&lt;br /&gt;
         ;;&lt;br /&gt;
   status)&lt;br /&gt;
         status&lt;br /&gt;
         ;;&lt;br /&gt;
   *)&lt;br /&gt;
         echo &amp;quot;Usage: $0 {start|stop|status|restart}&amp;quot;&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
 &lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
Next is to make '''/etc/rc.d/rc.dhcpd''' executable, launch it from '''/etc/rc.d/rc.local''' and stop it from '''/etc/rc.d/rc.local_shutdown''' :&lt;br /&gt;
&lt;br /&gt;
 # chmod u+x rc.dhcpd&lt;br /&gt;
 . . .&lt;br /&gt;
 # start dhcpd&lt;br /&gt;
 if [ -x /etc/rc.d/rc.dhcpd ]; then&lt;br /&gt;
         /etc/rc.d/rc.dhcpd start&lt;br /&gt;
 fi&lt;br /&gt;
 . . .&lt;br /&gt;
 # stop dhcpd&lt;br /&gt;
 if [ -x /etc/rc.d/rc.dhcpd ]; then&lt;br /&gt;
     /etc/rc.d/rc.dhcpd stop&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
== Firewalling NFS ==&lt;br /&gt;
&lt;br /&gt;
Refer to [[IPTables]] for an introduction on packet filtering. NFS uses some random ports by defaults, that we need to fix if we want to be able to do proper packet filtering. To be precise, NFS uses sunrpc/111 and nfsd/2049, and random port numbers are used by other NFS daemons but it is possible to specify alternative port numbers on the command line or in the '''/etc/services''' file, to which we add :&lt;br /&gt;
&lt;br /&gt;
 rpc.nfs-cb      32764/tcp  # RPC nfs callback&lt;br /&gt;
 rpc.nfs-cb      32764/udp  # RPC nfs callback&lt;br /&gt;
 status          32765/udp  # NFS status (listen)&lt;br /&gt;
 status          32765/tcp  # NFS status (listen)&lt;br /&gt;
 status          32766/udp  # NFS status (send)&lt;br /&gt;
 status          32766/tcp  # NFS status (send)&lt;br /&gt;
 mountd          32767/udp  # NFS mountd&lt;br /&gt;
 mountd          32767/tcp  # NFS mountd&lt;br /&gt;
 lockd           32768/udp  # NFS lock daemon/manager&lt;br /&gt;
 lockd           32768/tcp  # NFS lock daemon/manager&lt;br /&gt;
 rquotad         32769/udp  # NFS rquotad&lt;br /&gt;
 rquotad         32769/tcp  # NFS rquotad&lt;br /&gt;
&lt;br /&gt;
The '''/etc/rc.d/rc.nfsd''' and '''/etc/rc.d/rc.rpc''' scripts are modified to specify port numbers on the command lines :&lt;br /&gt;
&lt;br /&gt;
 if [ -x /usr/sbin/rpc.rquotad ]; then&lt;br /&gt;
   echo &amp;quot;  /usr/sbin/rpc.rquotad '''-p 32769'''&amp;quot;&lt;br /&gt;
   /usr/sbin/rpc.rquotad '''-p 32769'''&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if [ -x /usr/sbin/rpc.mountd ]; then&lt;br /&gt;
   echo &amp;quot;  /usr/sbin/rpc.mountd '''-p 32767'''&amp;quot;&lt;br /&gt;
   /usr/sbin/rpc.mountd '''-p 32767'''&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if ! ps axc | grep -q rpc.statd ; then&lt;br /&gt;
   echo &amp;quot;Starting RPC NSM (Network Status Monitor):  /sbin/rpc.statd '''-p 32765 -o 32766'''&amp;quot;&lt;br /&gt;
   /sbin/rpc.statd '''-p 32765 -o 32766'''&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
To make the lock daemon listen on port '''32768''' only and set the nfs callback port to '''32764''' we need to create file '''/etc/sysctl.d/nfs.conf''' :&lt;br /&gt;
&lt;br /&gt;
 fs.nfs.nlm_udpport=32768&lt;br /&gt;
 fs.nfs.nlm_tcpport=32768&lt;br /&gt;
 fs.nfs.nfs_callback_tcpport=32764&lt;br /&gt;
&lt;br /&gt;
Last BOOTP and the NFS ports must be added to '''/etc/rc.d/rc.firewall''' :&lt;br /&gt;
 &lt;br /&gt;
 # BOOTP&lt;br /&gt;
 iptables -A INPUT -p udp -j ACCEPT --dport 69 -s 192.168.53.0/24&lt;br /&gt;
 &lt;br /&gt;
 # NFS ports&lt;br /&gt;
 iptables -A INPUT -p udp -j ACCEPT --dport 111 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 111 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
 iptables -A INPUT -p udp -j ACCEPT --dport 2049 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 2049 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
 iptables -A INPUT -p udp -j ACCEPT --dport 32764:32769 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 32764:32769 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
&lt;br /&gt;
== Slackware setup ==&lt;br /&gt;
&lt;br /&gt;
A few pieces of advice to make your Slackware setup from network easier :&lt;br /&gt;
&lt;br /&gt;
* For some reason Slackare might use an interface other than eth0. Just move the cable to the right slot or update (or remove) /etc/udev/rules.d/70-persistent-net.rules.&lt;br /&gt;
&lt;br /&gt;
* Slackware network setup uses NFS version 3 meaning that directory paths are absolute. For instance /var/pub/slackware64-15.0/slackware64.&lt;br /&gt;
&lt;br /&gt;
* The FTP directory paths are instead relative to the ftp user home directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Managing partitions]]|[[Main Page]]|[[Installing Slackware]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=DVDless_install&amp;diff=176</id>
		<title>DVDless install</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=DVDless_install&amp;diff=176"/>
				<updated>2026-03-26T20:44:57Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Firewalling NFS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
The (local) network is an additional choice to install Slackware from when your hardware has this capability. Installing from the local network is much faster than from a DVD and is a good choice when playing around with the installation. This page explains how to configure a Slackware server for this usage. It was inspired by the [http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:pxe AlienBob's blog page] on the same topic. To install Slackware over the network we need :&lt;br /&gt;
&lt;br /&gt;
* A service to download the Slackware files during the Slackware setup. HTTP, FTP, or NFS can be used. In the example below we show how to use the NFS and FTP services included with Slackware.&lt;br /&gt;
* A service implementing the TFTP protocol. TFTP is used to effectively download the bootstrap code from the server identified. We will use the TFTP protocol included with Slackware.&lt;br /&gt;
&lt;br /&gt;
* A service implementing the BOOTP protocol. BOOTP is used by the PXE firmware to identify on the network a server to download the bootloader code from. The DHCP server included with the Slackware distribution has this capability.&lt;br /&gt;
&lt;br /&gt;
== Configuring NFS ==&lt;br /&gt;
&lt;br /&gt;
NFS is SUN's Network File System. It is lightning fast and can be used as a mount point, but depending on configuration may be unsecure and must be used locally only. Also, it uses some random port numbers that need to be fixed if firewalling. The directories used are defined in '''/etc/exports'''. Edit as follows. '''ro''' means read-only, '''sync''' makes sure that no asynchronous requests are made, '''insecure''' affords using different NFS ports from other NFS implementations, '''all_squash''' maps all uids and gids to the anonymous user for public access, '''no_subtree_check''' improves reliability in some circumstances. See '''man exports''' for more details.&lt;br /&gt;
&lt;br /&gt;
 # See exports(5) for a description.&lt;br /&gt;
 # This file contains a list of all directories exported to other computers.&lt;br /&gt;
 # It is used by rpc.nfsd and rpc.mountd.&lt;br /&gt;
 &lt;br /&gt;
 /var/pub       192.168.53.1/24(ro,sync,insecure,all_squash,no_subtree_check)&lt;br /&gt;
&lt;br /&gt;
The NFS server is launched using '''/etc/rc.d/rc.nfsd'''. Make this script executable so as to use it on every boot. You can also '''start''' it to test it immediately. The NFS client is launched using '''/etc/rc.d/rc.rpc''' and affords using NFS mount points from other NFS servers. Make this script executable if you want to use it and have it started on every reboot. This can be handy to cross-test NFS machines. Otherwise it should not be necessary.&lt;br /&gt;
&lt;br /&gt;
 # chmod u+x /etc/rc.d/rc.nfsd&lt;br /&gt;
 # chmod u+x /etc/rc.d/rc.rpc&lt;br /&gt;
&lt;br /&gt;
== Configuring FTP ==&lt;br /&gt;
&lt;br /&gt;
As SSH affords encrypted authentication and transfers, FTP will be used on our site only for anonymous public downloads. FTP uses fixed port numbers so it is easy to firewall, but it is much slower than NFS. Slackware includes two FTPs : ProFTPd and vsFTP. We will use the latter. Using vsFTP requires very little configuration : setting the home directory of the ftp user to where we want our files to be downloaded from, uncommenting the correct '''ftp''' line in '''/etc/inetd.conf''' and '''/etc/rc.d/rc.inetd restart''', updating the firewall rules. For more details '''man vsftpd.conf'''.&lt;br /&gt;
 &lt;br /&gt;
 # usermod --home /var/pub ftp&lt;br /&gt;
 . . . &lt;br /&gt;
 # Very Secure File Transfer Protocol (FTP) server.&lt;br /&gt;
 ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  vsftpd&lt;br /&gt;
 . . .&lt;br /&gt;
 # /etc/rc.d/rc.inetd restart&lt;br /&gt;
 . . .&lt;br /&gt;
 # services on local network FTP BOOTP HTTP NNTP IMAP HTTPS SUBMIT VNC VOIP&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 20 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 21 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
&lt;br /&gt;
== Putting the Slackware install files online ==&lt;br /&gt;
&lt;br /&gt;
Copy the content of the slackware DVD to a disk directory, for instance '''/var/pub/slackware64-15.0'''&lt;br /&gt;
&lt;br /&gt;
 # mkdir /mnt/dvd&lt;br /&gt;
 # mkdir /var/pub/slackware64-15.0&lt;br /&gt;
 # mount -o loop slackware64-15.0-install-dvd.iso /mnt/dvd&lt;br /&gt;
 # cp -a /mnt/dvd/* /var/pub/slackware64-15.0/&lt;br /&gt;
 # umount /mnt/dvd&lt;br /&gt;
&lt;br /&gt;
During install, when asked for the source directory specify subdirectory '''slackware64''' that is, '''/var/pub/slackware64-15.0/slackware64'''&lt;br /&gt;
&lt;br /&gt;
The Slackware network setup uses NFS version 3 meaning that directory paths are absolute.&lt;br /&gt;
&lt;br /&gt;
== Configuring TFTPBOOT ==&lt;br /&gt;
&lt;br /&gt;
TFTP is the trivial ftp protocol (for use on a local network). Let's create the '''tftp bootp''' file structure under the default '''/tftpboot''' directory. The directory where we store the bootloader files is '''/tftpboot/slackware64-15.0''' :&lt;br /&gt;
&lt;br /&gt;
 # mkdir /tftpboot&lt;br /&gt;
 # mkdir /tftpboot/slackware64-15.0&lt;br /&gt;
 # mkdir /tftpboot/slackware64-15.0/pxelinux.cfg&lt;br /&gt;
 # cp /usr/share/syslinux/pxelinux.0 /tftpboot/slackware64-15.0/&lt;br /&gt;
 # cp /var/pub/slackware64-15.0/isolinux/message.txt /tftpboot/slackware64-15.0/&lt;br /&gt;
 # cp /var/pub/slackware64-15.0/isolinux/f2.txt /tftpboot/slackware64-15.0/&lt;br /&gt;
 # cp -a /var/pub/slackware64-15.0/kernels /tftpboot/slackware64-15.0/&lt;br /&gt;
 # cp /var/pub/slackware64-15.0/usb-and-pxe-installers/pxelinux.cfg_default /tftpboot/slackware64-15.0/pxelinux.cfg/default&lt;br /&gt;
 # cp /var/pub/slackware64-15.0/isolinux/initrd.img /tftpboot/slackware64-15.0/&lt;br /&gt;
&lt;br /&gt;
Tftpboot is handled by '''inetd'''. To activate it, uncomment the tftp line in '''/etc/inetd.conf''' then '''/etc/rc.d/rc.inetd restart''' or reboot.&lt;br /&gt;
&lt;br /&gt;
 tftp  dgram   udp     wait    root    /usr/sbin/in.tftpd  in.tftpd -s /tftpboot -r blksize&lt;br /&gt;
&lt;br /&gt;
== Configuring DHCP ==&lt;br /&gt;
&lt;br /&gt;
We configure '''/etc/dhcpd.conf''' as follows. Our subnet is '''192.168.53.0''', our network mask '''255.255.255.0''', our IP address is '''192.168.53.1''', our router address '''192.168.53.254'''. The IP DHCP range is '''192.168.53.154''' to '''192.168.53.253'''. For more details on other configuration possbilities, '''man dhcpd.conf'''.&lt;br /&gt;
&lt;br /&gt;
 # dhcpd.conf&lt;br /&gt;
 #&lt;br /&gt;
 # Configuration file for ISC dhcpd (see 'man dhcpd.conf')&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 # If this DHCP server is the official DHCP server for the local&lt;br /&gt;
 # network, the authoritative directive should be uncommented.&lt;br /&gt;
 authoritative;&lt;br /&gt;
 ddns-update-style none;&lt;br /&gt;
 &lt;br /&gt;
 # Allow bootp requests&lt;br /&gt;
 allow bootp;&lt;br /&gt;
 &lt;br /&gt;
 # Point to the TFTP server:&lt;br /&gt;
 next-server 192.168.53.1;&lt;br /&gt;
 &lt;br /&gt;
 # Default lease is 1 week (604800 sec.)&lt;br /&gt;
 default-lease-time 604800;&lt;br /&gt;
 # Max lease is 4 weeks (2419200 sec.)&lt;br /&gt;
 max-lease-time 2419200;&lt;br /&gt;
 &lt;br /&gt;
 subnet 192.168.53.0 netmask 255.255.255.0 {&lt;br /&gt;
     option domain-name &amp;quot;studioware.com&amp;quot;;&lt;br /&gt;
     option broadcast-address 192.168.53.255;&lt;br /&gt;
     option subnet-mask 255.255.255.0;&lt;br /&gt;
     option domain-name-servers 192.168.53.1;&lt;br /&gt;
     option routers 192.168.53.254;&lt;br /&gt;
     range dynamic-bootp 192.168.53.154 192.168.53.253;&lt;br /&gt;
     use-host-decl-names on;&lt;br /&gt;
     if substring (option vendor-class-identifier, 0, 9) = &amp;quot;PXEClient&amp;quot; {&lt;br /&gt;
       filename &amp;quot;/slackware64-15.0/pxelinux.0&amp;quot;;&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Next is to create a script '''/etc/rc.d/rc.dhcpd''' to launch dhcp. Our bridged interface is '''br0''' :&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # /etc/rc.d/rc.dhcpd&lt;br /&gt;
 #      This shell script takes care of starting and stopping&lt;br /&gt;
 #      the ISC DHCPD service&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 # Put the command line options here that you want to pass to dhcpd:&lt;br /&gt;
 DHCPD_OPTIONS=&amp;quot;-q '''br0'''&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [ -x /usr/sbin/dhcpd ] || exit 0&lt;br /&gt;
 &lt;br /&gt;
 [ -f /etc/dhcpd.conf ] || exit 0&lt;br /&gt;
 &lt;br /&gt;
 start() {&lt;br /&gt;
       # Start daemons.&lt;br /&gt;
       echo -n &amp;quot;Starting dhcpd:  /usr/sbin/dhcpd $DHCPD_OPTIONS &amp;quot;&lt;br /&gt;
       /usr/sbin/dhcpd $DHCPD_OPTIONS&lt;br /&gt;
       echo&lt;br /&gt;
 }&lt;br /&gt;
 stop() {&lt;br /&gt;
       # Stop daemons.&lt;br /&gt;
       echo -n &amp;quot;Shutting down dhcpd: &amp;quot;&lt;br /&gt;
       killall -TERM dhcpd&lt;br /&gt;
       echo&lt;br /&gt;
 }&lt;br /&gt;
 status() {&lt;br /&gt;
   PIDS=$(pidof dhcpd)&lt;br /&gt;
   if [ &amp;quot;$PIDS&amp;quot; == &amp;quot;&amp;quot; ]; then&lt;br /&gt;
     echo &amp;quot;dhcpd is not running!&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     echo &amp;quot;dhcpd is running at pid(s) ${PIDS}.&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
 }&lt;br /&gt;
 restart() {&lt;br /&gt;
       stop&lt;br /&gt;
       start&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 # See how we were called.&lt;br /&gt;
 case &amp;quot;$1&amp;quot; in&lt;br /&gt;
   start)&lt;br /&gt;
         start&lt;br /&gt;
         ;;&lt;br /&gt;
   stop)&lt;br /&gt;
         stop&lt;br /&gt;
         ;;&lt;br /&gt;
   restart)&lt;br /&gt;
         stop&lt;br /&gt;
         start&lt;br /&gt;
         ;;&lt;br /&gt;
   status)&lt;br /&gt;
         status&lt;br /&gt;
         ;;&lt;br /&gt;
   *)&lt;br /&gt;
         echo &amp;quot;Usage: $0 {start|stop|status|restart}&amp;quot;&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
 &lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
Next is to make '''/etc/rc.d/rc.dhcpd''' executable, launch it from '''/etc/rc.d/rc.local''' and stop it from '''/etc/rc.d/rc.local_shutdown''' :&lt;br /&gt;
&lt;br /&gt;
 # chmod u+x rc.dhcpd&lt;br /&gt;
 . . .&lt;br /&gt;
 # start dhcpd&lt;br /&gt;
 if [ -x /etc/rc.d/rc.dhcpd ]; then&lt;br /&gt;
         /etc/rc.d/rc.dhcpd start&lt;br /&gt;
 fi&lt;br /&gt;
 . . .&lt;br /&gt;
 # stop dhcpd&lt;br /&gt;
 if [ -x /etc/rc.d/rc.dhcpd ]; then&lt;br /&gt;
     /etc/rc.d/rc.dhcpd stop&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
== Firewalling NFS ==&lt;br /&gt;
&lt;br /&gt;
Refer to [[IPTables]] for an introduction on packet filtering. NFS uses some random ports by defaults, that we need to fix if we want to be able to do proper packet filtering. To be precise, NFS uses sunrpc/111 and nfsd/2049, and random port numbers are used by other NFS daemons but it is possible to specify alternative port numbers on the command line or in the '''/etc/services''' file, to which we add :&lt;br /&gt;
&lt;br /&gt;
 rpc.nfs-cb      32764/tcp  # RPC nfs callback&lt;br /&gt;
 rpc.nfs-cb      32764/udp  # RPC nfs callback&lt;br /&gt;
 status          32765/udp  # NFS status (listen)&lt;br /&gt;
 status          32765/tcp  # NFS status (listen)&lt;br /&gt;
 status          32766/udp  # NFS status (send)&lt;br /&gt;
 status          32766/tcp  # NFS status (send)&lt;br /&gt;
 mountd          32767/udp  # NFS mountd&lt;br /&gt;
 mountd          32767/tcp  # NFS mountd&lt;br /&gt;
 lockd           32768/udp  # NFS lock daemon/manager&lt;br /&gt;
 lockd           32768/tcp  # NFS lock daemon/manager&lt;br /&gt;
 rquotad         32769/udp  # NFS rquotad&lt;br /&gt;
 rquotad         32769/tcp  # NFS rquotad&lt;br /&gt;
&lt;br /&gt;
The '''/etc/rc.d/rc.nfsd''' and '''/etc/rc.d/rc.rpc''' scripts are modified to specify port numbers on the command lines :&lt;br /&gt;
&lt;br /&gt;
 if [ -x /usr/sbin/rpc.rquotad ]; then&lt;br /&gt;
   echo &amp;quot;  /usr/sbin/rpc.rquotad '''-p 32769'''&amp;quot;&lt;br /&gt;
   /usr/sbin/rpc.rquotad '''-p 32769'''&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if [ -x /usr/sbin/rpc.mountd ]; then&lt;br /&gt;
   echo &amp;quot;  /usr/sbin/rpc.mountd '''-p 32767'''&amp;quot;&lt;br /&gt;
   /usr/sbin/rpc.mountd '''-p 32767'''&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if ! ps axc | grep -q rpc.statd ; then&lt;br /&gt;
   echo &amp;quot;Starting RPC NSM (Network Status Monitor):  /sbin/rpc.statd '''-p 32765 -o 32766'''&amp;quot;&lt;br /&gt;
   /sbin/rpc.statd '''-p 32765 -o 32766'''&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
To make the lock daemon listen on port '''32768''' only and set the nfs callback port to '''32764''' we need to create file '''/etc/sysctl.d/nfs.conf''' :&lt;br /&gt;
&lt;br /&gt;
 fs.nfs.nlm_udpport=32768&lt;br /&gt;
 fs.nfs.nlm_tcpport=32768&lt;br /&gt;
 fs.nfs.nfs_callback_tcpport=32764&lt;br /&gt;
&lt;br /&gt;
Last BOOTP and the NFS ports must be added to '''/etc/rc.d/rc.firewall''' :&lt;br /&gt;
 &lt;br /&gt;
 # BOOTP&lt;br /&gt;
 iptables -A INPUT -p udp -j ACCEPT --dport 69 -s 192.168.53.0/24&lt;br /&gt;
 &lt;br /&gt;
 # NFS ports&lt;br /&gt;
 iptables -A INPUT -p udp -j ACCEPT --dport 111 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 111 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
 iptables -A INPUT -p udp -j ACCEPT --dport 2049 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 2049 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
 iptables -A INPUT -p udp -j ACCEPT --dport 32764:32769 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 32764:32769 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
&lt;br /&gt;
== Slackware setup ==&lt;br /&gt;
&lt;br /&gt;
A few pieces of advice to make your Slackware setup from network easier :&lt;br /&gt;
&lt;br /&gt;
* For some reason Slackare might use an interface other than eth0. Just move the cable to the right slot or update (or remove) /etc/udev/rules.d/70-persistent-net.rules.&lt;br /&gt;
&lt;br /&gt;
* Slackware network setup uses NFS version 3 meaning that directory paths are absolute. For instance /var/pub/slackware64-14.2/slackware64.&lt;br /&gt;
&lt;br /&gt;
* The FTP directory paths are instead relative to the ftp user home directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Managing partitions]]|[[Main Page]]|[[Installing Slackware]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=DVDless_install&amp;diff=175</id>
		<title>DVDless install</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=DVDless_install&amp;diff=175"/>
				<updated>2026-03-26T20:18:57Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Configuring FTP */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
The (local) network is an additional choice to install Slackware from when your hardware has this capability. Installing from the local network is much faster than from a DVD and is a good choice when playing around with the installation. This page explains how to configure a Slackware server for this usage. It was inspired by the [http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:pxe AlienBob's blog page] on the same topic. To install Slackware over the network we need :&lt;br /&gt;
&lt;br /&gt;
* A service to download the Slackware files during the Slackware setup. HTTP, FTP, or NFS can be used. In the example below we show how to use the NFS and FTP services included with Slackware.&lt;br /&gt;
* A service implementing the TFTP protocol. TFTP is used to effectively download the bootstrap code from the server identified. We will use the TFTP protocol included with Slackware.&lt;br /&gt;
&lt;br /&gt;
* A service implementing the BOOTP protocol. BOOTP is used by the PXE firmware to identify on the network a server to download the bootloader code from. The DHCP server included with the Slackware distribution has this capability.&lt;br /&gt;
&lt;br /&gt;
== Configuring NFS ==&lt;br /&gt;
&lt;br /&gt;
NFS is SUN's Network File System. It is lightning fast and can be used as a mount point, but depending on configuration may be unsecure and must be used locally only. Also, it uses some random port numbers that need to be fixed if firewalling. The directories used are defined in '''/etc/exports'''. Edit as follows. '''ro''' means read-only, '''sync''' makes sure that no asynchronous requests are made, '''insecure''' affords using different NFS ports from other NFS implementations, '''all_squash''' maps all uids and gids to the anonymous user for public access, '''no_subtree_check''' improves reliability in some circumstances. See '''man exports''' for more details.&lt;br /&gt;
&lt;br /&gt;
 # See exports(5) for a description.&lt;br /&gt;
 # This file contains a list of all directories exported to other computers.&lt;br /&gt;
 # It is used by rpc.nfsd and rpc.mountd.&lt;br /&gt;
 &lt;br /&gt;
 /var/pub       192.168.53.1/24(ro,sync,insecure,all_squash,no_subtree_check)&lt;br /&gt;
&lt;br /&gt;
The NFS server is launched using '''/etc/rc.d/rc.nfsd'''. Make this script executable so as to use it on every boot. You can also '''start''' it to test it immediately. The NFS client is launched using '''/etc/rc.d/rc.rpc''' and affords using NFS mount points from other NFS servers. Make this script executable if you want to use it and have it started on every reboot. This can be handy to cross-test NFS machines. Otherwise it should not be necessary.&lt;br /&gt;
&lt;br /&gt;
 # chmod u+x /etc/rc.d/rc.nfsd&lt;br /&gt;
 # chmod u+x /etc/rc.d/rc.rpc&lt;br /&gt;
&lt;br /&gt;
== Configuring FTP ==&lt;br /&gt;
&lt;br /&gt;
As SSH affords encrypted authentication and transfers, FTP will be used on our site only for anonymous public downloads. FTP uses fixed port numbers so it is easy to firewall, but it is much slower than NFS. Slackware includes two FTPs : ProFTPd and vsFTP. We will use the latter. Using vsFTP requires very little configuration : setting the home directory of the ftp user to where we want our files to be downloaded from, uncommenting the correct '''ftp''' line in '''/etc/inetd.conf''' and '''/etc/rc.d/rc.inetd restart''', updating the firewall rules. For more details '''man vsftpd.conf'''.&lt;br /&gt;
 &lt;br /&gt;
 # usermod --home /var/pub ftp&lt;br /&gt;
 . . . &lt;br /&gt;
 # Very Secure File Transfer Protocol (FTP) server.&lt;br /&gt;
 ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  vsftpd&lt;br /&gt;
 . . .&lt;br /&gt;
 # /etc/rc.d/rc.inetd restart&lt;br /&gt;
 . . .&lt;br /&gt;
 # services on local network FTP BOOTP HTTP NNTP IMAP HTTPS SUBMIT VNC VOIP&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 20 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 21 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
&lt;br /&gt;
== Putting the Slackware install files online ==&lt;br /&gt;
&lt;br /&gt;
Copy the content of the slackware DVD to a disk directory, for instance '''/var/pub/slackware64-15.0'''&lt;br /&gt;
&lt;br /&gt;
 # mkdir /mnt/dvd&lt;br /&gt;
 # mkdir /var/pub/slackware64-15.0&lt;br /&gt;
 # mount -o loop slackware64-15.0-install-dvd.iso /mnt/dvd&lt;br /&gt;
 # cp -a /mnt/dvd/* /var/pub/slackware64-15.0/&lt;br /&gt;
 # umount /mnt/dvd&lt;br /&gt;
&lt;br /&gt;
During install, when asked for the source directory specify subdirectory '''slackware64''' that is, '''/var/pub/slackware64-15.0/slackware64'''&lt;br /&gt;
&lt;br /&gt;
The Slackware network setup uses NFS version 3 meaning that directory paths are absolute.&lt;br /&gt;
&lt;br /&gt;
== Configuring TFTPBOOT ==&lt;br /&gt;
&lt;br /&gt;
TFTP is the trivial ftp protocol (for use on a local network). Let's create the '''tftp bootp''' file structure under the default '''/tftpboot''' directory. The directory where we store the bootloader files is '''/tftpboot/slackware64-15.0''' :&lt;br /&gt;
&lt;br /&gt;
 # mkdir /tftpboot&lt;br /&gt;
 # mkdir /tftpboot/slackware64-15.0&lt;br /&gt;
 # mkdir /tftpboot/slackware64-15.0/pxelinux.cfg&lt;br /&gt;
 # cp /usr/share/syslinux/pxelinux.0 /tftpboot/slackware64-15.0/&lt;br /&gt;
 # cp /var/pub/slackware64-15.0/isolinux/message.txt /tftpboot/slackware64-15.0/&lt;br /&gt;
 # cp /var/pub/slackware64-15.0/isolinux/f2.txt /tftpboot/slackware64-15.0/&lt;br /&gt;
 # cp -a /var/pub/slackware64-15.0/kernels /tftpboot/slackware64-15.0/&lt;br /&gt;
 # cp /var/pub/slackware64-15.0/usb-and-pxe-installers/pxelinux.cfg_default /tftpboot/slackware64-15.0/pxelinux.cfg/default&lt;br /&gt;
 # cp /var/pub/slackware64-15.0/isolinux/initrd.img /tftpboot/slackware64-15.0/&lt;br /&gt;
&lt;br /&gt;
Tftpboot is handled by '''inetd'''. To activate it, uncomment the tftp line in '''/etc/inetd.conf''' then '''/etc/rc.d/rc.inetd restart''' or reboot.&lt;br /&gt;
&lt;br /&gt;
 tftp  dgram   udp     wait    root    /usr/sbin/in.tftpd  in.tftpd -s /tftpboot -r blksize&lt;br /&gt;
&lt;br /&gt;
== Configuring DHCP ==&lt;br /&gt;
&lt;br /&gt;
We configure '''/etc/dhcpd.conf''' as follows. Our subnet is '''192.168.53.0''', our network mask '''255.255.255.0''', our IP address is '''192.168.53.1''', our router address '''192.168.53.254'''. The IP DHCP range is '''192.168.53.154''' to '''192.168.53.253'''. For more details on other configuration possbilities, '''man dhcpd.conf'''.&lt;br /&gt;
&lt;br /&gt;
 # dhcpd.conf&lt;br /&gt;
 #&lt;br /&gt;
 # Configuration file for ISC dhcpd (see 'man dhcpd.conf')&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 # If this DHCP server is the official DHCP server for the local&lt;br /&gt;
 # network, the authoritative directive should be uncommented.&lt;br /&gt;
 authoritative;&lt;br /&gt;
 ddns-update-style none;&lt;br /&gt;
 &lt;br /&gt;
 # Allow bootp requests&lt;br /&gt;
 allow bootp;&lt;br /&gt;
 &lt;br /&gt;
 # Point to the TFTP server:&lt;br /&gt;
 next-server 192.168.53.1;&lt;br /&gt;
 &lt;br /&gt;
 # Default lease is 1 week (604800 sec.)&lt;br /&gt;
 default-lease-time 604800;&lt;br /&gt;
 # Max lease is 4 weeks (2419200 sec.)&lt;br /&gt;
 max-lease-time 2419200;&lt;br /&gt;
 &lt;br /&gt;
 subnet 192.168.53.0 netmask 255.255.255.0 {&lt;br /&gt;
     option domain-name &amp;quot;studioware.com&amp;quot;;&lt;br /&gt;
     option broadcast-address 192.168.53.255;&lt;br /&gt;
     option subnet-mask 255.255.255.0;&lt;br /&gt;
     option domain-name-servers 192.168.53.1;&lt;br /&gt;
     option routers 192.168.53.254;&lt;br /&gt;
     range dynamic-bootp 192.168.53.154 192.168.53.253;&lt;br /&gt;
     use-host-decl-names on;&lt;br /&gt;
     if substring (option vendor-class-identifier, 0, 9) = &amp;quot;PXEClient&amp;quot; {&lt;br /&gt;
       filename &amp;quot;/slackware64-15.0/pxelinux.0&amp;quot;;&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Next is to create a script '''/etc/rc.d/rc.dhcpd''' to launch dhcp. Our bridged interface is '''br0''' :&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # /etc/rc.d/rc.dhcpd&lt;br /&gt;
 #      This shell script takes care of starting and stopping&lt;br /&gt;
 #      the ISC DHCPD service&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 # Put the command line options here that you want to pass to dhcpd:&lt;br /&gt;
 DHCPD_OPTIONS=&amp;quot;-q '''br0'''&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [ -x /usr/sbin/dhcpd ] || exit 0&lt;br /&gt;
 &lt;br /&gt;
 [ -f /etc/dhcpd.conf ] || exit 0&lt;br /&gt;
 &lt;br /&gt;
 start() {&lt;br /&gt;
       # Start daemons.&lt;br /&gt;
       echo -n &amp;quot;Starting dhcpd:  /usr/sbin/dhcpd $DHCPD_OPTIONS &amp;quot;&lt;br /&gt;
       /usr/sbin/dhcpd $DHCPD_OPTIONS&lt;br /&gt;
       echo&lt;br /&gt;
 }&lt;br /&gt;
 stop() {&lt;br /&gt;
       # Stop daemons.&lt;br /&gt;
       echo -n &amp;quot;Shutting down dhcpd: &amp;quot;&lt;br /&gt;
       killall -TERM dhcpd&lt;br /&gt;
       echo&lt;br /&gt;
 }&lt;br /&gt;
 status() {&lt;br /&gt;
   PIDS=$(pidof dhcpd)&lt;br /&gt;
   if [ &amp;quot;$PIDS&amp;quot; == &amp;quot;&amp;quot; ]; then&lt;br /&gt;
     echo &amp;quot;dhcpd is not running!&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     echo &amp;quot;dhcpd is running at pid(s) ${PIDS}.&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
 }&lt;br /&gt;
 restart() {&lt;br /&gt;
       stop&lt;br /&gt;
       start&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 # See how we were called.&lt;br /&gt;
 case &amp;quot;$1&amp;quot; in&lt;br /&gt;
   start)&lt;br /&gt;
         start&lt;br /&gt;
         ;;&lt;br /&gt;
   stop)&lt;br /&gt;
         stop&lt;br /&gt;
         ;;&lt;br /&gt;
   restart)&lt;br /&gt;
         stop&lt;br /&gt;
         start&lt;br /&gt;
         ;;&lt;br /&gt;
   status)&lt;br /&gt;
         status&lt;br /&gt;
         ;;&lt;br /&gt;
   *)&lt;br /&gt;
         echo &amp;quot;Usage: $0 {start|stop|status|restart}&amp;quot;&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
 &lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
Next is to make '''/etc/rc.d/rc.dhcpd''' executable, launch it from '''/etc/rc.d/rc.local''' and stop it from '''/etc/rc.d/rc.local_shutdown''' :&lt;br /&gt;
&lt;br /&gt;
 # chmod u+x rc.dhcpd&lt;br /&gt;
 . . .&lt;br /&gt;
 # start dhcpd&lt;br /&gt;
 if [ -x /etc/rc.d/rc.dhcpd ]; then&lt;br /&gt;
         /etc/rc.d/rc.dhcpd start&lt;br /&gt;
 fi&lt;br /&gt;
 . . .&lt;br /&gt;
 # stop dhcpd&lt;br /&gt;
 if [ -x /etc/rc.d/rc.dhcpd ]; then&lt;br /&gt;
     /etc/rc.d/rc.dhcpd stop&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
== Firewalling NFS ==&lt;br /&gt;
&lt;br /&gt;
Refer to [[IPTables]] for an introduction on packet filtering. NFS uses some random ports by defaults, that we need to fix if we want to be able to do proper packet filtering. To be precise, NFS uses sunrpc/111 and nfsd/2049, and random port numbers are used by other NFS daemons but it is possible to specify alternative port numbers on the command line or in the '''/etc/services''' file, to which we add :&lt;br /&gt;
&lt;br /&gt;
 rpc.nfs-cb      32764/tcp  # RPC nfs callback&lt;br /&gt;
 rpc.nfs-cb      32764/udp  # RPC nfs callback&lt;br /&gt;
 status          32765/udp  # NFS status (listen)&lt;br /&gt;
 status          32765/tcp  # NFS status (listen)&lt;br /&gt;
 status          32766/udp  # NFS status (send)&lt;br /&gt;
 status          32766/tcp  # NFS status (send)&lt;br /&gt;
 mountd          32767/udp  # NFS mountd&lt;br /&gt;
 mountd          32767/tcp  # NFS mountd&lt;br /&gt;
 lockd           32768/udp  # NFS lock daemon/manager&lt;br /&gt;
 lockd           32768/tcp  # NFS lock daemon/manager&lt;br /&gt;
 rquotad         32769/udp  # NFS rquotad&lt;br /&gt;
 rquotad         32769/tcp  # NFS rquotad&lt;br /&gt;
&lt;br /&gt;
The '''/etc/rc.d/rc.nfsd''' and '''/etc/rc.d/rc.rpc''' scripts are modified to specify port numbers on the command lines :&lt;br /&gt;
&lt;br /&gt;
 if [ -x /usr/sbin/rpc.rquotad ]; then&lt;br /&gt;
   echo &amp;quot;  /usr/sbin/rpc.rquotad '''-p 32769'''&amp;quot;&lt;br /&gt;
   /usr/sbin/rpc.rquotad '''-p 32769'''&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if [ -x /usr/sbin/rpc.mountd ]; then&lt;br /&gt;
   echo &amp;quot;  /usr/sbin/rpc.mountd '''-p 32767'''&amp;quot;&lt;br /&gt;
   /usr/sbin/rpc.mountd '''-p 32767'''&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if ! ps axc | grep -q rpc.statd ; then&lt;br /&gt;
   echo &amp;quot;Starting RPC NSM (Network Status Monitor):  /sbin/rpc.statd '''-p 32765 -o 32766'''&amp;quot;&lt;br /&gt;
   /sbin/rpc.statd '''-p 32765 -o 32766'''&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
To make the lock daemon listen on port '''32768''' only and set the nfs callback port to '''32764''' we need to create file '''/etc/sysctl.d/nfs.conf''' :&lt;br /&gt;
&lt;br /&gt;
 fs.nfs.nlm_udpport=32768&lt;br /&gt;
 fs.nfs.nlm_tcpport=32768&lt;br /&gt;
 fs.nfs.nfs_callback_tcpport=32764&lt;br /&gt;
&lt;br /&gt;
Last BOOTP and the NFS ports must be added to '''/etc/rc.d/rc.firewall''' :&lt;br /&gt;
 &lt;br /&gt;
 # BOOTP&lt;br /&gt;
 iptables -A INPUT -p udp -j ACCEPT --dport 69 -s 192.168.0.0/16&lt;br /&gt;
 &lt;br /&gt;
 # NFS ports&lt;br /&gt;
 iptables -A INPUT -p udp -j ACCEPT --dport 111 -s 192.168.0.0/16&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 111 -m state --state NEW -s 192.168.0.0/16&lt;br /&gt;
 iptables -A INPUT -p udp -j ACCEPT --dport 2049 -s 192.168.0.0/16&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 2049 -m state --state NEW -s 192.168.0.0/16&lt;br /&gt;
 iptables -A INPUT -p udp -j ACCEPT --dport 32764 -s 192.168.0.0/16&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 32764 -m state --state NEW -s 192.168.0.0/16&lt;br /&gt;
 iptables -A INPUT -p udp -j ACCEPT --dport 32765 -s 192.168.0.0/16&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 32765 -m state --state NEW -s 192.168.0.0/16&lt;br /&gt;
 iptables -A INPUT -p udp -j ACCEPT --dport 32766 -s 192.168.0.0/16&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 32766 -m state --state NEW -s 192.168.0.0/16&lt;br /&gt;
 iptables -A INPUT -p udp -j ACCEPT --dport 32767 -s 192.168.0.0/16&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 32767 -m state --state NEW -s 192.168.0.0/16&lt;br /&gt;
 iptables -A INPUT -p udp -j ACCEPT --dport 32768 -s 192.168.0.0/16&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 32768 -m state --state NEW -s 192.168.0.0/16&lt;br /&gt;
 iptables -A INPUT -p udp -j ACCEPT --dport 32769 -s 192.168.0.0/16&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 32769 -m state --state NEW -s 192.168.0.0/16&lt;br /&gt;
&lt;br /&gt;
== Slackware setup ==&lt;br /&gt;
&lt;br /&gt;
A few pieces of advice to make your Slackware setup from network easier :&lt;br /&gt;
&lt;br /&gt;
* For some reason Slackare might use an interface other than eth0. Just move the cable to the right slot or update (or remove) /etc/udev/rules.d/70-persistent-net.rules.&lt;br /&gt;
&lt;br /&gt;
* Slackware network setup uses NFS version 3 meaning that directory paths are absolute. For instance /var/pub/slackware64-14.2/slackware64.&lt;br /&gt;
&lt;br /&gt;
* The FTP directory paths are instead relative to the ftp user home directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Managing partitions]]|[[Main Page]]|[[Installing Slackware]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=IPTables&amp;diff=174</id>
		<title>IPTables</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=IPTables&amp;diff=174"/>
				<updated>2026-03-26T11:22:48Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Iptables Filtering */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
Packet filtering affords opening access only to these services you have decided to open. The TCP or UDP packets include a piece of information called the port number, that is used to identify the type of service. Secure ports were defined as SSL counterparts of the native ports but were superseded by [https://en.wikipedia.org/wiki/Transport_Layer_Security TLS] and are now deprecated due to security weaknesses in the SSL protocol. SSL should not be used any longer. Instead, use TLS. Current version is v1.2.&lt;br /&gt;
&lt;br /&gt;
{| {{thead}}&lt;br /&gt;
|-&lt;br /&gt;
! {{chead}} width=&amp;quot;100&amp;quot; | Protocol&lt;br /&gt;
! {{chead}} | Port #&lt;br /&gt;
! {{chead}} | Secure Protocol&lt;br /&gt;
! {{chead}} | Secure Port #&lt;br /&gt;
! {{chead}} | Service&lt;br /&gt;
|-&lt;br /&gt;
|SMTP||25||SMTPS||465||Mail exchange&lt;br /&gt;
|-&lt;br /&gt;
|HTTP||80||HTTPS||443||Web browsing&lt;br /&gt;
|-&lt;br /&gt;
|POP3||110||POP3S||995||Mail retrieval&lt;br /&gt;
|-&lt;br /&gt;
|NTTP||119||NTTPS||563||News exchange&lt;br /&gt;
|-&lt;br /&gt;
|IMAP||143||IMAPS||993||Mail retrieval&lt;br /&gt;
|-&lt;br /&gt;
|LDAP||389||LDAPS||636||Ldap Directory&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On server side, the services are provided by applications that may have vulnerabilities and be attacked. Examples of attacks are buffer overflow or format string attacks, that afford getting full access on the target machine by crafting special strings sent to it. An attacker could then obtain any information present there or modify or destroy the system.&lt;br /&gt;
&lt;br /&gt;
To reduce the number of possible attacks, the number of services authorized, or who can access the system, must be restricted. This is known as packet filtering. It is only an aspect of security (obviously, the applications on the server side must also be secured ...), but it is important. &amp;lt;u&amp;gt;Never *** ever *** connect to the network a computer not protected by a packet filter !&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To illustrate, let's configure our two-interfaces computer to be its own firewall. '''eth0''' is the Internet interface, it uses network 192.168.0.x, the gateway is an ADSL router/switch at 192.168.0.254. '''eth1''' is the (Intranet) interface to the internal network 192.168.1.x.&lt;br /&gt;
&lt;br /&gt;
== Iptables Filtering ==&lt;br /&gt;
&lt;br /&gt;
Since Linux 2.4, packet filtering is effected inside the kernel, and configuration effected by the '''iptables''' user-space program. In addition to rules for incoming and outgoing packets, iptables affords defining rules for routing between the interfaces. The '''iptables''' command affords entering the rules '''one by one'''. Using a script affords entering all the rules. '''iptable -L -v''' affords viewing the current rules.&lt;br /&gt;
&lt;br /&gt;
For more information, see the [http://www.netfilter.org/ netfilter] official site. This site has links to various documents, including a simple introduction to packet filtering in this [http://www.netfilter.org/documentation/HOWTO/packet-filtering-HOWTO.html HOWTO].&lt;br /&gt;
&lt;br /&gt;
In Slackware, the script used is &amp;lt;tt&amp;gt;'''/etc/rc.d/rc.firewall'''&amp;lt;/tt&amp;gt;. It is called  automatically when the system starts or stops, using commands &amp;lt;tt&amp;gt;'''./rc.firewall start'''&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;'''./rc.firewall stop'''&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 #! /bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # startup script for local packet filter&lt;br /&gt;
 #&lt;br /&gt;
 fw_start () {&lt;br /&gt;
 echo &amp;quot;Loading packet filter rules&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The flush command affords deleting all the active nat and filtering rules:&lt;br /&gt;
&lt;br /&gt;
 # flush old rules&lt;br /&gt;
 iptables -t nat --flush&lt;br /&gt;
 iptables -flush&lt;br /&gt;
&lt;br /&gt;
The -P option affords defining the default policy. A good practise is to forbid by default everything not authorized. This is done here for packets incoming, outgoing, and routed between the interfaces:&lt;br /&gt;
&lt;br /&gt;
 # drop by default&lt;br /&gt;
 iptables -P INPUT DROP&lt;br /&gt;
 iptables -P FORWARD DROP&lt;br /&gt;
 iptables -P OUTPUT DROP&lt;br /&gt;
&lt;br /&gt;
Connections already established are authorized to continue:&lt;br /&gt;
&lt;br /&gt;
 # accept packets that are part of previously OK'ed sessions&lt;br /&gt;
 iptables -A INPUT -j ACCEPT -m conntrack --ctstate ESTABLISHED,RELATED&lt;br /&gt;
 iptables -A OUTPUT -j ACCEPT -m conntrack --ctstate ESTABLISHED,RELATED&lt;br /&gt;
 iptables -A FORWARD -j ACCEPT -m conntrack --ctstate ESTABLISHED,RELATED &lt;br /&gt;
&lt;br /&gt;
The -A option affords adding a rule. Here all the packets on the loopback interface are accepted:&lt;br /&gt;
&lt;br /&gt;
 # INBOUND POLICY&lt;br /&gt;
 &lt;br /&gt;
 # pass all traffic for network 127.0.0.0/8 on loopback interface&lt;br /&gt;
 iptables -A INPUT -i lo -s 127.0.0.0/8 -d 127.0.0.0/8 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
Addresses of RFC 1918 private networks are not routable on the Internet. So packets with such addresses are not expected on the internal network. However as anti-spoofing is ensured by Internet box we do not need to introduce anti-spoofing rules here:&lt;br /&gt;
 &lt;br /&gt;
 # anti-spoofing done by Internet box so not needed here&lt;br /&gt;
 # iptables -A INPUT -s 10.0.0.0/8 -j LOG --log-prefix &amp;quot;INPUT spoofed IP &amp;quot;&lt;br /&gt;
 # iptables -A INPUT -s 10.0.0.0/8 -j DROP&lt;br /&gt;
 # . . .&lt;br /&gt;
&lt;br /&gt;
The protocols corresponding to services offered or used externally are accepted:&lt;br /&gt;
&lt;br /&gt;
 # services SMTP HTTP HTTPS&lt;br /&gt;
 # iptables -A INPUT -p tcp -j ACCEPT --dport 25 -m conntrack --ctstate NEW&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 80 -m conntrack --ctstate NEW&lt;br /&gt;
 # iptables -A INPUT -p tcp -j ACCEPT --dport 143 -m conntrack --ctstate NEW&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 443 -m conntrack --ctstate NEW&lt;br /&gt;
&lt;br /&gt;
The protocols corresponding to services offered on the local network are accepted:&lt;br /&gt;
&lt;br /&gt;
  # services on local network FTP DNS BOOTP NNTP SUBMIT VNC&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 20 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 21 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 53 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 53 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 69 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 119 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 587 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  # iptables -A INPUT -p tcp -j ACCEPT --dport 5900:5912 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
&lt;br /&gt;
We accept X-Window traffic on the local network:&lt;br /&gt;
&lt;br /&gt;
  # SSH-tunnelled X-Window output appears as input on interface lo&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 177 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 6000:6063 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -i lo -p tcp -j ACCEPT --dport 6000:6063 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
&lt;br /&gt;
We accept NFS on the local network and fix the NFS ports:&lt;br /&gt;
&lt;br /&gt;
  # NFS ports&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 111 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 111 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 2049 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 2049 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 32764:32769 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 32764:32769 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
&lt;br /&gt;
We accept samba traffic on the local network:&lt;br /&gt;
&lt;br /&gt;
  # samba ports&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 135 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 135 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 137 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 137 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 138 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 139 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 445 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 445 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
&lt;br /&gt;
Broadcast traffic is also OK:&lt;br /&gt;
&lt;br /&gt;
  # broadcast traffic&lt;br /&gt;
  iptables -A INPUT -p udp -s 0.0.0.0 -sport 67:68 -d 255.255.255.255 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
We accept pings on the local network:&lt;br /&gt;
&lt;br /&gt;
  # accept some icmp packets&lt;br /&gt;
  iptables -A INPUT -p icmp --icmp-type echo-request -s 192.168.53.0/24 -j ACCEPT&lt;br /&gt;
  iptables -A INPUT -p icmp --icmp-type destination-unreachable -j ACCEPT&lt;br /&gt;
  iptables -A INPUT -p icmp --icmp-type time-exceeded -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
We could log anything not accepted above:&lt;br /&gt;
&lt;br /&gt;
 # log anything not accepted above&lt;br /&gt;
 # iptables -A INPUT -j LOG --log-prefix &amp;quot;INPUT bad traffic &amp;quot;&lt;br /&gt;
&lt;br /&gt;
We accept all outbound packets, which would for example afford using a network scanner. In a production environment, there would be a stricter policy:&lt;br /&gt;
&lt;br /&gt;
 # OUTBOUND POLICY&lt;br /&gt;
 &lt;br /&gt;
 # accept all outbound packets&lt;br /&gt;
 iptables -A OUTPUT -j ACCEPT&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
After the fw_start() function ends, the fw_stop() function is defined to authorize everything:&lt;br /&gt;
&lt;br /&gt;
 fw_stop () {&lt;br /&gt;
   echo &amp;quot;Unloading all packet filter rules&amp;quot;&lt;br /&gt;
   iptables -t nat --flush&lt;br /&gt;
   iptables -flush&lt;br /&gt;
 &lt;br /&gt;
 # accept by default&lt;br /&gt;
   iptables -P INPUT ACCEPT&lt;br /&gt;
   iptables -P FORWARD ACCEPT&lt;br /&gt;
   iptables -P OUTPUT ACCEPT&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
 case &amp;quot;$1&amp;quot; in&lt;br /&gt;
 ‘start’)&lt;br /&gt;
   fw_start&lt;br /&gt;
   ;;&lt;br /&gt;
 ’stop’)&lt;br /&gt;
   fw_stop&lt;br /&gt;
   ;;&lt;br /&gt;
 ’restart’)&lt;br /&gt;
   fw_start&lt;br /&gt;
   ;;&lt;br /&gt;
 *)&lt;br /&gt;
   echo &amp;quot;usage $0 start | stop | restart&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Testing the firewall ==&lt;br /&gt;
&lt;br /&gt;
Use '''nmap -sU hostname''' (UDP) and '''nmap -sT hostname''' (TCP) to make sure what ports are visible locally and do the same from the outside.&lt;br /&gt;
&lt;br /&gt;
== Download example ==&lt;br /&gt;
&lt;br /&gt;
[{{SERVER}}/wikislax/download/rc.firewall Download file rc.firewall]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Configuration files]]|[[Main Page]]|[[X11 configuration]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=IPTables&amp;diff=173</id>
		<title>IPTables</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=IPTables&amp;diff=173"/>
				<updated>2026-03-26T11:20:24Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Iptables Filtering */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
Packet filtering affords opening access only to these services you have decided to open. The TCP or UDP packets include a piece of information called the port number, that is used to identify the type of service. Secure ports were defined as SSL counterparts of the native ports but were superseded by [https://en.wikipedia.org/wiki/Transport_Layer_Security TLS] and are now deprecated due to security weaknesses in the SSL protocol. SSL should not be used any longer. Instead, use TLS. Current version is v1.2.&lt;br /&gt;
&lt;br /&gt;
{| {{thead}}&lt;br /&gt;
|-&lt;br /&gt;
! {{chead}} width=&amp;quot;100&amp;quot; | Protocol&lt;br /&gt;
! {{chead}} | Port #&lt;br /&gt;
! {{chead}} | Secure Protocol&lt;br /&gt;
! {{chead}} | Secure Port #&lt;br /&gt;
! {{chead}} | Service&lt;br /&gt;
|-&lt;br /&gt;
|SMTP||25||SMTPS||465||Mail exchange&lt;br /&gt;
|-&lt;br /&gt;
|HTTP||80||HTTPS||443||Web browsing&lt;br /&gt;
|-&lt;br /&gt;
|POP3||110||POP3S||995||Mail retrieval&lt;br /&gt;
|-&lt;br /&gt;
|NTTP||119||NTTPS||563||News exchange&lt;br /&gt;
|-&lt;br /&gt;
|IMAP||143||IMAPS||993||Mail retrieval&lt;br /&gt;
|-&lt;br /&gt;
|LDAP||389||LDAPS||636||Ldap Directory&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On server side, the services are provided by applications that may have vulnerabilities and be attacked. Examples of attacks are buffer overflow or format string attacks, that afford getting full access on the target machine by crafting special strings sent to it. An attacker could then obtain any information present there or modify or destroy the system.&lt;br /&gt;
&lt;br /&gt;
To reduce the number of possible attacks, the number of services authorized, or who can access the system, must be restricted. This is known as packet filtering. It is only an aspect of security (obviously, the applications on the server side must also be secured ...), but it is important. &amp;lt;u&amp;gt;Never *** ever *** connect to the network a computer not protected by a packet filter !&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To illustrate, let's configure our two-interfaces computer to be its own firewall. '''eth0''' is the Internet interface, it uses network 192.168.0.x, the gateway is an ADSL router/switch at 192.168.0.254. '''eth1''' is the (Intranet) interface to the internal network 192.168.1.x.&lt;br /&gt;
&lt;br /&gt;
== Iptables Filtering ==&lt;br /&gt;
&lt;br /&gt;
Since Linux 2.4, packet filtering is effected inside the kernel, and configuration effected by the '''iptables''' user-space program. In addition to rules for incoming and outgoing packets, iptables affords defining rules for routing between the interfaces. The '''iptables''' command affords entering the rules '''one by one'''. Using a script affords entering all the rules. '''iptable -L -v''' affords viewing the current rules.&lt;br /&gt;
&lt;br /&gt;
For more information, see the [http://www.netfilter.org/ netfilter] official site. This site has links to various documents, including a simple introduction to packet filtering in this [http://www.netfilter.org/documentation/HOWTO/packet-filtering-HOWTO.html HOWTO].&lt;br /&gt;
&lt;br /&gt;
In Slackware, the script used is &amp;lt;tt&amp;gt;'''/etc/rc.d/rc.firewall'''&amp;lt;/tt&amp;gt;. It is called  automatically when the system starts or stops, using commands &amp;lt;tt&amp;gt;'''./rc.firewall start'''&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;'''./rc.firewall stop'''&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 #! /bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # startup script for local packet filter&lt;br /&gt;
 #&lt;br /&gt;
 fw_start () {&lt;br /&gt;
 echo &amp;quot;Loading packet filter rules&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The flush command affords deleting all the active nat and filtering rules:&lt;br /&gt;
&lt;br /&gt;
 # flush old rules&lt;br /&gt;
 iptables -t nat --flush&lt;br /&gt;
 iptables -flush&lt;br /&gt;
&lt;br /&gt;
The -P option affords defining the default policy. A good practise is to forbid by default everything not authorized. This is done here for packets incoming, outgoing, and routed between the interfaces:&lt;br /&gt;
&lt;br /&gt;
 # drop by default&lt;br /&gt;
 iptables -P INPUT DROP&lt;br /&gt;
 iptables -P FORWARD DROP&lt;br /&gt;
 iptables -P OUTPUT DROP&lt;br /&gt;
&lt;br /&gt;
Connections already established are authorized to continue:&lt;br /&gt;
&lt;br /&gt;
 # accept packets that are part of previously OK'ed sessions&lt;br /&gt;
 iptables -A INPUT -j ACCEPT -m conntrack --ctstate ESTABLISHED,RELATED&lt;br /&gt;
 iptables -A OUTPUT -j ACCEPT -m conntrack --ctstate ESTABLISHED,RELATED&lt;br /&gt;
 iptables -A FORWARD -j ACCEPT -m conntrack --ctstate ESTABLISHED,RELATED &lt;br /&gt;
&lt;br /&gt;
The -A option affords adding a rule. Here all the packets on the loopback interface are accepted:&lt;br /&gt;
&lt;br /&gt;
 # INBOUND POLICY&lt;br /&gt;
 &lt;br /&gt;
 # pass all traffic for network 127.0.0.0/8 on loopback interface&lt;br /&gt;
 iptables -A INPUT -i lo -s 127.0.0.0/8 -d 127.0.0.0/8 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
Addresses of RFC 1918 private networks are not routable on the Internet. So packets with such addresses are not expected on the internal network. However as anti-spoofing is ensured by Internet box we do not need to introduce anti-spoofing rules here:&lt;br /&gt;
 &lt;br /&gt;
 # anti-spoofing done by Internet box so not needed here&lt;br /&gt;
 # iptables -A INPUT -s 10.0.0.0/8 -j LOG --log-prefix &amp;quot;INPUT spoofed IP &amp;quot;&lt;br /&gt;
 # iptables -A INPUT -s 10.0.0.0/8 -j DROP&lt;br /&gt;
 # . . .&lt;br /&gt;
&lt;br /&gt;
The protocols corresponding to services offered or used externally are accepted:&lt;br /&gt;
&lt;br /&gt;
 # services SMTP HTTP HTTPS&lt;br /&gt;
 # iptables -A INPUT -p tcp -j ACCEPT --dport 25 -m conntrack --ctstate NEW&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 80 -m conntrack --ctstate NEW&lt;br /&gt;
 # iptables -A INPUT -p tcp -j ACCEPT --dport 143 -m conntrack --ctstate NEW&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 443 -m conntrack --ctstate NEW&lt;br /&gt;
&lt;br /&gt;
The protocols corresponding to services offered on the local network are accepted:&lt;br /&gt;
&lt;br /&gt;
  # services on local network FTP DNS BOOTP NNTP SUBMIT VNC SIP RTP&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 20 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 21 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 53 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 53 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 69 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 119 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 587 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 5900:5912 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
&lt;br /&gt;
We accept X-Window traffic on the local network:&lt;br /&gt;
&lt;br /&gt;
  # SSH-tunnelled X-Window output appears as input on interface lo&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 177 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 6000:6063 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -i lo -p tcp -j ACCEPT --dport 6000:6063 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
&lt;br /&gt;
We accept NFS on the local network and fix the NFS ports:&lt;br /&gt;
&lt;br /&gt;
  # NFS ports&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 111 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 111 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 2049 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 2049 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 32764:32769 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 32764:32769 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
&lt;br /&gt;
We accept samba traffic on the local network:&lt;br /&gt;
&lt;br /&gt;
  # samba ports&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 135 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 135 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 137 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 137 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 138 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 139 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 445 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 445 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
&lt;br /&gt;
Broadcast traffic is also OK:&lt;br /&gt;
&lt;br /&gt;
  # broadcast traffic&lt;br /&gt;
  iptables -A INPUT -p udp -s 0.0.0.0 -sport 67:68 -d 255.255.255.255 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
We accept pings on the local network:&lt;br /&gt;
&lt;br /&gt;
  # accept some icmp packets&lt;br /&gt;
  iptables -A INPUT -p icmp --icmp-type echo-request -s 192.168.53.0/24 -j ACCEPT&lt;br /&gt;
  iptables -A INPUT -p icmp --icmp-type destination-unreachable -j ACCEPT&lt;br /&gt;
  iptables -A INPUT -p icmp --icmp-type time-exceeded -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
We could log anything not accepted above:&lt;br /&gt;
&lt;br /&gt;
 # log anything not accepted above&lt;br /&gt;
 # iptables -A INPUT -j LOG --log-prefix &amp;quot;INPUT bad traffic &amp;quot;&lt;br /&gt;
&lt;br /&gt;
We accept all outbound packets, which would for example afford using a network scanner. In a production environment, there would be a stricter policy:&lt;br /&gt;
&lt;br /&gt;
 # OUTBOUND POLICY&lt;br /&gt;
 &lt;br /&gt;
 # accept all outbound packets&lt;br /&gt;
 iptables -A OUTPUT -j ACCEPT&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
After the fw_start() function ends, the fw_stop() function is defined to authorize everything:&lt;br /&gt;
&lt;br /&gt;
 fw_stop () {&lt;br /&gt;
   echo &amp;quot;Unloading all packet filter rules&amp;quot;&lt;br /&gt;
   iptables -t nat --flush&lt;br /&gt;
   iptables -flush&lt;br /&gt;
 &lt;br /&gt;
 # accept by default&lt;br /&gt;
   iptables -P INPUT ACCEPT&lt;br /&gt;
   iptables -P FORWARD ACCEPT&lt;br /&gt;
   iptables -P OUTPUT ACCEPT&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
 case &amp;quot;$1&amp;quot; in&lt;br /&gt;
 ‘start’)&lt;br /&gt;
   fw_start&lt;br /&gt;
   ;;&lt;br /&gt;
 ’stop’)&lt;br /&gt;
   fw_stop&lt;br /&gt;
   ;;&lt;br /&gt;
 ’restart’)&lt;br /&gt;
   fw_start&lt;br /&gt;
   ;;&lt;br /&gt;
 *)&lt;br /&gt;
   echo &amp;quot;usage $0 start | stop | restart&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Testing the firewall ==&lt;br /&gt;
&lt;br /&gt;
Use '''nmap -sU hostname''' (UDP) and '''nmap -sT hostname''' (TCP) to make sure what ports are visible locally and do the same from the outside.&lt;br /&gt;
&lt;br /&gt;
== Download example ==&lt;br /&gt;
&lt;br /&gt;
[{{SERVER}}/wikislax/download/rc.firewall Download file rc.firewall]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Configuration files]]|[[Main Page]]|[[X11 configuration]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=IPTables&amp;diff=172</id>
		<title>IPTables</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=IPTables&amp;diff=172"/>
				<updated>2026-03-26T11:19:30Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Iptables Filtering */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
Packet filtering affords opening access only to these services you have decided to open. The TCP or UDP packets include a piece of information called the port number, that is used to identify the type of service. Secure ports were defined as SSL counterparts of the native ports but were superseded by [https://en.wikipedia.org/wiki/Transport_Layer_Security TLS] and are now deprecated due to security weaknesses in the SSL protocol. SSL should not be used any longer. Instead, use TLS. Current version is v1.2.&lt;br /&gt;
&lt;br /&gt;
{| {{thead}}&lt;br /&gt;
|-&lt;br /&gt;
! {{chead}} width=&amp;quot;100&amp;quot; | Protocol&lt;br /&gt;
! {{chead}} | Port #&lt;br /&gt;
! {{chead}} | Secure Protocol&lt;br /&gt;
! {{chead}} | Secure Port #&lt;br /&gt;
! {{chead}} | Service&lt;br /&gt;
|-&lt;br /&gt;
|SMTP||25||SMTPS||465||Mail exchange&lt;br /&gt;
|-&lt;br /&gt;
|HTTP||80||HTTPS||443||Web browsing&lt;br /&gt;
|-&lt;br /&gt;
|POP3||110||POP3S||995||Mail retrieval&lt;br /&gt;
|-&lt;br /&gt;
|NTTP||119||NTTPS||563||News exchange&lt;br /&gt;
|-&lt;br /&gt;
|IMAP||143||IMAPS||993||Mail retrieval&lt;br /&gt;
|-&lt;br /&gt;
|LDAP||389||LDAPS||636||Ldap Directory&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On server side, the services are provided by applications that may have vulnerabilities and be attacked. Examples of attacks are buffer overflow or format string attacks, that afford getting full access on the target machine by crafting special strings sent to it. An attacker could then obtain any information present there or modify or destroy the system.&lt;br /&gt;
&lt;br /&gt;
To reduce the number of possible attacks, the number of services authorized, or who can access the system, must be restricted. This is known as packet filtering. It is only an aspect of security (obviously, the applications on the server side must also be secured ...), but it is important. &amp;lt;u&amp;gt;Never *** ever *** connect to the network a computer not protected by a packet filter !&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To illustrate, let's configure our two-interfaces computer to be its own firewall. '''eth0''' is the Internet interface, it uses network 192.168.0.x, the gateway is an ADSL router/switch at 192.168.0.254. '''eth1''' is the (Intranet) interface to the internal network 192.168.1.x.&lt;br /&gt;
&lt;br /&gt;
== Iptables Filtering ==&lt;br /&gt;
&lt;br /&gt;
Since Linux 2.4, packet filtering is effected inside the kernel, and configuration effected by the '''iptables''' user-space program. In addition to rules for incoming and outgoing packets, iptables affords defining rules for routing between the interfaces. The '''iptables''' command affords entering the rules '''one by one'''. Using a script affords entering all the rules. '''iptable -L -v''' affords viewing the current rules.&lt;br /&gt;
&lt;br /&gt;
For more information, see the [http://www.netfilter.org/ netfilter] official site. This site has links to various documents, including a simple introduction to packet filtering in this [http://www.netfilter.org/documentation/HOWTO/packet-filtering-HOWTO.html HOWTO].&lt;br /&gt;
&lt;br /&gt;
In Slackware, the script used is &amp;lt;tt&amp;gt;'''/etc/rc.d/rc.firewall'''&amp;lt;/tt&amp;gt;. It is called  automatically when the system starts or stops, using commands &amp;lt;tt&amp;gt;'''./rc.firewall start'''&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;'''./rc.firewall stop'''&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 #! /bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # startup script for local packet filter&lt;br /&gt;
 #&lt;br /&gt;
 fw_start () {&lt;br /&gt;
 echo &amp;quot;Loading packet filter rules&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The flush command affords deleting all the active nat and filtering rules:&lt;br /&gt;
&lt;br /&gt;
 # flush old rules&lt;br /&gt;
 iptables -t nat --flush&lt;br /&gt;
 iptables -flush&lt;br /&gt;
&lt;br /&gt;
The -P option affords defining the default policy. A good practise is to forbid by default everything not authorized. This is done here for packets incoming, outgoing, and routed between the interfaces:&lt;br /&gt;
&lt;br /&gt;
 # drop by default&lt;br /&gt;
 iptables -P INPUT DROP&lt;br /&gt;
 iptables -P FORWARD DROP&lt;br /&gt;
 iptables -P OUTPUT DROP&lt;br /&gt;
&lt;br /&gt;
Connections already established are authorized to continue:&lt;br /&gt;
&lt;br /&gt;
 # accept packets that are part of previously OK'ed sessions&lt;br /&gt;
 iptables -A INPUT -j ACCEPT -m conntrack --ctstate ESTABLISHED,RELATED&lt;br /&gt;
 iptables -A OUTPUT -j ACCEPT -m conntrack --ctstate ESTABLISHED,RELATED&lt;br /&gt;
 iptables -A FORWARD -j ACCEPT -m conntrack --ctstate ESTABLISHED,RELATED &lt;br /&gt;
&lt;br /&gt;
The -A option affords adding a rule. Here all the packets on the loopback interface are accepted:&lt;br /&gt;
&lt;br /&gt;
 # INBOUND POLICY&lt;br /&gt;
 &lt;br /&gt;
 # pass all traffic for network 127.0.0.0/8 on loopback interface&lt;br /&gt;
 iptables -A INPUT -i lo -s 127.0.0.0/8 -d 127.0.0.0/8 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
Addresses of RFC 1918 private networks are not routable on the Internet. So packets with such addresses are not expected on the internal network. However as anti-spoofing is ensured by Internet box we do not need to introduce anti-spoofing rules here:&lt;br /&gt;
 &lt;br /&gt;
 # anti-spoofing done by Internet box so not needed here&lt;br /&gt;
 # iptables -A INPUT -s 10.0.0.0/8 -j LOG --log-prefix &amp;quot;INPUT spoofed IP &amp;quot;&lt;br /&gt;
 # iptables -A INPUT -s 10.0.0.0/8 -j DROP&lt;br /&gt;
 # . . .&lt;br /&gt;
&lt;br /&gt;
The protocols corresponding to services offered or used externally are accepted:&lt;br /&gt;
&lt;br /&gt;
 # services SMTP HTTP HTTPS&lt;br /&gt;
# iptables -A INPUT -p tcp -j ACCEPT --dport 25 -m conntrack --ctstate NEW&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 80 -m conntrack --ctstate NEW&lt;br /&gt;
# iptables -A INPUT -p tcp -j ACCEPT --dport 143 -m conntrack --ctstate NEW&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 443 -m conntrack --ctstate NEW&lt;br /&gt;
&lt;br /&gt;
The protocols corresponding to services offered on the local network are accepted:&lt;br /&gt;
&lt;br /&gt;
  # services on local network FTP DNS BOOTP NNTP SUBMIT VNC SIP RTP&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 20 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 21 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 53 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 53 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 69 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 119 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 587 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 5900:5912 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
&lt;br /&gt;
We accept X-Window traffic on the local network:&lt;br /&gt;
&lt;br /&gt;
  # SSH-tunnelled X-Window output appears as input on interface lo&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 177 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 6000:6063 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -i lo -p tcp -j ACCEPT --dport 6000:6063 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
&lt;br /&gt;
We accept NFS on the local network and fix the NFS ports:&lt;br /&gt;
&lt;br /&gt;
  # NFS ports&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 111 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 111 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 2049 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 2049 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 32764:32769 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 32764:32769 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
&lt;br /&gt;
We accept samba traffic on the local network:&lt;br /&gt;
&lt;br /&gt;
  # samba ports&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 135 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 135 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 137 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 137 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 138 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 139 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p udp -j ACCEPT --dport 445 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
  iptables -A INPUT -p tcp -j ACCEPT --dport 445 -m conntrack --ctstate NEW -s 192.168.53.0/24&lt;br /&gt;
&lt;br /&gt;
Broadcast traffic is also OK:&lt;br /&gt;
&lt;br /&gt;
  # broadcast traffic&lt;br /&gt;
  iptables -A INPUT -p udp -s 0.0.0.0 -sport 67:68 -d 255.255.255.255 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
We accept pings on the local network:&lt;br /&gt;
&lt;br /&gt;
  # accept some icmp packets&lt;br /&gt;
  iptables -A INPUT -p icmp --icmp-type echo-request -s 192.168.53.0/24 -j ACCEPT&lt;br /&gt;
  iptables -A INPUT -p icmp --icmp-type destination-unreachable -j ACCEPT&lt;br /&gt;
  iptables -A INPUT -p icmp --icmp-type time-exceeded -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
We could log anything not accepted above:&lt;br /&gt;
&lt;br /&gt;
 # log anything not accepted above&lt;br /&gt;
 # iptables -A INPUT -j LOG --log-prefix &amp;quot;INPUT bad traffic &amp;quot;&lt;br /&gt;
&lt;br /&gt;
We accept all outbound packets, which would for example afford using a network scanner. In a production environment, there would be a stricter policy:&lt;br /&gt;
&lt;br /&gt;
 # OUTBOUND POLICY&lt;br /&gt;
 &lt;br /&gt;
 # accept all outbound packets&lt;br /&gt;
 iptables -A OUTPUT -j ACCEPT&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
After the fw_start() function ends, the fw_stop() function is defined to authorize everything:&lt;br /&gt;
&lt;br /&gt;
 fw_stop () {&lt;br /&gt;
   echo &amp;quot;Unloading all packet filter rules&amp;quot;&lt;br /&gt;
   iptables -t nat --flush&lt;br /&gt;
   iptables -flush&lt;br /&gt;
 &lt;br /&gt;
 # accept by default&lt;br /&gt;
   iptables -P INPUT ACCEPT&lt;br /&gt;
   iptables -P FORWARD ACCEPT&lt;br /&gt;
   iptables -P OUTPUT ACCEPT&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
 case &amp;quot;$1&amp;quot; in&lt;br /&gt;
 ‘start’)&lt;br /&gt;
   fw_start&lt;br /&gt;
   ;;&lt;br /&gt;
 ’stop’)&lt;br /&gt;
   fw_stop&lt;br /&gt;
   ;;&lt;br /&gt;
 ’restart’)&lt;br /&gt;
   fw_start&lt;br /&gt;
   ;;&lt;br /&gt;
 *)&lt;br /&gt;
   echo &amp;quot;usage $0 start | stop | restart&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Testing the firewall ==&lt;br /&gt;
&lt;br /&gt;
Use '''nmap -sU hostname''' (UDP) and '''nmap -sT hostname''' (TCP) to make sure what ports are visible locally and do the same from the outside.&lt;br /&gt;
&lt;br /&gt;
== Download example ==&lt;br /&gt;
&lt;br /&gt;
[{{SERVER}}/wikislax/download/rc.firewall Download file rc.firewall]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Configuration files]]|[[Main Page]]|[[X11 configuration]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=OwnCloud&amp;diff=171</id>
		<title>OwnCloud</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=OwnCloud&amp;diff=171"/>
				<updated>2026-03-23T11:51:12Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Creating the OwnCloud database */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is OwnCloud ? ==&lt;br /&gt;
&lt;br /&gt;
[http://owncloud.com/ OwnCloud] is a file synchronization server. It affords keeping a hierarchy of files synchronized on different clients and operating systems.&lt;br /&gt;
&lt;br /&gt;
The [https://doc.owncloud.com/server/10.15/admin_manual/installation/quick_guides/ubuntu_20_04.html/ Owncloud install doc] provided is for Ubuntu.&lt;br /&gt;
&lt;br /&gt;
It is adapted below for Slackware 15.0.&lt;br /&gt;
&lt;br /&gt;
== Installing OwnCloud ==&lt;br /&gt;
&lt;br /&gt;
OwnCloud is a PHP application. [https://owncloud.com/download-server download] tarball then untar and install.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf owncloud-complete-20240724.tar.bz2&lt;br /&gt;
 # chown -R apache:apache owncloud&lt;br /&gt;
 # cd /var/www/htdocs&lt;br /&gt;
 # ln -s /usr/local/owncloud owncloud&lt;br /&gt;
 # chown -R apache:apache owncloud&lt;br /&gt;
&lt;br /&gt;
== Creating the occ helper script ==&lt;br /&gt;
&lt;br /&gt;
occ is an OwnCloud administration command.&lt;br /&gt;
&lt;br /&gt;
 # FILE=&amp;quot;/usr/local/bin/occ&amp;quot;&lt;br /&gt;
 # cat &amp;lt;&amp;lt;EOM &amp;gt;$FILE&lt;br /&gt;
 &amp;gt; #! /bin/bash&lt;br /&gt;
 &amp;gt; cd /usr/local/owncloud&lt;br /&gt;
 &amp;gt; sudo -E -u apache /usr/bin/php /usr/local/owncloud/occ &amp;quot;\$@&amp;quot;&lt;br /&gt;
 &amp;gt; EOM&lt;br /&gt;
 # chmod u+x $FILE&lt;br /&gt;
&lt;br /&gt;
== Creating the OwnCloud database ==&lt;br /&gt;
&lt;br /&gt;
OwnCloud can use a variety of databases. We will be using MySQL. The database can be created as follows :&lt;br /&gt;
&lt;br /&gt;
 # mysql -u root -e \&lt;br /&gt;
   &amp;quot;CREATE DATABASE IF NOT EXISTS owncloud; \&lt;br /&gt;
   CREATE USER IF NOT EXISTS 'owncloud'@'localhost' IDENTIFIED BY '&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;password&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;'; \&lt;br /&gt;
   GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' WITH GRANT OPTION; \&lt;br /&gt;
   FLUSH PRIVILEGES;&amp;quot;&lt;br /&gt;
 # mysql -u root -e \&lt;br /&gt;
   &amp;quot;CREATE USER 'owncloud'@'127.0.0.1' IDENTIFIED BY '&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;password&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;'; \&lt;br /&gt;
   GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'127.0.0.1' WITH GRANT OPTION; \&lt;br /&gt;
   FLUSH PRIVILEGES;&amp;quot;&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
It is also possible to create user owncloud@localhost and database from phpmyadmin.&lt;br /&gt;
&lt;br /&gt;
== setting up the owncloud database ==&lt;br /&gt;
&lt;br /&gt;
The admin user is the one who will manage the other users and OwnCloud from the OwnCloud web page.&lt;br /&gt;
&lt;br /&gt;
 # occ maintenance:install \&lt;br /&gt;
     --database &amp;quot;mysql&amp;quot; \&lt;br /&gt;
     --database-name &amp;quot;owncloud&amp;quot; \&lt;br /&gt;
     --database-user &amp;quot;owncloud&amp;quot; \&lt;br /&gt;
     --database-pass &amp;quot;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;password&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;quot; \&lt;br /&gt;
     --data-dir &amp;quot;/var/www/htdocs/owncloud/data&amp;quot; \&lt;br /&gt;
     --admin-user &amp;quot;admin&amp;quot; \&lt;br /&gt;
     --admin-pass &amp;quot;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;password&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;quot;&lt;br /&gt;
 ownCloud was successfully installed&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure ownCloud’s Trusted Domains ==&lt;br /&gt;
&lt;br /&gt;
 # my_ip=$(hostname -I|cut -f1 -d ' ')&lt;br /&gt;
 # occ config:system:set trusted_domains 1 --value=&amp;quot;$my_ip&amp;quot;&lt;br /&gt;
 System config value trusted_domains =&amp;gt; 1 set to string '''&amp;lt;i&amp;gt;x.y.z.t&amp;lt;/i&amp;gt;'''&lt;br /&gt;
 # occ config:system:set trusted_domains 2 --value=&amp;quot;$HOSTNAME&amp;quot;&lt;br /&gt;
 System config value trusted_domains =&amp;gt; 2 set to string '''&amp;lt;i&amp;gt;your.domain.tld&amp;lt;/i&amp;gt;'''&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure the cron jobs ==&lt;br /&gt;
&lt;br /&gt;
Set your background job mode to cron:&lt;br /&gt;
&lt;br /&gt;
 # occ background:cron&lt;br /&gt;
 Set mode for background jobs to 'cron'&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure the execution of the cron job to every 15 min and the cleanup of chunks every night at 2 am: ==&lt;br /&gt;
&lt;br /&gt;
 # echo &amp;quot;MIN HOUR DAY MONTH DAYOFWEEK COMMAND&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # echo &amp;quot;*/15  *  *  *  * /var/www/htdocs/owncloud/occ system:cron&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # echo &amp;quot;0  2  *  *  * /var/www/htdocs/owncloud/occ dav:cleanup-chunks&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # chgrp apache /var/spool/cron/crontabs/apache&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure Log Rotation ==&lt;br /&gt;
&lt;br /&gt;
 # FILE=&amp;quot;/etc/logrotate.d/owncloud&amp;quot;&lt;br /&gt;
 # cat &amp;lt;&amp;lt;EOM &amp;gt;$FILE&lt;br /&gt;
 /var/www/htdocs/owncloud/data/owncloud.log {&lt;br /&gt;
 size 10M&lt;br /&gt;
 rotate 12&lt;br /&gt;
 copytruncate&lt;br /&gt;
 missingok&lt;br /&gt;
 compress&lt;br /&gt;
 compresscmd /bin/gzip&lt;br /&gt;
 }&lt;br /&gt;
 EOM&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Asterisk]]|[[Main Page]]|[[Desktop software]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=OwnCloud&amp;diff=170</id>
		<title>OwnCloud</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=OwnCloud&amp;diff=170"/>
				<updated>2026-03-23T11:49:30Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Creating the OwnCloud database */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is OwnCloud ? ==&lt;br /&gt;
&lt;br /&gt;
[http://owncloud.com/ OwnCloud] is a file synchronization server. It affords keeping a hierarchy of files synchronized on different clients and operating systems.&lt;br /&gt;
&lt;br /&gt;
The [https://doc.owncloud.com/server/10.15/admin_manual/installation/quick_guides/ubuntu_20_04.html/ Owncloud install doc] provided is for Ubuntu.&lt;br /&gt;
&lt;br /&gt;
It is adapted below for Slackware 15.0.&lt;br /&gt;
&lt;br /&gt;
== Installing OwnCloud ==&lt;br /&gt;
&lt;br /&gt;
OwnCloud is a PHP application. [https://owncloud.com/download-server download] tarball then untar and install.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf owncloud-complete-20240724.tar.bz2&lt;br /&gt;
 # chown -R apache:apache owncloud&lt;br /&gt;
 # cd /var/www/htdocs&lt;br /&gt;
 # ln -s /usr/local/owncloud owncloud&lt;br /&gt;
 # chown -R apache:apache owncloud&lt;br /&gt;
&lt;br /&gt;
== Creating the occ helper script ==&lt;br /&gt;
&lt;br /&gt;
occ is an OwnCloud administration command.&lt;br /&gt;
&lt;br /&gt;
 # FILE=&amp;quot;/usr/local/bin/occ&amp;quot;&lt;br /&gt;
 # cat &amp;lt;&amp;lt;EOM &amp;gt;$FILE&lt;br /&gt;
 &amp;gt; #! /bin/bash&lt;br /&gt;
 &amp;gt; cd /usr/local/owncloud&lt;br /&gt;
 &amp;gt; sudo -E -u apache /usr/bin/php /usr/local/owncloud/occ &amp;quot;\$@&amp;quot;&lt;br /&gt;
 &amp;gt; EOM&lt;br /&gt;
 # chmod u+x $FILE&lt;br /&gt;
&lt;br /&gt;
== Creating the OwnCloud database ==&lt;br /&gt;
&lt;br /&gt;
OwnCloud can use a variety of databases. We will be using MySQL. The database can be created as follows :&lt;br /&gt;
&lt;br /&gt;
 # mysql -u root -e \&lt;br /&gt;
   &amp;quot;CREATE DATABASE IF NOT EXISTS owncloud; \&lt;br /&gt;
   CREATE USER IF NOT EXISTS 'owncloud'@'localhost' IDENTIFIED BY '&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;password&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;'; \&lt;br /&gt;
   GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' WITH GRANT OPTION; \&lt;br /&gt;
   FLUSH PRIVILEGES;&amp;quot;&lt;br /&gt;
 # mysql -u root -e \&lt;br /&gt;
   &amp;quot;CREATE USER 'owncloud'@'127.0.0.1' IDENTIFIED BY '&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;password&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;'; \&lt;br /&gt;
   GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'127.0.0.1'; WITH GRANT OPTION; \&lt;br /&gt;
   FLUSH PRIVILEGES;&amp;quot;&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
It is also possible to create user owncloud@localhost and database from phpmyadmin.&lt;br /&gt;
&lt;br /&gt;
== setting up the owncloud database ==&lt;br /&gt;
&lt;br /&gt;
The admin user is the one who will manage the other users and OwnCloud from the OwnCloud web page.&lt;br /&gt;
&lt;br /&gt;
 # occ maintenance:install \&lt;br /&gt;
     --database &amp;quot;mysql&amp;quot; \&lt;br /&gt;
     --database-name &amp;quot;owncloud&amp;quot; \&lt;br /&gt;
     --database-user &amp;quot;owncloud&amp;quot; \&lt;br /&gt;
     --database-pass &amp;quot;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;password&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;quot; \&lt;br /&gt;
     --data-dir &amp;quot;/var/www/htdocs/owncloud/data&amp;quot; \&lt;br /&gt;
     --admin-user &amp;quot;admin&amp;quot; \&lt;br /&gt;
     --admin-pass &amp;quot;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;password&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;quot;&lt;br /&gt;
 ownCloud was successfully installed&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure ownCloud’s Trusted Domains ==&lt;br /&gt;
&lt;br /&gt;
 # my_ip=$(hostname -I|cut -f1 -d ' ')&lt;br /&gt;
 # occ config:system:set trusted_domains 1 --value=&amp;quot;$my_ip&amp;quot;&lt;br /&gt;
 System config value trusted_domains =&amp;gt; 1 set to string '''&amp;lt;i&amp;gt;x.y.z.t&amp;lt;/i&amp;gt;'''&lt;br /&gt;
 # occ config:system:set trusted_domains 2 --value=&amp;quot;$HOSTNAME&amp;quot;&lt;br /&gt;
 System config value trusted_domains =&amp;gt; 2 set to string '''&amp;lt;i&amp;gt;your.domain.tld&amp;lt;/i&amp;gt;'''&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure the cron jobs ==&lt;br /&gt;
&lt;br /&gt;
Set your background job mode to cron:&lt;br /&gt;
&lt;br /&gt;
 # occ background:cron&lt;br /&gt;
 Set mode for background jobs to 'cron'&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure the execution of the cron job to every 15 min and the cleanup of chunks every night at 2 am: ==&lt;br /&gt;
&lt;br /&gt;
 # echo &amp;quot;MIN HOUR DAY MONTH DAYOFWEEK COMMAND&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # echo &amp;quot;*/15  *  *  *  * /var/www/htdocs/owncloud/occ system:cron&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # echo &amp;quot;0  2  *  *  * /var/www/htdocs/owncloud/occ dav:cleanup-chunks&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # chgrp apache /var/spool/cron/crontabs/apache&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure Log Rotation ==&lt;br /&gt;
&lt;br /&gt;
 # FILE=&amp;quot;/etc/logrotate.d/owncloud&amp;quot;&lt;br /&gt;
 # cat &amp;lt;&amp;lt;EOM &amp;gt;$FILE&lt;br /&gt;
 /var/www/htdocs/owncloud/data/owncloud.log {&lt;br /&gt;
 size 10M&lt;br /&gt;
 rotate 12&lt;br /&gt;
 copytruncate&lt;br /&gt;
 missingok&lt;br /&gt;
 compress&lt;br /&gt;
 compresscmd /bin/gzip&lt;br /&gt;
 }&lt;br /&gt;
 EOM&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Asterisk]]|[[Main Page]]|[[Desktop software]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=PhpMyAdmin&amp;diff=169</id>
		<title>PhpMyAdmin</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=PhpMyAdmin&amp;diff=169"/>
				<updated>2026-03-21T22:19:29Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Installing PhpMyAdmin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is PhpMyAdmin ? ==&lt;br /&gt;
&lt;br /&gt;
[http://www.phpmyadmin.net/home_page PhpMyAdmin] is a PHP application that affords managing [[MySQL]] databases.&lt;br /&gt;
&lt;br /&gt;
== Installing PhpMyAdmin ==&lt;br /&gt;
&lt;br /&gt;
[http://www.phpmyadmin.net/home_page/downloads.php Download] and install for example in a subdirectory of the Apache DocumentRoot or under /usr/local using a symbolic link. The files must be readable by the user running apache.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf phpMyAdmin-x.y.z.t-english.tar.gz&lt;br /&gt;
 # cd /var/www/htdocs&lt;br /&gt;
 # ln -s /usr/local/phpMyAdmin-x.y.z.t-english phpmyadmin&lt;br /&gt;
 # cd phpmyadmin&lt;br /&gt;
 # cp config.sample.inc.php config.inc.php&lt;br /&gt;
 # cd ..&lt;br /&gt;
 # chown -R apache:apache phpmyadmin&lt;br /&gt;
&lt;br /&gt;
Edit '''config.inc.php''' to give a value (any string of '''max 46 characters''') to '''$cfg['blowfish_secret'] = &amp;lt;nowiki&amp;gt;''&amp;lt;/nowiki&amp;gt;;''' that is used when '''$cfg['Servers'][$i]['auth_type'] = 'cookie';'''. Also add the lines '''$cfg['Servers'][$i]['socket'] = '/var/run/mysql/mysql.sock'; &amp;amp; $cfg['Servers'][$i]['connect_type'] = 'socket';'''. After that it should be possible to open page http://localhost/phpmyadmin using your browser.&lt;br /&gt;
&lt;br /&gt;
 $cfg['blowfish_secret'] = 'mysecret'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
 /*&lt;br /&gt;
  * Servers configuration&lt;br /&gt;
  */&lt;br /&gt;
 $i = 0;&lt;br /&gt;
 /*&lt;br /&gt;
  * First server&lt;br /&gt;
  */&lt;br /&gt;
 $i++;&lt;br /&gt;
 /* Authentication type */&lt;br /&gt;
 $cfg['Servers'][$i]['auth_type'] = 'cookie';&lt;br /&gt;
 /* Server parameters */&lt;br /&gt;
 $cfg['Servers'][$i]['host'] = 'localhost';&lt;br /&gt;
 $cfg['Servers'][$i]['DisableIS'] = true; # BUG PHPMYADMIN 5.2.3&lt;br /&gt;
 $cfg['Servers'][$i]['socket'] = '/var/run/mysql/mysql.sock';&lt;br /&gt;
 $cfg['Servers'][$i]['connect_type'] = 'socket';&lt;br /&gt;
 $cfg['Servers'][$i]['compress'] = false;&lt;br /&gt;
 /* Select mysqli if your server has it */&lt;br /&gt;
 $cfg['Servers'][$i]['extension'] = 'mysql';&lt;br /&gt;
 $cfg['Servers'][$i]['AllowNoPassword'] = false;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[PHP]]|[[Main Page]]|[[MediaWiki]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=OwnCloud&amp;diff=168</id>
		<title>OwnCloud</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=OwnCloud&amp;diff=168"/>
				<updated>2026-03-21T18:03:20Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* setting up the owncloud database */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is OwnCloud ? ==&lt;br /&gt;
&lt;br /&gt;
[http://owncloud.com/ OwnCloud] is a file synchronization server. It affords keeping a hierarchy of files synchronized on different clients and operating systems.&lt;br /&gt;
&lt;br /&gt;
The [https://doc.owncloud.com/server/10.15/admin_manual/installation/quick_guides/ubuntu_20_04.html/ Owncloud install doc] provided is for Ubuntu.&lt;br /&gt;
&lt;br /&gt;
It is adapted below for Slackware 15.0.&lt;br /&gt;
&lt;br /&gt;
== Installing OwnCloud ==&lt;br /&gt;
&lt;br /&gt;
OwnCloud is a PHP application. [https://owncloud.com/download-server download] tarball then untar and install.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf owncloud-complete-20240724.tar.bz2&lt;br /&gt;
 # chown -R apache:apache owncloud&lt;br /&gt;
 # cd /var/www/htdocs&lt;br /&gt;
 # ln -s /usr/local/owncloud owncloud&lt;br /&gt;
 # chown -R apache:apache owncloud&lt;br /&gt;
&lt;br /&gt;
== Creating the occ helper script ==&lt;br /&gt;
&lt;br /&gt;
occ is an OwnCloud administration command.&lt;br /&gt;
&lt;br /&gt;
 # FILE=&amp;quot;/usr/local/bin/occ&amp;quot;&lt;br /&gt;
 # cat &amp;lt;&amp;lt;EOM &amp;gt;$FILE&lt;br /&gt;
 &amp;gt; #! /bin/bash&lt;br /&gt;
 &amp;gt; cd /usr/local/owncloud&lt;br /&gt;
 &amp;gt; sudo -E -u apache /usr/bin/php /usr/local/owncloud/occ &amp;quot;\$@&amp;quot;&lt;br /&gt;
 &amp;gt; EOM&lt;br /&gt;
 # chmod u+x $FILE&lt;br /&gt;
&lt;br /&gt;
== Creating the OwnCloud database ==&lt;br /&gt;
&lt;br /&gt;
OwnCloud can use a variety of databases. We will be using MySQL. The database can be created as follows :&lt;br /&gt;
&lt;br /&gt;
 # mysql -u root -e \&lt;br /&gt;
   &amp;quot;CREATE DATABASE IF NOT EXISTS owncloud; \&lt;br /&gt;
   CREATE USER IF NOT EXISTS 'owncloud'@'localhost' IDENTIFIED BY '&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;password&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;'; \&lt;br /&gt;
   GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' WITH GRANT OPTION; \&lt;br /&gt;
   FLUSH PRIVILEGES;&amp;quot;&lt;br /&gt;
 # mysql -u root -e \&lt;br /&gt;
   &amp;quot;CREATE USER 'owncloud'@'127.0.0.1' IDENTIFIED BY '&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;password&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;'; \&lt;br /&gt;
   GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'127.0.0.1'; \&lt;br /&gt;
   FLUSH PRIVILEGES;&amp;quot;&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
It is also possible to create user owncloud@localhost and database from phpmyadmin.&lt;br /&gt;
&lt;br /&gt;
== setting up the owncloud database ==&lt;br /&gt;
&lt;br /&gt;
The admin user is the one who will manage the other users and OwnCloud from the OwnCloud web page.&lt;br /&gt;
&lt;br /&gt;
 # occ maintenance:install \&lt;br /&gt;
     --database &amp;quot;mysql&amp;quot; \&lt;br /&gt;
     --database-name &amp;quot;owncloud&amp;quot; \&lt;br /&gt;
     --database-user &amp;quot;owncloud&amp;quot; \&lt;br /&gt;
     --database-pass &amp;quot;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;password&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;quot; \&lt;br /&gt;
     --data-dir &amp;quot;/var/www/htdocs/owncloud/data&amp;quot; \&lt;br /&gt;
     --admin-user &amp;quot;admin&amp;quot; \&lt;br /&gt;
     --admin-pass &amp;quot;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;password&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;quot;&lt;br /&gt;
 ownCloud was successfully installed&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure ownCloud’s Trusted Domains ==&lt;br /&gt;
&lt;br /&gt;
 # my_ip=$(hostname -I|cut -f1 -d ' ')&lt;br /&gt;
 # occ config:system:set trusted_domains 1 --value=&amp;quot;$my_ip&amp;quot;&lt;br /&gt;
 System config value trusted_domains =&amp;gt; 1 set to string '''&amp;lt;i&amp;gt;x.y.z.t&amp;lt;/i&amp;gt;'''&lt;br /&gt;
 # occ config:system:set trusted_domains 2 --value=&amp;quot;$HOSTNAME&amp;quot;&lt;br /&gt;
 System config value trusted_domains =&amp;gt; 2 set to string '''&amp;lt;i&amp;gt;your.domain.tld&amp;lt;/i&amp;gt;'''&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure the cron jobs ==&lt;br /&gt;
&lt;br /&gt;
Set your background job mode to cron:&lt;br /&gt;
&lt;br /&gt;
 # occ background:cron&lt;br /&gt;
 Set mode for background jobs to 'cron'&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure the execution of the cron job to every 15 min and the cleanup of chunks every night at 2 am: ==&lt;br /&gt;
&lt;br /&gt;
 # echo &amp;quot;MIN HOUR DAY MONTH DAYOFWEEK COMMAND&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # echo &amp;quot;*/15  *  *  *  * /var/www/htdocs/owncloud/occ system:cron&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # echo &amp;quot;0  2  *  *  * /var/www/htdocs/owncloud/occ dav:cleanup-chunks&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # chgrp apache /var/spool/cron/crontabs/apache&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure Log Rotation ==&lt;br /&gt;
&lt;br /&gt;
 # FILE=&amp;quot;/etc/logrotate.d/owncloud&amp;quot;&lt;br /&gt;
 # cat &amp;lt;&amp;lt;EOM &amp;gt;$FILE&lt;br /&gt;
 /var/www/htdocs/owncloud/data/owncloud.log {&lt;br /&gt;
 size 10M&lt;br /&gt;
 rotate 12&lt;br /&gt;
 copytruncate&lt;br /&gt;
 missingok&lt;br /&gt;
 compress&lt;br /&gt;
 compresscmd /bin/gzip&lt;br /&gt;
 }&lt;br /&gt;
 EOM&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Asterisk]]|[[Main Page]]|[[Desktop software]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=OwnCloud&amp;diff=167</id>
		<title>OwnCloud</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=OwnCloud&amp;diff=167"/>
				<updated>2026-03-21T18:02:48Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Creating the OwnCloud database */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is OwnCloud ? ==&lt;br /&gt;
&lt;br /&gt;
[http://owncloud.com/ OwnCloud] is a file synchronization server. It affords keeping a hierarchy of files synchronized on different clients and operating systems.&lt;br /&gt;
&lt;br /&gt;
The [https://doc.owncloud.com/server/10.15/admin_manual/installation/quick_guides/ubuntu_20_04.html/ Owncloud install doc] provided is for Ubuntu.&lt;br /&gt;
&lt;br /&gt;
It is adapted below for Slackware 15.0.&lt;br /&gt;
&lt;br /&gt;
== Installing OwnCloud ==&lt;br /&gt;
&lt;br /&gt;
OwnCloud is a PHP application. [https://owncloud.com/download-server download] tarball then untar and install.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf owncloud-complete-20240724.tar.bz2&lt;br /&gt;
 # chown -R apache:apache owncloud&lt;br /&gt;
 # cd /var/www/htdocs&lt;br /&gt;
 # ln -s /usr/local/owncloud owncloud&lt;br /&gt;
 # chown -R apache:apache owncloud&lt;br /&gt;
&lt;br /&gt;
== Creating the occ helper script ==&lt;br /&gt;
&lt;br /&gt;
occ is an OwnCloud administration command.&lt;br /&gt;
&lt;br /&gt;
 # FILE=&amp;quot;/usr/local/bin/occ&amp;quot;&lt;br /&gt;
 # cat &amp;lt;&amp;lt;EOM &amp;gt;$FILE&lt;br /&gt;
 &amp;gt; #! /bin/bash&lt;br /&gt;
 &amp;gt; cd /usr/local/owncloud&lt;br /&gt;
 &amp;gt; sudo -E -u apache /usr/bin/php /usr/local/owncloud/occ &amp;quot;\$@&amp;quot;&lt;br /&gt;
 &amp;gt; EOM&lt;br /&gt;
 # chmod u+x $FILE&lt;br /&gt;
&lt;br /&gt;
== Creating the OwnCloud database ==&lt;br /&gt;
&lt;br /&gt;
OwnCloud can use a variety of databases. We will be using MySQL. The database can be created as follows :&lt;br /&gt;
&lt;br /&gt;
 # mysql -u root -e \&lt;br /&gt;
   &amp;quot;CREATE DATABASE IF NOT EXISTS owncloud; \&lt;br /&gt;
   CREATE USER IF NOT EXISTS 'owncloud'@'localhost' IDENTIFIED BY '&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;password&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;'; \&lt;br /&gt;
   GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' WITH GRANT OPTION; \&lt;br /&gt;
   FLUSH PRIVILEGES;&amp;quot;&lt;br /&gt;
 # mysql -u root -e \&lt;br /&gt;
   &amp;quot;CREATE USER 'owncloud'@'127.0.0.1' IDENTIFIED BY '&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;password&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;'; \&lt;br /&gt;
   GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'127.0.0.1'; \&lt;br /&gt;
   FLUSH PRIVILEGES;&amp;quot;&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
It is also possible to create user owncloud@localhost and database from phpmyadmin.&lt;br /&gt;
&lt;br /&gt;
== setting up the owncloud database ==&lt;br /&gt;
&lt;br /&gt;
The admin user is the one who will manage the other users and OwnCloud from the OwnCloud web page.&lt;br /&gt;
&lt;br /&gt;
 # occ maintenance:install \&lt;br /&gt;
     --database &amp;quot;mysql&amp;quot; \&lt;br /&gt;
     --database-name &amp;quot;owncloud&amp;quot; \&lt;br /&gt;
     --database-user &amp;quot;owncloud&amp;quot; \&lt;br /&gt;
     --database-pass &amp;quot;password&amp;quot; \&lt;br /&gt;
     --data-dir &amp;quot;/var/www/htdocs/owncloud/data&amp;quot; \&lt;br /&gt;
     --admin-user &amp;quot;admin&amp;quot; \&lt;br /&gt;
     --admin-pass &amp;quot;admin&amp;quot;&lt;br /&gt;
 ownCloud was successfully installed&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure ownCloud’s Trusted Domains ==&lt;br /&gt;
&lt;br /&gt;
 # my_ip=$(hostname -I|cut -f1 -d ' ')&lt;br /&gt;
 # occ config:system:set trusted_domains 1 --value=&amp;quot;$my_ip&amp;quot;&lt;br /&gt;
 System config value trusted_domains =&amp;gt; 1 set to string '''&amp;lt;i&amp;gt;x.y.z.t&amp;lt;/i&amp;gt;'''&lt;br /&gt;
 # occ config:system:set trusted_domains 2 --value=&amp;quot;$HOSTNAME&amp;quot;&lt;br /&gt;
 System config value trusted_domains =&amp;gt; 2 set to string '''&amp;lt;i&amp;gt;your.domain.tld&amp;lt;/i&amp;gt;'''&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure the cron jobs ==&lt;br /&gt;
&lt;br /&gt;
Set your background job mode to cron:&lt;br /&gt;
&lt;br /&gt;
 # occ background:cron&lt;br /&gt;
 Set mode for background jobs to 'cron'&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure the execution of the cron job to every 15 min and the cleanup of chunks every night at 2 am: ==&lt;br /&gt;
&lt;br /&gt;
 # echo &amp;quot;MIN HOUR DAY MONTH DAYOFWEEK COMMAND&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # echo &amp;quot;*/15  *  *  *  * /var/www/htdocs/owncloud/occ system:cron&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # echo &amp;quot;0  2  *  *  * /var/www/htdocs/owncloud/occ dav:cleanup-chunks&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # chgrp apache /var/spool/cron/crontabs/apache&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure Log Rotation ==&lt;br /&gt;
&lt;br /&gt;
 # FILE=&amp;quot;/etc/logrotate.d/owncloud&amp;quot;&lt;br /&gt;
 # cat &amp;lt;&amp;lt;EOM &amp;gt;$FILE&lt;br /&gt;
 /var/www/htdocs/owncloud/data/owncloud.log {&lt;br /&gt;
 size 10M&lt;br /&gt;
 rotate 12&lt;br /&gt;
 copytruncate&lt;br /&gt;
 missingok&lt;br /&gt;
 compress&lt;br /&gt;
 compresscmd /bin/gzip&lt;br /&gt;
 }&lt;br /&gt;
 EOM&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Asterisk]]|[[Main Page]]|[[Desktop software]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=OwnCloud&amp;diff=166</id>
		<title>OwnCloud</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=OwnCloud&amp;diff=166"/>
				<updated>2026-03-21T18:00:28Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Creating the OwnCloud database */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is OwnCloud ? ==&lt;br /&gt;
&lt;br /&gt;
[http://owncloud.com/ OwnCloud] is a file synchronization server. It affords keeping a hierarchy of files synchronized on different clients and operating systems.&lt;br /&gt;
&lt;br /&gt;
The [https://doc.owncloud.com/server/10.15/admin_manual/installation/quick_guides/ubuntu_20_04.html/ Owncloud install doc] provided is for Ubuntu.&lt;br /&gt;
&lt;br /&gt;
It is adapted below for Slackware 15.0.&lt;br /&gt;
&lt;br /&gt;
== Installing OwnCloud ==&lt;br /&gt;
&lt;br /&gt;
OwnCloud is a PHP application. [https://owncloud.com/download-server download] tarball then untar and install.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf owncloud-complete-20240724.tar.bz2&lt;br /&gt;
 # chown -R apache:apache owncloud&lt;br /&gt;
 # cd /var/www/htdocs&lt;br /&gt;
 # ln -s /usr/local/owncloud owncloud&lt;br /&gt;
 # chown -R apache:apache owncloud&lt;br /&gt;
&lt;br /&gt;
== Creating the occ helper script ==&lt;br /&gt;
&lt;br /&gt;
occ is an OwnCloud administration command.&lt;br /&gt;
&lt;br /&gt;
 # FILE=&amp;quot;/usr/local/bin/occ&amp;quot;&lt;br /&gt;
 # cat &amp;lt;&amp;lt;EOM &amp;gt;$FILE&lt;br /&gt;
 &amp;gt; #! /bin/bash&lt;br /&gt;
 &amp;gt; cd /usr/local/owncloud&lt;br /&gt;
 &amp;gt; sudo -E -u apache /usr/bin/php /usr/local/owncloud/occ &amp;quot;\$@&amp;quot;&lt;br /&gt;
 &amp;gt; EOM&lt;br /&gt;
 # chmod u+x $FILE&lt;br /&gt;
&lt;br /&gt;
== Creating the OwnCloud database ==&lt;br /&gt;
&lt;br /&gt;
OwnCloud can use a variety of databases. We will be using MySQL. The database can be created as follows :&lt;br /&gt;
&lt;br /&gt;
 # mysql -u root -e \&lt;br /&gt;
   &amp;quot;CREATE DATABASE IF NOT EXISTS owncloud; \&lt;br /&gt;
   CREATE USER IF NOT EXISTS 'owncloud'@'localhost' IDENTIFIED BY 'password'; \&lt;br /&gt;
   GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' WITH GRANT OPTION; \&lt;br /&gt;
   FLUSH PRIVILEGES;&amp;quot;&lt;br /&gt;
 # mysql -u root -e \&lt;br /&gt;
   &amp;quot;CREATE USER 'owncloud'@'127.0.0.1' IDENTIFIED BY 'password'; \&lt;br /&gt;
   GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'127.0.0.1'; \&lt;br /&gt;
   FLUSH PRIVILEGES;&amp;quot;&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
It is also possible to create user owncloud@localhost and database from phpmyadmin.&lt;br /&gt;
&lt;br /&gt;
== setting up the owncloud database ==&lt;br /&gt;
&lt;br /&gt;
The admin user is the one who will manage the other users and OwnCloud from the OwnCloud web page.&lt;br /&gt;
&lt;br /&gt;
 # occ maintenance:install \&lt;br /&gt;
     --database &amp;quot;mysql&amp;quot; \&lt;br /&gt;
     --database-name &amp;quot;owncloud&amp;quot; \&lt;br /&gt;
     --database-user &amp;quot;owncloud&amp;quot; \&lt;br /&gt;
     --database-pass &amp;quot;password&amp;quot; \&lt;br /&gt;
     --data-dir &amp;quot;/var/www/htdocs/owncloud/data&amp;quot; \&lt;br /&gt;
     --admin-user &amp;quot;admin&amp;quot; \&lt;br /&gt;
     --admin-pass &amp;quot;admin&amp;quot;&lt;br /&gt;
 ownCloud was successfully installed&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure ownCloud’s Trusted Domains ==&lt;br /&gt;
&lt;br /&gt;
 # my_ip=$(hostname -I|cut -f1 -d ' ')&lt;br /&gt;
 # occ config:system:set trusted_domains 1 --value=&amp;quot;$my_ip&amp;quot;&lt;br /&gt;
 System config value trusted_domains =&amp;gt; 1 set to string '''&amp;lt;i&amp;gt;x.y.z.t&amp;lt;/i&amp;gt;'''&lt;br /&gt;
 # occ config:system:set trusted_domains 2 --value=&amp;quot;$HOSTNAME&amp;quot;&lt;br /&gt;
 System config value trusted_domains =&amp;gt; 2 set to string '''&amp;lt;i&amp;gt;your.domain.tld&amp;lt;/i&amp;gt;'''&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure the cron jobs ==&lt;br /&gt;
&lt;br /&gt;
Set your background job mode to cron:&lt;br /&gt;
&lt;br /&gt;
 # occ background:cron&lt;br /&gt;
 Set mode for background jobs to 'cron'&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure the execution of the cron job to every 15 min and the cleanup of chunks every night at 2 am: ==&lt;br /&gt;
&lt;br /&gt;
 # echo &amp;quot;MIN HOUR DAY MONTH DAYOFWEEK COMMAND&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # echo &amp;quot;*/15  *  *  *  * /var/www/htdocs/owncloud/occ system:cron&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # echo &amp;quot;0  2  *  *  * /var/www/htdocs/owncloud/occ dav:cleanup-chunks&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # chgrp apache /var/spool/cron/crontabs/apache&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure Log Rotation ==&lt;br /&gt;
&lt;br /&gt;
 # FILE=&amp;quot;/etc/logrotate.d/owncloud&amp;quot;&lt;br /&gt;
 # cat &amp;lt;&amp;lt;EOM &amp;gt;$FILE&lt;br /&gt;
 /var/www/htdocs/owncloud/data/owncloud.log {&lt;br /&gt;
 size 10M&lt;br /&gt;
 rotate 12&lt;br /&gt;
 copytruncate&lt;br /&gt;
 missingok&lt;br /&gt;
 compress&lt;br /&gt;
 compresscmd /bin/gzip&lt;br /&gt;
 }&lt;br /&gt;
 EOM&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Asterisk]]|[[Main Page]]|[[Desktop software]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=OwnCloud&amp;diff=165</id>
		<title>OwnCloud</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=OwnCloud&amp;diff=165"/>
				<updated>2026-03-21T13:48:38Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Configure ownCloud’s Trusted Domains */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is OwnCloud ? ==&lt;br /&gt;
&lt;br /&gt;
[http://owncloud.com/ OwnCloud] is a file synchronization server. It affords keeping a hierarchy of files synchronized on different clients and operating systems.&lt;br /&gt;
&lt;br /&gt;
The [https://doc.owncloud.com/server/10.15/admin_manual/installation/quick_guides/ubuntu_20_04.html/ Owncloud install doc] provided is for Ubuntu.&lt;br /&gt;
&lt;br /&gt;
It is adapted below for Slackware 15.0.&lt;br /&gt;
&lt;br /&gt;
== Installing OwnCloud ==&lt;br /&gt;
&lt;br /&gt;
OwnCloud is a PHP application. [https://owncloud.com/download-server download] tarball then untar and install.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf owncloud-complete-20240724.tar.bz2&lt;br /&gt;
 # chown -R apache:apache owncloud&lt;br /&gt;
 # cd /var/www/htdocs&lt;br /&gt;
 # ln -s /usr/local/owncloud owncloud&lt;br /&gt;
 # chown -R apache:apache owncloud&lt;br /&gt;
&lt;br /&gt;
== Creating the occ helper script ==&lt;br /&gt;
&lt;br /&gt;
occ is an OwnCloud administration command.&lt;br /&gt;
&lt;br /&gt;
 # FILE=&amp;quot;/usr/local/bin/occ&amp;quot;&lt;br /&gt;
 # cat &amp;lt;&amp;lt;EOM &amp;gt;$FILE&lt;br /&gt;
 &amp;gt; #! /bin/bash&lt;br /&gt;
 &amp;gt; cd /usr/local/owncloud&lt;br /&gt;
 &amp;gt; sudo -E -u apache /usr/bin/php /usr/local/owncloud/occ &amp;quot;\$@&amp;quot;&lt;br /&gt;
 &amp;gt; EOM&lt;br /&gt;
 # chmod u+x $FILE&lt;br /&gt;
&lt;br /&gt;
== Creating the OwnCloud database ==&lt;br /&gt;
&lt;br /&gt;
OwnCloud can use a variety of databases. We will be using MySQL. The database can be created as follows :&lt;br /&gt;
&lt;br /&gt;
 # mysql -u root -e \&lt;br /&gt;
   &amp;quot;CREATE DATABASE IF NOT EXISTS owncloud; \&lt;br /&gt;
   CREATE USER IF NOT EXISTS 'owncloud'@'localhost' IDENTIFIED BY 'password'; \&lt;br /&gt;
   GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' WITH GRANT OPTION; \&lt;br /&gt;
   FLUSH PRIVILEGES;&amp;quot;&lt;br /&gt;
 # mysql -u root -e \&lt;br /&gt;
   CREATE USER 'owncloud'@'127.0.0.1' IDENTIFIED BY 'password';&lt;br /&gt;
   GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'127.0.0.1';&lt;br /&gt;
   FLUSH PRIVILEGES;&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
It is also possible to create user owncloud@localhost and database from phpmyadmin.&lt;br /&gt;
&lt;br /&gt;
== setting up the owncloud database ==&lt;br /&gt;
&lt;br /&gt;
The admin user is the one who will manage the other users and OwnCloud from the OwnCloud web page.&lt;br /&gt;
&lt;br /&gt;
 # occ maintenance:install \&lt;br /&gt;
     --database &amp;quot;mysql&amp;quot; \&lt;br /&gt;
     --database-name &amp;quot;owncloud&amp;quot; \&lt;br /&gt;
     --database-user &amp;quot;owncloud&amp;quot; \&lt;br /&gt;
     --database-pass &amp;quot;password&amp;quot; \&lt;br /&gt;
     --data-dir &amp;quot;/var/www/htdocs/owncloud/data&amp;quot; \&lt;br /&gt;
     --admin-user &amp;quot;admin&amp;quot; \&lt;br /&gt;
     --admin-pass &amp;quot;admin&amp;quot;&lt;br /&gt;
 ownCloud was successfully installed&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure ownCloud’s Trusted Domains ==&lt;br /&gt;
&lt;br /&gt;
 # my_ip=$(hostname -I|cut -f1 -d ' ')&lt;br /&gt;
 # occ config:system:set trusted_domains 1 --value=&amp;quot;$my_ip&amp;quot;&lt;br /&gt;
 System config value trusted_domains =&amp;gt; 1 set to string '''&amp;lt;i&amp;gt;x.y.z.t&amp;lt;/i&amp;gt;'''&lt;br /&gt;
 # occ config:system:set trusted_domains 2 --value=&amp;quot;$HOSTNAME&amp;quot;&lt;br /&gt;
 System config value trusted_domains =&amp;gt; 2 set to string '''&amp;lt;i&amp;gt;your.domain.tld&amp;lt;/i&amp;gt;'''&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure the cron jobs ==&lt;br /&gt;
&lt;br /&gt;
Set your background job mode to cron:&lt;br /&gt;
&lt;br /&gt;
 # occ background:cron&lt;br /&gt;
 Set mode for background jobs to 'cron'&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure the execution of the cron job to every 15 min and the cleanup of chunks every night at 2 am: ==&lt;br /&gt;
&lt;br /&gt;
 # echo &amp;quot;MIN HOUR DAY MONTH DAYOFWEEK COMMAND&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # echo &amp;quot;*/15  *  *  *  * /var/www/htdocs/owncloud/occ system:cron&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # echo &amp;quot;0  2  *  *  * /var/www/htdocs/owncloud/occ dav:cleanup-chunks&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # chgrp apache /var/spool/cron/crontabs/apache&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure Log Rotation ==&lt;br /&gt;
&lt;br /&gt;
 # FILE=&amp;quot;/etc/logrotate.d/owncloud&amp;quot;&lt;br /&gt;
 # cat &amp;lt;&amp;lt;EOM &amp;gt;$FILE&lt;br /&gt;
 /var/www/htdocs/owncloud/data/owncloud.log {&lt;br /&gt;
 size 10M&lt;br /&gt;
 rotate 12&lt;br /&gt;
 copytruncate&lt;br /&gt;
 missingok&lt;br /&gt;
 compress&lt;br /&gt;
 compresscmd /bin/gzip&lt;br /&gt;
 }&lt;br /&gt;
 EOM&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Asterisk]]|[[Main Page]]|[[Desktop software]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=OwnCloud&amp;diff=164</id>
		<title>OwnCloud</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=OwnCloud&amp;diff=164"/>
				<updated>2026-03-21T13:48:11Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Configure ownCloud’s Trusted Domains */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is OwnCloud ? ==&lt;br /&gt;
&lt;br /&gt;
[http://owncloud.com/ OwnCloud] is a file synchronization server. It affords keeping a hierarchy of files synchronized on different clients and operating systems.&lt;br /&gt;
&lt;br /&gt;
The [https://doc.owncloud.com/server/10.15/admin_manual/installation/quick_guides/ubuntu_20_04.html/ Owncloud install doc] provided is for Ubuntu.&lt;br /&gt;
&lt;br /&gt;
It is adapted below for Slackware 15.0.&lt;br /&gt;
&lt;br /&gt;
== Installing OwnCloud ==&lt;br /&gt;
&lt;br /&gt;
OwnCloud is a PHP application. [https://owncloud.com/download-server download] tarball then untar and install.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf owncloud-complete-20240724.tar.bz2&lt;br /&gt;
 # chown -R apache:apache owncloud&lt;br /&gt;
 # cd /var/www/htdocs&lt;br /&gt;
 # ln -s /usr/local/owncloud owncloud&lt;br /&gt;
 # chown -R apache:apache owncloud&lt;br /&gt;
&lt;br /&gt;
== Creating the occ helper script ==&lt;br /&gt;
&lt;br /&gt;
occ is an OwnCloud administration command.&lt;br /&gt;
&lt;br /&gt;
 # FILE=&amp;quot;/usr/local/bin/occ&amp;quot;&lt;br /&gt;
 # cat &amp;lt;&amp;lt;EOM &amp;gt;$FILE&lt;br /&gt;
 &amp;gt; #! /bin/bash&lt;br /&gt;
 &amp;gt; cd /usr/local/owncloud&lt;br /&gt;
 &amp;gt; sudo -E -u apache /usr/bin/php /usr/local/owncloud/occ &amp;quot;\$@&amp;quot;&lt;br /&gt;
 &amp;gt; EOM&lt;br /&gt;
 # chmod u+x $FILE&lt;br /&gt;
&lt;br /&gt;
== Creating the OwnCloud database ==&lt;br /&gt;
&lt;br /&gt;
OwnCloud can use a variety of databases. We will be using MySQL. The database can be created as follows :&lt;br /&gt;
&lt;br /&gt;
 # mysql -u root -e \&lt;br /&gt;
   &amp;quot;CREATE DATABASE IF NOT EXISTS owncloud; \&lt;br /&gt;
   CREATE USER IF NOT EXISTS 'owncloud'@'localhost' IDENTIFIED BY 'password'; \&lt;br /&gt;
   GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' WITH GRANT OPTION; \&lt;br /&gt;
   FLUSH PRIVILEGES;&amp;quot;&lt;br /&gt;
 # mysql -u root -e \&lt;br /&gt;
   CREATE USER 'owncloud'@'127.0.0.1' IDENTIFIED BY 'password';&lt;br /&gt;
   GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'127.0.0.1';&lt;br /&gt;
   FLUSH PRIVILEGES;&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
It is also possible to create user owncloud@localhost and database from phpmyadmin.&lt;br /&gt;
&lt;br /&gt;
== setting up the owncloud database ==&lt;br /&gt;
&lt;br /&gt;
The admin user is the one who will manage the other users and OwnCloud from the OwnCloud web page.&lt;br /&gt;
&lt;br /&gt;
 # occ maintenance:install \&lt;br /&gt;
     --database &amp;quot;mysql&amp;quot; \&lt;br /&gt;
     --database-name &amp;quot;owncloud&amp;quot; \&lt;br /&gt;
     --database-user &amp;quot;owncloud&amp;quot; \&lt;br /&gt;
     --database-pass &amp;quot;password&amp;quot; \&lt;br /&gt;
     --data-dir &amp;quot;/var/www/htdocs/owncloud/data&amp;quot; \&lt;br /&gt;
     --admin-user &amp;quot;admin&amp;quot; \&lt;br /&gt;
     --admin-pass &amp;quot;admin&amp;quot;&lt;br /&gt;
 ownCloud was successfully installed&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure ownCloud’s Trusted Domains ==&lt;br /&gt;
&lt;br /&gt;
 # my_ip=$(hostname -I|cut -f1 -d ' ')&lt;br /&gt;
 # occ config:system:set trusted_domains 1 --value=&amp;quot;$my_ip&amp;quot;&lt;br /&gt;
 System config value trusted_domains =&amp;gt; 1 set to string &amp;lt;i&amp;gt;x.y.z.t&amp;lt;/i&amp;gt;&lt;br /&gt;
 # occ config:system:set trusted_domains 2 --value=&amp;quot;$HOSTNAME&amp;quot;&lt;br /&gt;
 System config value trusted_domains =&amp;gt; 2 set to string &amp;lt;i&amp;gt;your.domain.tld&amp;lt;/i&amp;gt;&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure the cron jobs ==&lt;br /&gt;
&lt;br /&gt;
Set your background job mode to cron:&lt;br /&gt;
&lt;br /&gt;
 # occ background:cron&lt;br /&gt;
 Set mode for background jobs to 'cron'&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure the execution of the cron job to every 15 min and the cleanup of chunks every night at 2 am: ==&lt;br /&gt;
&lt;br /&gt;
 # echo &amp;quot;MIN HOUR DAY MONTH DAYOFWEEK COMMAND&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # echo &amp;quot;*/15  *  *  *  * /var/www/htdocs/owncloud/occ system:cron&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # echo &amp;quot;0  2  *  *  * /var/www/htdocs/owncloud/occ dav:cleanup-chunks&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # chgrp apache /var/spool/cron/crontabs/apache&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure Log Rotation ==&lt;br /&gt;
&lt;br /&gt;
 # FILE=&amp;quot;/etc/logrotate.d/owncloud&amp;quot;&lt;br /&gt;
 # cat &amp;lt;&amp;lt;EOM &amp;gt;$FILE&lt;br /&gt;
 /var/www/htdocs/owncloud/data/owncloud.log {&lt;br /&gt;
 size 10M&lt;br /&gt;
 rotate 12&lt;br /&gt;
 copytruncate&lt;br /&gt;
 missingok&lt;br /&gt;
 compress&lt;br /&gt;
 compresscmd /bin/gzip&lt;br /&gt;
 }&lt;br /&gt;
 EOM&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Asterisk]]|[[Main Page]]|[[Desktop software]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=OwnCloud&amp;diff=163</id>
		<title>OwnCloud</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=OwnCloud&amp;diff=163"/>
				<updated>2026-03-21T13:44:16Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Creating the OwnCloud database */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is OwnCloud ? ==&lt;br /&gt;
&lt;br /&gt;
[http://owncloud.com/ OwnCloud] is a file synchronization server. It affords keeping a hierarchy of files synchronized on different clients and operating systems.&lt;br /&gt;
&lt;br /&gt;
The [https://doc.owncloud.com/server/10.15/admin_manual/installation/quick_guides/ubuntu_20_04.html/ Owncloud install doc] provided is for Ubuntu.&lt;br /&gt;
&lt;br /&gt;
It is adapted below for Slackware 15.0.&lt;br /&gt;
&lt;br /&gt;
== Installing OwnCloud ==&lt;br /&gt;
&lt;br /&gt;
OwnCloud is a PHP application. [https://owncloud.com/download-server download] tarball then untar and install.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf owncloud-complete-20240724.tar.bz2&lt;br /&gt;
 # chown -R apache:apache owncloud&lt;br /&gt;
 # cd /var/www/htdocs&lt;br /&gt;
 # ln -s /usr/local/owncloud owncloud&lt;br /&gt;
 # chown -R apache:apache owncloud&lt;br /&gt;
&lt;br /&gt;
== Creating the occ helper script ==&lt;br /&gt;
&lt;br /&gt;
occ is an OwnCloud administration command.&lt;br /&gt;
&lt;br /&gt;
 # FILE=&amp;quot;/usr/local/bin/occ&amp;quot;&lt;br /&gt;
 # cat &amp;lt;&amp;lt;EOM &amp;gt;$FILE&lt;br /&gt;
 &amp;gt; #! /bin/bash&lt;br /&gt;
 &amp;gt; cd /usr/local/owncloud&lt;br /&gt;
 &amp;gt; sudo -E -u apache /usr/bin/php /usr/local/owncloud/occ &amp;quot;\$@&amp;quot;&lt;br /&gt;
 &amp;gt; EOM&lt;br /&gt;
 # chmod u+x $FILE&lt;br /&gt;
&lt;br /&gt;
== Creating the OwnCloud database ==&lt;br /&gt;
&lt;br /&gt;
OwnCloud can use a variety of databases. We will be using MySQL. The database can be created as follows :&lt;br /&gt;
&lt;br /&gt;
 # mysql -u root -e \&lt;br /&gt;
   &amp;quot;CREATE DATABASE IF NOT EXISTS owncloud; \&lt;br /&gt;
   CREATE USER IF NOT EXISTS 'owncloud'@'localhost' IDENTIFIED BY 'password'; \&lt;br /&gt;
   GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' WITH GRANT OPTION; \&lt;br /&gt;
   FLUSH PRIVILEGES;&amp;quot;&lt;br /&gt;
 # mysql -u root -e \&lt;br /&gt;
   CREATE USER 'owncloud'@'127.0.0.1' IDENTIFIED BY 'password';&lt;br /&gt;
   GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'127.0.0.1';&lt;br /&gt;
   FLUSH PRIVILEGES;&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
It is also possible to create user owncloud@localhost and database from phpmyadmin.&lt;br /&gt;
&lt;br /&gt;
== setting up the owncloud database ==&lt;br /&gt;
&lt;br /&gt;
The admin user is the one who will manage the other users and OwnCloud from the OwnCloud web page.&lt;br /&gt;
&lt;br /&gt;
 # occ maintenance:install \&lt;br /&gt;
     --database &amp;quot;mysql&amp;quot; \&lt;br /&gt;
     --database-name &amp;quot;owncloud&amp;quot; \&lt;br /&gt;
     --database-user &amp;quot;owncloud&amp;quot; \&lt;br /&gt;
     --database-pass &amp;quot;password&amp;quot; \&lt;br /&gt;
     --data-dir &amp;quot;/var/www/htdocs/owncloud/data&amp;quot; \&lt;br /&gt;
     --admin-user &amp;quot;admin&amp;quot; \&lt;br /&gt;
     --admin-pass &amp;quot;admin&amp;quot;&lt;br /&gt;
 ownCloud was successfully installed&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure ownCloud’s Trusted Domains ==&lt;br /&gt;
&lt;br /&gt;
 # my_ip=$(hostname -I|cut -f1 -d ' ')&lt;br /&gt;
 # occ config:system:set trusted_domains 1 --value=&amp;quot;$my_ip&amp;quot;&lt;br /&gt;
 System config value trusted_domains =&amp;gt; 1 set to string x.y.z.t&lt;br /&gt;
 # occ config:system:set trusted_domains 2 --value=&amp;quot;$HOSTNAME&amp;quot;&lt;br /&gt;
 System config value trusted_domains =&amp;gt; 2 set to string your.domain.tld&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure the cron jobs ==&lt;br /&gt;
&lt;br /&gt;
Set your background job mode to cron:&lt;br /&gt;
&lt;br /&gt;
 # occ background:cron&lt;br /&gt;
 Set mode for background jobs to 'cron'&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure the execution of the cron job to every 15 min and the cleanup of chunks every night at 2 am: ==&lt;br /&gt;
&lt;br /&gt;
 # echo &amp;quot;MIN HOUR DAY MONTH DAYOFWEEK COMMAND&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # echo &amp;quot;*/15  *  *  *  * /var/www/htdocs/owncloud/occ system:cron&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # echo &amp;quot;0  2  *  *  * /var/www/htdocs/owncloud/occ dav:cleanup-chunks&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # chgrp apache /var/spool/cron/crontabs/apache&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure Log Rotation ==&lt;br /&gt;
&lt;br /&gt;
 # FILE=&amp;quot;/etc/logrotate.d/owncloud&amp;quot;&lt;br /&gt;
 # cat &amp;lt;&amp;lt;EOM &amp;gt;$FILE&lt;br /&gt;
 /var/www/htdocs/owncloud/data/owncloud.log {&lt;br /&gt;
 size 10M&lt;br /&gt;
 rotate 12&lt;br /&gt;
 copytruncate&lt;br /&gt;
 missingok&lt;br /&gt;
 compress&lt;br /&gt;
 compresscmd /bin/gzip&lt;br /&gt;
 }&lt;br /&gt;
 EOM&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Asterisk]]|[[Main Page]]|[[Desktop software]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=OwnCloud&amp;diff=162</id>
		<title>OwnCloud</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=OwnCloud&amp;diff=162"/>
				<updated>2026-03-21T13:43:48Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Creating the OwnCloud database */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is OwnCloud ? ==&lt;br /&gt;
&lt;br /&gt;
[http://owncloud.com/ OwnCloud] is a file synchronization server. It affords keeping a hierarchy of files synchronized on different clients and operating systems.&lt;br /&gt;
&lt;br /&gt;
The [https://doc.owncloud.com/server/10.15/admin_manual/installation/quick_guides/ubuntu_20_04.html/ Owncloud install doc] provided is for Ubuntu.&lt;br /&gt;
&lt;br /&gt;
It is adapted below for Slackware 15.0.&lt;br /&gt;
&lt;br /&gt;
== Installing OwnCloud ==&lt;br /&gt;
&lt;br /&gt;
OwnCloud is a PHP application. [https://owncloud.com/download-server download] tarball then untar and install.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf owncloud-complete-20240724.tar.bz2&lt;br /&gt;
 # chown -R apache:apache owncloud&lt;br /&gt;
 # cd /var/www/htdocs&lt;br /&gt;
 # ln -s /usr/local/owncloud owncloud&lt;br /&gt;
 # chown -R apache:apache owncloud&lt;br /&gt;
&lt;br /&gt;
== Creating the occ helper script ==&lt;br /&gt;
&lt;br /&gt;
occ is an OwnCloud administration command.&lt;br /&gt;
&lt;br /&gt;
 # FILE=&amp;quot;/usr/local/bin/occ&amp;quot;&lt;br /&gt;
 # cat &amp;lt;&amp;lt;EOM &amp;gt;$FILE&lt;br /&gt;
 &amp;gt; #! /bin/bash&lt;br /&gt;
 &amp;gt; cd /usr/local/owncloud&lt;br /&gt;
 &amp;gt; sudo -E -u apache /usr/bin/php /usr/local/owncloud/occ &amp;quot;\$@&amp;quot;&lt;br /&gt;
 &amp;gt; EOM&lt;br /&gt;
 # chmod u+x $FILE&lt;br /&gt;
&lt;br /&gt;
== Creating the OwnCloud database ==&lt;br /&gt;
&lt;br /&gt;
OwnCloud can use a variety of databases. We will be using MySQL. The database can be created as follows :&lt;br /&gt;
&lt;br /&gt;
 # mysql -u root -e \&lt;br /&gt;
   &amp;quot;CREATE DATABASE IF NOT EXISTS owncloud; \&lt;br /&gt;
   CREATE USER IF NOT EXISTS 'owncloud'@'localhost' IDENTIFIED BY 'password'; \&lt;br /&gt;
   GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' WITH GRANT OPTION; \&lt;br /&gt;
   FLUSH PRIVILEGES;&amp;quot;&lt;br /&gt;
 # mysql -u root -e \&lt;br /&gt;
   CREATE USER 'owncloud'@'127.0.0.1' IDENTIFIED BY 'z0m8upnt';&lt;br /&gt;
   GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'127.0.0.1';&lt;br /&gt;
   FLUSH PRIVILEGES;&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
It is also possible to create user owncloud@localhost and database from phpmyadmin.&lt;br /&gt;
&lt;br /&gt;
== setting up the owncloud database ==&lt;br /&gt;
&lt;br /&gt;
The admin user is the one who will manage the other users and OwnCloud from the OwnCloud web page.&lt;br /&gt;
&lt;br /&gt;
 # occ maintenance:install \&lt;br /&gt;
     --database &amp;quot;mysql&amp;quot; \&lt;br /&gt;
     --database-name &amp;quot;owncloud&amp;quot; \&lt;br /&gt;
     --database-user &amp;quot;owncloud&amp;quot; \&lt;br /&gt;
     --database-pass &amp;quot;password&amp;quot; \&lt;br /&gt;
     --data-dir &amp;quot;/var/www/htdocs/owncloud/data&amp;quot; \&lt;br /&gt;
     --admin-user &amp;quot;admin&amp;quot; \&lt;br /&gt;
     --admin-pass &amp;quot;admin&amp;quot;&lt;br /&gt;
 ownCloud was successfully installed&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure ownCloud’s Trusted Domains ==&lt;br /&gt;
&lt;br /&gt;
 # my_ip=$(hostname -I|cut -f1 -d ' ')&lt;br /&gt;
 # occ config:system:set trusted_domains 1 --value=&amp;quot;$my_ip&amp;quot;&lt;br /&gt;
 System config value trusted_domains =&amp;gt; 1 set to string x.y.z.t&lt;br /&gt;
 # occ config:system:set trusted_domains 2 --value=&amp;quot;$HOSTNAME&amp;quot;&lt;br /&gt;
 System config value trusted_domains =&amp;gt; 2 set to string your.domain.tld&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure the cron jobs ==&lt;br /&gt;
&lt;br /&gt;
Set your background job mode to cron:&lt;br /&gt;
&lt;br /&gt;
 # occ background:cron&lt;br /&gt;
 Set mode for background jobs to 'cron'&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure the execution of the cron job to every 15 min and the cleanup of chunks every night at 2 am: ==&lt;br /&gt;
&lt;br /&gt;
 # echo &amp;quot;MIN HOUR DAY MONTH DAYOFWEEK COMMAND&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # echo &amp;quot;*/15  *  *  *  * /var/www/htdocs/owncloud/occ system:cron&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # echo &amp;quot;0  2  *  *  * /var/www/htdocs/owncloud/occ dav:cleanup-chunks&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # chgrp apache /var/spool/cron/crontabs/apache&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure Log Rotation ==&lt;br /&gt;
&lt;br /&gt;
 # FILE=&amp;quot;/etc/logrotate.d/owncloud&amp;quot;&lt;br /&gt;
 # cat &amp;lt;&amp;lt;EOM &amp;gt;$FILE&lt;br /&gt;
 /var/www/htdocs/owncloud/data/owncloud.log {&lt;br /&gt;
 size 10M&lt;br /&gt;
 rotate 12&lt;br /&gt;
 copytruncate&lt;br /&gt;
 missingok&lt;br /&gt;
 compress&lt;br /&gt;
 compresscmd /bin/gzip&lt;br /&gt;
 }&lt;br /&gt;
 EOM&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Asterisk]]|[[Main Page]]|[[Desktop software]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=OwnCloud&amp;diff=161</id>
		<title>OwnCloud</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=OwnCloud&amp;diff=161"/>
				<updated>2026-03-21T13:30:30Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Creating the OwnCloud database */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is OwnCloud ? ==&lt;br /&gt;
&lt;br /&gt;
[http://owncloud.com/ OwnCloud] is a file synchronization server. It affords keeping a hierarchy of files synchronized on different clients and operating systems.&lt;br /&gt;
&lt;br /&gt;
The [https://doc.owncloud.com/server/10.15/admin_manual/installation/quick_guides/ubuntu_20_04.html/ Owncloud install doc] provided is for Ubuntu.&lt;br /&gt;
&lt;br /&gt;
It is adapted below for Slackware 15.0.&lt;br /&gt;
&lt;br /&gt;
== Installing OwnCloud ==&lt;br /&gt;
&lt;br /&gt;
OwnCloud is a PHP application. [https://owncloud.com/download-server download] tarball then untar and install.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf owncloud-complete-20240724.tar.bz2&lt;br /&gt;
 # chown -R apache:apache owncloud&lt;br /&gt;
 # cd /var/www/htdocs&lt;br /&gt;
 # ln -s /usr/local/owncloud owncloud&lt;br /&gt;
 # chown -R apache:apache owncloud&lt;br /&gt;
&lt;br /&gt;
== Creating the occ helper script ==&lt;br /&gt;
&lt;br /&gt;
occ is an OwnCloud administration command.&lt;br /&gt;
&lt;br /&gt;
 # FILE=&amp;quot;/usr/local/bin/occ&amp;quot;&lt;br /&gt;
 # cat &amp;lt;&amp;lt;EOM &amp;gt;$FILE&lt;br /&gt;
 &amp;gt; #! /bin/bash&lt;br /&gt;
 &amp;gt; cd /usr/local/owncloud&lt;br /&gt;
 &amp;gt; sudo -E -u apache /usr/bin/php /usr/local/owncloud/occ &amp;quot;\$@&amp;quot;&lt;br /&gt;
 &amp;gt; EOM&lt;br /&gt;
 # chmod u+x $FILE&lt;br /&gt;
&lt;br /&gt;
== Creating the OwnCloud database ==&lt;br /&gt;
&lt;br /&gt;
OwnCloud can use a variety of databases. We will be using MySQL. The database can be created as follows :&lt;br /&gt;
&lt;br /&gt;
 # mysql -u root -e \&lt;br /&gt;
   &amp;quot;CREATE DATABASE IF NOT EXISTS owncloud; \&lt;br /&gt;
   CREATE USER IF NOT EXISTS 'owncloud'@'localhost' IDENTIFIED BY 'password'; \&lt;br /&gt;
   GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' WITH GRANT OPTION; \&lt;br /&gt;
   FLUSH PRIVILEGES;&amp;quot;&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
It is also possible to create user owncloud@localhost and database from phpmyadmin.&lt;br /&gt;
&lt;br /&gt;
== setting up the owncloud database ==&lt;br /&gt;
&lt;br /&gt;
The admin user is the one who will manage the other users and OwnCloud from the OwnCloud web page.&lt;br /&gt;
&lt;br /&gt;
 # occ maintenance:install \&lt;br /&gt;
     --database &amp;quot;mysql&amp;quot; \&lt;br /&gt;
     --database-name &amp;quot;owncloud&amp;quot; \&lt;br /&gt;
     --database-user &amp;quot;owncloud&amp;quot; \&lt;br /&gt;
     --database-pass &amp;quot;password&amp;quot; \&lt;br /&gt;
     --data-dir &amp;quot;/var/www/htdocs/owncloud/data&amp;quot; \&lt;br /&gt;
     --admin-user &amp;quot;admin&amp;quot; \&lt;br /&gt;
     --admin-pass &amp;quot;admin&amp;quot;&lt;br /&gt;
 ownCloud was successfully installed&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure ownCloud’s Trusted Domains ==&lt;br /&gt;
&lt;br /&gt;
 # my_ip=$(hostname -I|cut -f1 -d ' ')&lt;br /&gt;
 # occ config:system:set trusted_domains 1 --value=&amp;quot;$my_ip&amp;quot;&lt;br /&gt;
 System config value trusted_domains =&amp;gt; 1 set to string x.y.z.t&lt;br /&gt;
 # occ config:system:set trusted_domains 2 --value=&amp;quot;$HOSTNAME&amp;quot;&lt;br /&gt;
 System config value trusted_domains =&amp;gt; 2 set to string your.domain.tld&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure the cron jobs ==&lt;br /&gt;
&lt;br /&gt;
Set your background job mode to cron:&lt;br /&gt;
&lt;br /&gt;
 # occ background:cron&lt;br /&gt;
 Set mode for background jobs to 'cron'&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure the execution of the cron job to every 15 min and the cleanup of chunks every night at 2 am: ==&lt;br /&gt;
&lt;br /&gt;
 # echo &amp;quot;MIN HOUR DAY MONTH DAYOFWEEK COMMAND&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # echo &amp;quot;*/15  *  *  *  * /var/www/htdocs/owncloud/occ system:cron&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # echo &amp;quot;0  2  *  *  * /var/www/htdocs/owncloud/occ dav:cleanup-chunks&amp;quot; &amp;gt;&amp;gt; /var/spool/cron/crontabs/apache&lt;br /&gt;
 # chgrp apache /var/spool/cron/crontabs/apache&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Configure Log Rotation ==&lt;br /&gt;
&lt;br /&gt;
 # FILE=&amp;quot;/etc/logrotate.d/owncloud&amp;quot;&lt;br /&gt;
 # cat &amp;lt;&amp;lt;EOM &amp;gt;$FILE&lt;br /&gt;
 /var/www/htdocs/owncloud/data/owncloud.log {&lt;br /&gt;
 size 10M&lt;br /&gt;
 rotate 12&lt;br /&gt;
 copytruncate&lt;br /&gt;
 missingok&lt;br /&gt;
 compress&lt;br /&gt;
 compresscmd /bin/gzip&lt;br /&gt;
 }&lt;br /&gt;
 EOM&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Asterisk]]|[[Main Page]]|[[Desktop software]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=160</id>
		<title>Linux basics</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=160"/>
				<updated>2026-03-21T12:24:04Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Useful linux commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using VI ==&lt;br /&gt;
&lt;br /&gt;
'''vi''' (pronounced vee-eye) is the Unix standard text editor so affords editing the configuration files by hand. If you don’t know it yet, it can be a bit surprising. Actually, '''vi''' was created at a time when the keyboards did not have any arrow or insert keys. So there are two modes: the «open» mode and the «insert» mode.&lt;br /&gt;
&lt;br /&gt;
The open mode affords moving the cursor. '''j''', '''k''', '''l''', '''m''' move the cursor by one character. '''ctrl-f''' moves one page forward and '''ctrl-b''' moves one page backwards. '''w''' moves one word forward and  '''b''' moves one word backwards. It is also possible to use the arrow keys.&lt;br /&gt;
&lt;br /&gt;
'''i''' goes into insert mode before the cursor, '''a''' goes into insert mode after the cursor, and '''A''' goes into insert mode at the end of the line. '''o''' adds a line after the current line, and '''O''' adds a live before the current line. '''R''' goes into rewrite mode.&lt;br /&gt;
&lt;br /&gt;
'''esc''' affords getting out of the insert mode.&lt;br /&gt;
&lt;br /&gt;
'''c$''' affords replacing the end of the line and '''d$''' affords deleting the end of the line. '''cw''' affords replacing one word and '''dw''' affords deleting one word. '''dd''' affords deleting the current line.&lt;br /&gt;
&lt;br /&gt;
''':q''' affords quitting without saving. If the file has been modified, quitting must be forced by typing ''':q!'''. ''':x''' affords saving and quitting. If the file does not have the write rigths, saving must be forced by typing ''':x!'''. ''':w''' affords writing the text in a new file. If the new file already exists, writing must be forced by typing ''':w!'''.&lt;br /&gt;
&lt;br /&gt;
''':num''' affords moving to the line number num. ''':$''' affords moving to the end of the file.&lt;br /&gt;
''':num1copynum2''' affords copying the line number num1 after the line number num2. ''':num1mnum2''' affords moving the line number num1 after the line number num2.&lt;br /&gt;
&lt;br /&gt;
For detailed information, check the [http://vimdoc.sourceforge.net/htmldoc/help.html VIM Documentation]. To enter special characters check the page on [http://vimdoc.sourceforge.net/htmldoc/digraph.html digraphs]. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
&lt;br /&gt;
To get syntax highligting instead of '''vi''' use the '''vim'''(vi improved) replacement :&lt;br /&gt;
&lt;br /&gt;
 # '''cd /usr/bin'''&lt;br /&gt;
 # '''rm vi'''&lt;br /&gt;
 # '''ln -s vim vi'''&lt;br /&gt;
&lt;br /&gt;
== Using SSH ==&lt;br /&gt;
&lt;br /&gt;
SSH is a suite of tools affording connecting remotely over encrypted communications. On the client side, '''ssh''' offers a command line terminal, '''scp''' affords copying a file, and '''sftp''' behaves like ftp. The server side consists of sshd, sftp-server, and ssh-agent. ssh-add, ssh-keysign, ssh-keyscan, and ssh-keygen afford key management. The SSH present on Slackware and the BSDs is [https://www.openssh.com/ OpenSSH], developped by members of the [https://www.openbsd.org/ OpenBSD] project.&lt;br /&gt;
&lt;br /&gt;
'''ssh''' obviously requires your password every time it is executed. This can be avoided by creating on the client a pair of rsa keys and copying the public key to the server. Not specifying a passphrase is not very secure but will afford avoiding having to enter it every time :&lt;br /&gt;
&lt;br /&gt;
 # '''ssh-keygen -t rsa'''&lt;br /&gt;
 Generating public/private rsa key pair.&lt;br /&gt;
 Enter file in which to save the key (/root/.ssh/id_rsa): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter passphrase (empty for no passphrase): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter same passphrase again: '''cr&amp;gt;'''&lt;br /&gt;
 Your identification has been saved in /root/.ssh/id_rsa.&lt;br /&gt;
 Your public key has been saved in /root/.ssh/id_rsa.pub.&lt;br /&gt;
 The key fingerprint is:&lt;br /&gt;
 SHA256:ATSDdER5/l8OJvr+jpINIReJtd81zntVbTjuJW5aobE root@client&lt;br /&gt;
 The key's randomart image is:&lt;br /&gt;
 +---[RSA 2048]----+&lt;br /&gt;
 |   ..=O+..       |&lt;br /&gt;
 |    ..o++.     ..|&lt;br /&gt;
 |       oo.    = +|&lt;br /&gt;
 |      . +o . = +.|&lt;br /&gt;
 |       oSo. o * o|&lt;br /&gt;
 |        . o o*.=.|&lt;br /&gt;
 |         = +E+* .|&lt;br /&gt;
 |        + ...+.. |&lt;br /&gt;
 |         ++o+    |&lt;br /&gt;
 +----[SHA256]-----+&lt;br /&gt;
 # '''scp root@client:.ssh/id_rsa.pub root@server:.ssh/id_rsa.pub'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 id_rsa.pub                                          100% 394      1.8MB/s   00:00&lt;br /&gt;
 # '''ssh server'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 # '''cd .ssh'''&lt;br /&gt;
 # '''cat &amp;gt;&amp;gt; authorized_keys &amp;lt; id_rsa.pub'''&lt;br /&gt;
 # '''chmod 600 authorized_keys'''&lt;br /&gt;
 # '''rm id_rsa.pub'''&lt;br /&gt;
&lt;br /&gt;
== Useful linux commands ==&lt;br /&gt;
&lt;br /&gt;
{| {{thead}}&lt;br /&gt;
|-&lt;br /&gt;
! {{chead}} width=&amp;quot;220&amp;quot; | Command&lt;br /&gt;
! {{chead}} | Effect&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''cd'''&amp;lt;/tt&amp;gt;||change directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chmod -R ppp ddd'''&amp;lt;/tt&amp;gt;||recursively change permissions on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chown -R uuu:ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change user:group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chgrp -R ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''command xxx &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; grep yyy'''&amp;lt;/tt&amp;gt;||search for string yyy in output of command xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ethtool -s eth0 wol g'''&amp;lt;/tt&amp;gt;||puts interface eth0 in wake-on-lan status.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''find xxx -name yyy -print'''&amp;lt;/tt&amp;gt;||find file yyy in in subdirectories of xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''groupadd &amp;lt;&amp;lt;i&amp;gt;group&amp;lt;/i&amp;gt;&amp;gt;'''&amp;lt;/tt&amp;gt;||add group &amp;lt;&amp;lt;i&amp;gt;group&amp;lt;/i&amp;gt;&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ifconfig -a'''&amp;lt;/tt&amp;gt;||print the network interfaces configuration.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''iptables -L'''&amp;lt;/tt&amp;gt;||print the firewall rules.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''killall xxx'''&amp;lt;/tt&amp;gt;||kill program named xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ldconfig'''&amp;lt;/tt&amp;gt;||reload libraries taking into account new libraries just built.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ln -s existing new'''&amp;lt;/tt&amp;gt;||create a symbolic link new to an existing directory or file.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ls -al'''&amp;lt;/tt&amp;gt;||list the working directory, including files beginning with a dot.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''man xxx'''&amp;lt;/tt&amp;gt;||display the xxx command manual page.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''more xxx'''&amp;lt;/tt&amp;gt;||display file xxx with the possibility of moving up and down. '''less''' and '''most''' are similar commands.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''mount -t ttt /dev/xxx /mnt/ddd'''&amp;lt;/tt&amp;gt;||mount device xxx as type ttt under directory ddd.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''(u)mount /mnt/ddd'''&amp;lt;/tt&amp;gt;||(u)mount device ddd as specified in /etc/fstab.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''nmap &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||check filtering status of ports on &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;. '''-sU''' for UDP.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ntpdate -bv 0.fr.pool.ntp.org'''&amp;lt;/tt&amp;gt;|| force ntp synchronization.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ps -ef'''&amp;lt;/tt&amp;gt;||list the running processes.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''pwd'''&amp;lt;/tt&amp;gt;||print working directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''rm -r'''&amp;lt;/tt&amp;gt;||remove file or directory recursively.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''route'''&amp;lt;/tt&amp;gt;||display the network routing table.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''scp -p usr1@hst1:/str1  usr2@hst2:/str2'''&amp;lt;/tt&amp;gt;||copy files between hosts.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''screen &amp;lt;i&amp;gt;-S&amp;lt;name&amp;gt;&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||screen offers a frame to run a shell, detach from it (&amp;lt;ctrl&amp;gt;-a d) and later reattach to it.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ssh &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||connect remotely to site &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''su -l uuuu'''&amp;lt;/tt&amp;gt;||execute shell as another user. if -l is used an environment similar to what the other user would have had with a direct login is provided.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''telinit n'''&amp;lt;/tt&amp;gt;||go to the runlevel n (1=single-user, 3=multi-user, 4=graphical, 6=reboot).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''umask'''&amp;lt;/tt&amp;gt;||edit /etc/profile to change the default umask value of 022 and '''set it to 027''' (files not readable by other users), a good setting except when installing as root server software to be ran as a standard user account (permission issues).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''useradd &amp;lt;&amp;lt;i&amp;gt;group&amp;lt;/i&amp;gt;&amp;gt; &amp;lt;&amp;lt;i&amp;gt;user&amp;lt;/i&amp;gt;&amp;gt;'''&amp;lt;/tt&amp;gt;||add &amp;lt;&amp;lt;i&amp;gt;user&amp;lt;/i&amp;gt;&amp;gt; as a member of group &amp;lt;&amp;lt;i&amp;gt;group&amp;lt;/i&amp;gt;&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''vi'''&amp;lt;/tt&amp;gt;||run the vi text editor. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Maintaining Slackware]]|[[Main Page]]|[[Configuration files]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=159</id>
		<title>Linux basics</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=159"/>
				<updated>2026-03-21T12:22:52Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Useful linux commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using VI ==&lt;br /&gt;
&lt;br /&gt;
'''vi''' (pronounced vee-eye) is the Unix standard text editor so affords editing the configuration files by hand. If you don’t know it yet, it can be a bit surprising. Actually, '''vi''' was created at a time when the keyboards did not have any arrow or insert keys. So there are two modes: the «open» mode and the «insert» mode.&lt;br /&gt;
&lt;br /&gt;
The open mode affords moving the cursor. '''j''', '''k''', '''l''', '''m''' move the cursor by one character. '''ctrl-f''' moves one page forward and '''ctrl-b''' moves one page backwards. '''w''' moves one word forward and  '''b''' moves one word backwards. It is also possible to use the arrow keys.&lt;br /&gt;
&lt;br /&gt;
'''i''' goes into insert mode before the cursor, '''a''' goes into insert mode after the cursor, and '''A''' goes into insert mode at the end of the line. '''o''' adds a line after the current line, and '''O''' adds a live before the current line. '''R''' goes into rewrite mode.&lt;br /&gt;
&lt;br /&gt;
'''esc''' affords getting out of the insert mode.&lt;br /&gt;
&lt;br /&gt;
'''c$''' affords replacing the end of the line and '''d$''' affords deleting the end of the line. '''cw''' affords replacing one word and '''dw''' affords deleting one word. '''dd''' affords deleting the current line.&lt;br /&gt;
&lt;br /&gt;
''':q''' affords quitting without saving. If the file has been modified, quitting must be forced by typing ''':q!'''. ''':x''' affords saving and quitting. If the file does not have the write rigths, saving must be forced by typing ''':x!'''. ''':w''' affords writing the text in a new file. If the new file already exists, writing must be forced by typing ''':w!'''.&lt;br /&gt;
&lt;br /&gt;
''':num''' affords moving to the line number num. ''':$''' affords moving to the end of the file.&lt;br /&gt;
''':num1copynum2''' affords copying the line number num1 after the line number num2. ''':num1mnum2''' affords moving the line number num1 after the line number num2.&lt;br /&gt;
&lt;br /&gt;
For detailed information, check the [http://vimdoc.sourceforge.net/htmldoc/help.html VIM Documentation]. To enter special characters check the page on [http://vimdoc.sourceforge.net/htmldoc/digraph.html digraphs]. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
&lt;br /&gt;
To get syntax highligting instead of '''vi''' use the '''vim'''(vi improved) replacement :&lt;br /&gt;
&lt;br /&gt;
 # '''cd /usr/bin'''&lt;br /&gt;
 # '''rm vi'''&lt;br /&gt;
 # '''ln -s vim vi'''&lt;br /&gt;
&lt;br /&gt;
== Using SSH ==&lt;br /&gt;
&lt;br /&gt;
SSH is a suite of tools affording connecting remotely over encrypted communications. On the client side, '''ssh''' offers a command line terminal, '''scp''' affords copying a file, and '''sftp''' behaves like ftp. The server side consists of sshd, sftp-server, and ssh-agent. ssh-add, ssh-keysign, ssh-keyscan, and ssh-keygen afford key management. The SSH present on Slackware and the BSDs is [https://www.openssh.com/ OpenSSH], developped by members of the [https://www.openbsd.org/ OpenBSD] project.&lt;br /&gt;
&lt;br /&gt;
'''ssh''' obviously requires your password every time it is executed. This can be avoided by creating on the client a pair of rsa keys and copying the public key to the server. Not specifying a passphrase is not very secure but will afford avoiding having to enter it every time :&lt;br /&gt;
&lt;br /&gt;
 # '''ssh-keygen -t rsa'''&lt;br /&gt;
 Generating public/private rsa key pair.&lt;br /&gt;
 Enter file in which to save the key (/root/.ssh/id_rsa): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter passphrase (empty for no passphrase): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter same passphrase again: '''cr&amp;gt;'''&lt;br /&gt;
 Your identification has been saved in /root/.ssh/id_rsa.&lt;br /&gt;
 Your public key has been saved in /root/.ssh/id_rsa.pub.&lt;br /&gt;
 The key fingerprint is:&lt;br /&gt;
 SHA256:ATSDdER5/l8OJvr+jpINIReJtd81zntVbTjuJW5aobE root@client&lt;br /&gt;
 The key's randomart image is:&lt;br /&gt;
 +---[RSA 2048]----+&lt;br /&gt;
 |   ..=O+..       |&lt;br /&gt;
 |    ..o++.     ..|&lt;br /&gt;
 |       oo.    = +|&lt;br /&gt;
 |      . +o . = +.|&lt;br /&gt;
 |       oSo. o * o|&lt;br /&gt;
 |        . o o*.=.|&lt;br /&gt;
 |         = +E+* .|&lt;br /&gt;
 |        + ...+.. |&lt;br /&gt;
 |         ++o+    |&lt;br /&gt;
 +----[SHA256]-----+&lt;br /&gt;
 # '''scp root@client:.ssh/id_rsa.pub root@server:.ssh/id_rsa.pub'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 id_rsa.pub                                          100% 394      1.8MB/s   00:00&lt;br /&gt;
 # '''ssh server'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 # '''cd .ssh'''&lt;br /&gt;
 # '''cat &amp;gt;&amp;gt; authorized_keys &amp;lt; id_rsa.pub'''&lt;br /&gt;
 # '''chmod 600 authorized_keys'''&lt;br /&gt;
 # '''rm id_rsa.pub'''&lt;br /&gt;
&lt;br /&gt;
== Useful linux commands ==&lt;br /&gt;
&lt;br /&gt;
{| {{thead}}&lt;br /&gt;
|-&lt;br /&gt;
! {{chead}} width=&amp;quot;220&amp;quot; | Command&lt;br /&gt;
! {{chead}} | Effect&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''cd'''&amp;lt;/tt&amp;gt;||change directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chmod -R ppp ddd'''&amp;lt;/tt&amp;gt;||recursively change permissions on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chown -R uuu:ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change user:group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chgrp -R ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''command xxx &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; grep yyy'''&amp;lt;/tt&amp;gt;||search for string yyy in output of command xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ethtool -s eth0 wol g'''&amp;lt;/tt&amp;gt;||puts interface eth0 in wake-on-lan status.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''find xxx -name yyy -print'''&amp;lt;/tt&amp;gt;||find file yyy in in subdirectories of xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''groupadd &amp;lt;&amp;lt;i&amp;gt;group&amp;lt;/i&amp;gt;&amp;gt;'''&amp;lt;/tt&amp;gt;||add group &amp;lt;&amp;lt;i&amp;gt;group&amp;lt;/i&amp;gt;&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ifconfig -a'''&amp;lt;/tt&amp;gt;||print the network interfaces configuration.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''iptables -L'''&amp;lt;/tt&amp;gt;||print the firewall rules.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''killall xxx'''&amp;lt;/tt&amp;gt;||kill program named xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ldconfig'''&amp;lt;/tt&amp;gt;||reload libraries taking into account new libraries just built.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ln -s existing new'''&amp;lt;/tt&amp;gt;||create a symbolic link new to an existing directory or file.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ls -al'''&amp;lt;/tt&amp;gt;||list the working directory, including files beginning with a dot.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''man xxx'''&amp;lt;/tt&amp;gt;||display the xxx command manual page.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''more xxx'''&amp;lt;/tt&amp;gt;||display file xxx with the possibility of moving up and down. '''less''' and '''most''' are similar commands.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''mount -t ttt /dev/xxx /mnt/ddd'''&amp;lt;/tt&amp;gt;||mount device xxx as type ttt under directory ddd.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''(u)mount /mnt/ddd'''&amp;lt;/tt&amp;gt;||(u)mount device ddd as specified in /etc/fstab.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''nmap &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||check filtering status of ports on &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;. '''-sU''' for UDP.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ntpdate -bv 0.fr.pool.ntp.org'''&amp;lt;/tt&amp;gt;|| force ntp synchronization.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ps -ef'''&amp;lt;/tt&amp;gt;||list the running processes.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''pwd'''&amp;lt;/tt&amp;gt;||print working directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''rm -r'''&amp;lt;/tt&amp;gt;||remove file or directory recursively.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''route'''&amp;lt;/tt&amp;gt;||display the network routing table.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''scp -p usr1@hst1:/str1  usr2@hst2:/str2'''&amp;lt;/tt&amp;gt;||copy files between hosts.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''screen &amp;lt;i&amp;gt;-S&amp;lt;name&amp;gt;&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||screen offers a frame to run a shell, detach from it (&amp;lt;ctrl&amp;gt;-a d) and later reattach to it.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ssh &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||connect remotely to site &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''su -l uuuu'''&amp;lt;/tt&amp;gt;||execute shell as another user. if -l is used an environment similar to what the other user would have had with a direct login is provided.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''telinit n'''&amp;lt;/tt&amp;gt;||go to the runlevel n (1=single-user, 3=multi-user, 4=graphical, 6=reboot).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''umask'''&amp;lt;/tt&amp;gt;||edit /etc/profile to change the default umask value of 022 and '''set it to 027''' (files not readable by other users), a good setting except when installing as root server software to be ran as a standard user account (permission issues).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''useradd &amp;lt;group&amp;gt; &amp;lt;user&amp;gt;'''&amp;lt;/tt&amp;gt;||add &amp;lt;user&amp;gt; as a member of group &amp;lt;group&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''vi'''&amp;lt;/tt&amp;gt;||run the vi text editor. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Maintaining Slackware]]|[[Main Page]]|[[Configuration files]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=158</id>
		<title>Linux basics</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=158"/>
				<updated>2026-03-21T12:21:11Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Useful linux commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using VI ==&lt;br /&gt;
&lt;br /&gt;
'''vi''' (pronounced vee-eye) is the Unix standard text editor so affords editing the configuration files by hand. If you don’t know it yet, it can be a bit surprising. Actually, '''vi''' was created at a time when the keyboards did not have any arrow or insert keys. So there are two modes: the «open» mode and the «insert» mode.&lt;br /&gt;
&lt;br /&gt;
The open mode affords moving the cursor. '''j''', '''k''', '''l''', '''m''' move the cursor by one character. '''ctrl-f''' moves one page forward and '''ctrl-b''' moves one page backwards. '''w''' moves one word forward and  '''b''' moves one word backwards. It is also possible to use the arrow keys.&lt;br /&gt;
&lt;br /&gt;
'''i''' goes into insert mode before the cursor, '''a''' goes into insert mode after the cursor, and '''A''' goes into insert mode at the end of the line. '''o''' adds a line after the current line, and '''O''' adds a live before the current line. '''R''' goes into rewrite mode.&lt;br /&gt;
&lt;br /&gt;
'''esc''' affords getting out of the insert mode.&lt;br /&gt;
&lt;br /&gt;
'''c$''' affords replacing the end of the line and '''d$''' affords deleting the end of the line. '''cw''' affords replacing one word and '''dw''' affords deleting one word. '''dd''' affords deleting the current line.&lt;br /&gt;
&lt;br /&gt;
''':q''' affords quitting without saving. If the file has been modified, quitting must be forced by typing ''':q!'''. ''':x''' affords saving and quitting. If the file does not have the write rigths, saving must be forced by typing ''':x!'''. ''':w''' affords writing the text in a new file. If the new file already exists, writing must be forced by typing ''':w!'''.&lt;br /&gt;
&lt;br /&gt;
''':num''' affords moving to the line number num. ''':$''' affords moving to the end of the file.&lt;br /&gt;
''':num1copynum2''' affords copying the line number num1 after the line number num2. ''':num1mnum2''' affords moving the line number num1 after the line number num2.&lt;br /&gt;
&lt;br /&gt;
For detailed information, check the [http://vimdoc.sourceforge.net/htmldoc/help.html VIM Documentation]. To enter special characters check the page on [http://vimdoc.sourceforge.net/htmldoc/digraph.html digraphs]. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
&lt;br /&gt;
To get syntax highligting instead of '''vi''' use the '''vim'''(vi improved) replacement :&lt;br /&gt;
&lt;br /&gt;
 # '''cd /usr/bin'''&lt;br /&gt;
 # '''rm vi'''&lt;br /&gt;
 # '''ln -s vim vi'''&lt;br /&gt;
&lt;br /&gt;
== Using SSH ==&lt;br /&gt;
&lt;br /&gt;
SSH is a suite of tools affording connecting remotely over encrypted communications. On the client side, '''ssh''' offers a command line terminal, '''scp''' affords copying a file, and '''sftp''' behaves like ftp. The server side consists of sshd, sftp-server, and ssh-agent. ssh-add, ssh-keysign, ssh-keyscan, and ssh-keygen afford key management. The SSH present on Slackware and the BSDs is [https://www.openssh.com/ OpenSSH], developped by members of the [https://www.openbsd.org/ OpenBSD] project.&lt;br /&gt;
&lt;br /&gt;
'''ssh''' obviously requires your password every time it is executed. This can be avoided by creating on the client a pair of rsa keys and copying the public key to the server. Not specifying a passphrase is not very secure but will afford avoiding having to enter it every time :&lt;br /&gt;
&lt;br /&gt;
 # '''ssh-keygen -t rsa'''&lt;br /&gt;
 Generating public/private rsa key pair.&lt;br /&gt;
 Enter file in which to save the key (/root/.ssh/id_rsa): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter passphrase (empty for no passphrase): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter same passphrase again: '''cr&amp;gt;'''&lt;br /&gt;
 Your identification has been saved in /root/.ssh/id_rsa.&lt;br /&gt;
 Your public key has been saved in /root/.ssh/id_rsa.pub.&lt;br /&gt;
 The key fingerprint is:&lt;br /&gt;
 SHA256:ATSDdER5/l8OJvr+jpINIReJtd81zntVbTjuJW5aobE root@client&lt;br /&gt;
 The key's randomart image is:&lt;br /&gt;
 +---[RSA 2048]----+&lt;br /&gt;
 |   ..=O+..       |&lt;br /&gt;
 |    ..o++.     ..|&lt;br /&gt;
 |       oo.    = +|&lt;br /&gt;
 |      . +o . = +.|&lt;br /&gt;
 |       oSo. o * o|&lt;br /&gt;
 |        . o o*.=.|&lt;br /&gt;
 |         = +E+* .|&lt;br /&gt;
 |        + ...+.. |&lt;br /&gt;
 |         ++o+    |&lt;br /&gt;
 +----[SHA256]-----+&lt;br /&gt;
 # '''scp root@client:.ssh/id_rsa.pub root@server:.ssh/id_rsa.pub'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 id_rsa.pub                                          100% 394      1.8MB/s   00:00&lt;br /&gt;
 # '''ssh server'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 # '''cd .ssh'''&lt;br /&gt;
 # '''cat &amp;gt;&amp;gt; authorized_keys &amp;lt; id_rsa.pub'''&lt;br /&gt;
 # '''chmod 600 authorized_keys'''&lt;br /&gt;
 # '''rm id_rsa.pub'''&lt;br /&gt;
&lt;br /&gt;
== Useful linux commands ==&lt;br /&gt;
&lt;br /&gt;
{| {{thead}}&lt;br /&gt;
|-&lt;br /&gt;
! {{chead}} width=&amp;quot;220&amp;quot; | Command&lt;br /&gt;
! {{chead}} | Effect&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''cd'''&amp;lt;/tt&amp;gt;||change directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chmod -R ppp ddd'''&amp;lt;/tt&amp;gt;||recursively change permissions on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chown -R uuu:ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change user:group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chgrp -R ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''command xxx &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; grep yyy'''&amp;lt;/tt&amp;gt;||search for string yyy in output of command xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ethtool -s eth0 wol g'''&amp;lt;/tt&amp;gt;||puts interface eth0 in wake-on-lan status.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''find xxx -name yyy -print'''&amp;lt;/tt&amp;gt;||find file yyy in in subdirectories of xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''groupadd &amp;lt;group&amp;gt;'''&amp;lt;/tt&amp;gt;||add group &amp;lt;group&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ifconfig -a'''&amp;lt;/tt&amp;gt;||print the network interfaces configuration.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''iptables -L'''&amp;lt;/tt&amp;gt;||print the firewall rules.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''killall xxx'''&amp;lt;/tt&amp;gt;||kill program named xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ldconfig'''&amp;lt;/tt&amp;gt;||reload libraries taking into account new libraries just built.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ln -s existing new'''&amp;lt;/tt&amp;gt;||create a symbolic link new to an existing directory or file.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ls -al'''&amp;lt;/tt&amp;gt;||list the working directory, including files beginning with a dot.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''man xxx'''&amp;lt;/tt&amp;gt;||display the xxx command manual page.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''more xxx'''&amp;lt;/tt&amp;gt;||display file xxx with the possibility of moving up and down. '''less''' and '''most''' are similar commands.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''mount -t ttt /dev/xxx /mnt/ddd'''&amp;lt;/tt&amp;gt;||mount device xxx as type ttt under directory ddd.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''(u)mount /mnt/ddd'''&amp;lt;/tt&amp;gt;||(u)mount device ddd as specified in /etc/fstab.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''nmap &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||check filtering status of ports on &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;. '''-sU''' for UDP.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ntpdate -bv 0.fr.pool.ntp.org'''&amp;lt;/tt&amp;gt;|| force ntp synchronization.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ps -ef'''&amp;lt;/tt&amp;gt;||list the running processes.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''pwd'''&amp;lt;/tt&amp;gt;||print working directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''rm -r'''&amp;lt;/tt&amp;gt;||remove file or directory recursively.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''route'''&amp;lt;/tt&amp;gt;||display the network routing table.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''scp -p usr1@hst1:/str1  usr2@hst2:/str2'''&amp;lt;/tt&amp;gt;||copy files between hosts.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''screen &amp;lt;i&amp;gt;-S&amp;lt;name&amp;gt;&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||screen offers a frame to run a shell, detach from it (&amp;lt;ctrl&amp;gt;-a d) and later reattach to it.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ssh &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||connect remotely to site &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''su -l uuuu'''&amp;lt;/tt&amp;gt;||execute shell as another user. if -l is used an environment similar to what the other user would have had with a direct login is provided.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''telinit n'''&amp;lt;/tt&amp;gt;||go to the runlevel n (1=single-user, 3=multi-user, 4=graphical, 6=reboot).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''umask'''&amp;lt;/tt&amp;gt;||edit /etc/profile to change the default umask value of 022 and '''set it to 027''' (files not readable by other users), a good setting except when installing as root server software to be ran as a standard user account (permission issues).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''useradd &amp;lt;group&amp;gt; &amp;lt;user&amp;gt;'''&amp;lt;/tt&amp;gt;||add &amp;lt;user&amp;gt; as a member of group &amp;lt;group&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''vi'''&amp;lt;/tt&amp;gt;||run the vi text editor. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Maintaining Slackware]]|[[Main Page]]|[[Configuration files]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=157</id>
		<title>Linux basics</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=157"/>
				<updated>2026-03-21T12:17:43Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Useful linux commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using VI ==&lt;br /&gt;
&lt;br /&gt;
'''vi''' (pronounced vee-eye) is the Unix standard text editor so affords editing the configuration files by hand. If you don’t know it yet, it can be a bit surprising. Actually, '''vi''' was created at a time when the keyboards did not have any arrow or insert keys. So there are two modes: the «open» mode and the «insert» mode.&lt;br /&gt;
&lt;br /&gt;
The open mode affords moving the cursor. '''j''', '''k''', '''l''', '''m''' move the cursor by one character. '''ctrl-f''' moves one page forward and '''ctrl-b''' moves one page backwards. '''w''' moves one word forward and  '''b''' moves one word backwards. It is also possible to use the arrow keys.&lt;br /&gt;
&lt;br /&gt;
'''i''' goes into insert mode before the cursor, '''a''' goes into insert mode after the cursor, and '''A''' goes into insert mode at the end of the line. '''o''' adds a line after the current line, and '''O''' adds a live before the current line. '''R''' goes into rewrite mode.&lt;br /&gt;
&lt;br /&gt;
'''esc''' affords getting out of the insert mode.&lt;br /&gt;
&lt;br /&gt;
'''c$''' affords replacing the end of the line and '''d$''' affords deleting the end of the line. '''cw''' affords replacing one word and '''dw''' affords deleting one word. '''dd''' affords deleting the current line.&lt;br /&gt;
&lt;br /&gt;
''':q''' affords quitting without saving. If the file has been modified, quitting must be forced by typing ''':q!'''. ''':x''' affords saving and quitting. If the file does not have the write rigths, saving must be forced by typing ''':x!'''. ''':w''' affords writing the text in a new file. If the new file already exists, writing must be forced by typing ''':w!'''.&lt;br /&gt;
&lt;br /&gt;
''':num''' affords moving to the line number num. ''':$''' affords moving to the end of the file.&lt;br /&gt;
''':num1copynum2''' affords copying the line number num1 after the line number num2. ''':num1mnum2''' affords moving the line number num1 after the line number num2.&lt;br /&gt;
&lt;br /&gt;
For detailed information, check the [http://vimdoc.sourceforge.net/htmldoc/help.html VIM Documentation]. To enter special characters check the page on [http://vimdoc.sourceforge.net/htmldoc/digraph.html digraphs]. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
&lt;br /&gt;
To get syntax highligting instead of '''vi''' use the '''vim'''(vi improved) replacement :&lt;br /&gt;
&lt;br /&gt;
 # '''cd /usr/bin'''&lt;br /&gt;
 # '''rm vi'''&lt;br /&gt;
 # '''ln -s vim vi'''&lt;br /&gt;
&lt;br /&gt;
== Using SSH ==&lt;br /&gt;
&lt;br /&gt;
SSH is a suite of tools affording connecting remotely over encrypted communications. On the client side, '''ssh''' offers a command line terminal, '''scp''' affords copying a file, and '''sftp''' behaves like ftp. The server side consists of sshd, sftp-server, and ssh-agent. ssh-add, ssh-keysign, ssh-keyscan, and ssh-keygen afford key management. The SSH present on Slackware and the BSDs is [https://www.openssh.com/ OpenSSH], developped by members of the [https://www.openbsd.org/ OpenBSD] project.&lt;br /&gt;
&lt;br /&gt;
'''ssh''' obviously requires your password every time it is executed. This can be avoided by creating on the client a pair of rsa keys and copying the public key to the server. Not specifying a passphrase is not very secure but will afford avoiding having to enter it every time :&lt;br /&gt;
&lt;br /&gt;
 # '''ssh-keygen -t rsa'''&lt;br /&gt;
 Generating public/private rsa key pair.&lt;br /&gt;
 Enter file in which to save the key (/root/.ssh/id_rsa): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter passphrase (empty for no passphrase): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter same passphrase again: '''cr&amp;gt;'''&lt;br /&gt;
 Your identification has been saved in /root/.ssh/id_rsa.&lt;br /&gt;
 Your public key has been saved in /root/.ssh/id_rsa.pub.&lt;br /&gt;
 The key fingerprint is:&lt;br /&gt;
 SHA256:ATSDdER5/l8OJvr+jpINIReJtd81zntVbTjuJW5aobE root@client&lt;br /&gt;
 The key's randomart image is:&lt;br /&gt;
 +---[RSA 2048]----+&lt;br /&gt;
 |   ..=O+..       |&lt;br /&gt;
 |    ..o++.     ..|&lt;br /&gt;
 |       oo.    = +|&lt;br /&gt;
 |      . +o . = +.|&lt;br /&gt;
 |       oSo. o * o|&lt;br /&gt;
 |        . o o*.=.|&lt;br /&gt;
 |         = +E+* .|&lt;br /&gt;
 |        + ...+.. |&lt;br /&gt;
 |         ++o+    |&lt;br /&gt;
 +----[SHA256]-----+&lt;br /&gt;
 # '''scp root@client:.ssh/id_rsa.pub root@server:.ssh/id_rsa.pub'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 id_rsa.pub                                          100% 394      1.8MB/s   00:00&lt;br /&gt;
 # '''ssh server'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 # '''cd .ssh'''&lt;br /&gt;
 # '''cat &amp;gt;&amp;gt; authorized_keys &amp;lt; id_rsa.pub'''&lt;br /&gt;
 # '''chmod 600 authorized_keys'''&lt;br /&gt;
 # '''rm id_rsa.pub'''&lt;br /&gt;
&lt;br /&gt;
== Useful linux commands ==&lt;br /&gt;
&lt;br /&gt;
{| {{thead}}&lt;br /&gt;
|-&lt;br /&gt;
! {{chead}} width=&amp;quot;220&amp;quot; | Command&lt;br /&gt;
! {{chead}} | Effect&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''cd'''&amp;lt;/tt&amp;gt;||change directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chmod -R ppp ddd'''&amp;lt;/tt&amp;gt;||recursively change permissions on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chown -R uuu:ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change user:group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chgrp -R ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''command xxx &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; grep yyy'''&amp;lt;/tt&amp;gt;||search for string yyy in output of command xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ethtool -s eth0 wol g'''&amp;lt;/tt&amp;gt;||puts interface eth0 in wake-on-lan status.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''find xxx -name yyy -print'''&amp;lt;/tt&amp;gt;||find file yyy in in subdirectories of xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ifconfig -a'''&amp;lt;/tt&amp;gt;||print the network interfaces configuration.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''iptables -L'''&amp;lt;/tt&amp;gt;||print the firewall rules.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''killall xxx'''&amp;lt;/tt&amp;gt;||kill program named xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ldconfig'''&amp;lt;/tt&amp;gt;||reload libraries taking into account new libraries just built.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ln -s existing new'''&amp;lt;/tt&amp;gt;||create a symbolic link new to an existing directory or file.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ls -al'''&amp;lt;/tt&amp;gt;||list the working directory, including files beginning with a dot.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''man xxx'''&amp;lt;/tt&amp;gt;||display the xxx command manual page.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''more xxx'''&amp;lt;/tt&amp;gt;||display file xxx with the possibility of moving up and down. '''less''' and '''most''' are similar commands.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''mount -t ttt /dev/xxx /mnt/ddd'''&amp;lt;/tt&amp;gt;||mount device xxx as type ttt under directory ddd.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''(u)mount /mnt/ddd'''&amp;lt;/tt&amp;gt;||(u)mount device ddd as specified in /etc/fstab.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''nmap &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||check filtering status of ports on &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;. '''-sU''' for UDP.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ntpdate -bv 0.fr.pool.ntp.org'''&amp;lt;/tt&amp;gt;|| force ntp synchronization.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ps -ef'''&amp;lt;/tt&amp;gt;||list the running processes.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''pwd'''&amp;lt;/tt&amp;gt;||print working directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''rm -r'''&amp;lt;/tt&amp;gt;||remove file or directory recursively.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''route'''&amp;lt;/tt&amp;gt;||display the network routing table.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''scp -p usr1@hst1:/str1  usr2@hst2:/str2'''&amp;lt;/tt&amp;gt;||copy files between hosts.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''screen &amp;lt;i&amp;gt;-S&amp;lt;name&amp;gt;&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||screen offers a frame to run a shell, detach from it (&amp;lt;ctrl&amp;gt;-a d) and later reattach to it.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ssh &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||connect remotely to site &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''su -l uuuu'''&amp;lt;/tt&amp;gt;||execute shell as another user. if -l is used an environment similar to what the other user would have had with a direct login is provided.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''telinit n'''&amp;lt;/tt&amp;gt;||go to the runlevel n (1=single-user, 3=multi-user, 4=graphical, 6=reboot).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''umask'''&amp;lt;/tt&amp;gt;||edit /etc/profile to change the default umask value of 022 and '''set it to 027''' (files not readable by other users), a good setting except when installing as root server software to be ran as a standard user account (permission issues).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''vi'''&amp;lt;/tt&amp;gt;||run the vi text editor. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Maintaining Slackware]]|[[Main Page]]|[[Configuration files]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=156</id>
		<title>Linux basics</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=156"/>
				<updated>2026-03-21T12:10:37Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using VI ==&lt;br /&gt;
&lt;br /&gt;
'''vi''' (pronounced vee-eye) is the Unix standard text editor so affords editing the configuration files by hand. If you don’t know it yet, it can be a bit surprising. Actually, '''vi''' was created at a time when the keyboards did not have any arrow or insert keys. So there are two modes: the «open» mode and the «insert» mode.&lt;br /&gt;
&lt;br /&gt;
The open mode affords moving the cursor. '''j''', '''k''', '''l''', '''m''' move the cursor by one character. '''ctrl-f''' moves one page forward and '''ctrl-b''' moves one page backwards. '''w''' moves one word forward and  '''b''' moves one word backwards. It is also possible to use the arrow keys.&lt;br /&gt;
&lt;br /&gt;
'''i''' goes into insert mode before the cursor, '''a''' goes into insert mode after the cursor, and '''A''' goes into insert mode at the end of the line. '''o''' adds a line after the current line, and '''O''' adds a live before the current line. '''R''' goes into rewrite mode.&lt;br /&gt;
&lt;br /&gt;
'''esc''' affords getting out of the insert mode.&lt;br /&gt;
&lt;br /&gt;
'''c$''' affords replacing the end of the line and '''d$''' affords deleting the end of the line. '''cw''' affords replacing one word and '''dw''' affords deleting one word. '''dd''' affords deleting the current line.&lt;br /&gt;
&lt;br /&gt;
''':q''' affords quitting without saving. If the file has been modified, quitting must be forced by typing ''':q!'''. ''':x''' affords saving and quitting. If the file does not have the write rigths, saving must be forced by typing ''':x!'''. ''':w''' affords writing the text in a new file. If the new file already exists, writing must be forced by typing ''':w!'''.&lt;br /&gt;
&lt;br /&gt;
''':num''' affords moving to the line number num. ''':$''' affords moving to the end of the file.&lt;br /&gt;
''':num1copynum2''' affords copying the line number num1 after the line number num2. ''':num1mnum2''' affords moving the line number num1 after the line number num2.&lt;br /&gt;
&lt;br /&gt;
For detailed information, check the [http://vimdoc.sourceforge.net/htmldoc/help.html VIM Documentation]. To enter special characters check the page on [http://vimdoc.sourceforge.net/htmldoc/digraph.html digraphs]. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
&lt;br /&gt;
To get syntax highligting instead of '''vi''' use the '''vim'''(vi improved) replacement :&lt;br /&gt;
&lt;br /&gt;
 # '''cd /usr/bin'''&lt;br /&gt;
 # '''rm vi'''&lt;br /&gt;
 # '''ln -s vim vi'''&lt;br /&gt;
&lt;br /&gt;
== Using SSH ==&lt;br /&gt;
&lt;br /&gt;
SSH is a suite of tools affording connecting remotely over encrypted communications. On the client side, '''ssh''' offers a command line terminal, '''scp''' affords copying a file, and '''sftp''' behaves like ftp. The server side consists of sshd, sftp-server, and ssh-agent. ssh-add, ssh-keysign, ssh-keyscan, and ssh-keygen afford key management. The SSH present on Slackware and the BSDs is [https://www.openssh.com/ OpenSSH], developped by members of the [https://www.openbsd.org/ OpenBSD] project.&lt;br /&gt;
&lt;br /&gt;
'''ssh''' obviously requires your password every time it is executed. This can be avoided by creating on the client a pair of rsa keys and copying the public key to the server. Not specifying a passphrase is not very secure but will afford avoiding having to enter it every time :&lt;br /&gt;
&lt;br /&gt;
 # '''ssh-keygen -t rsa'''&lt;br /&gt;
 Generating public/private rsa key pair.&lt;br /&gt;
 Enter file in which to save the key (/root/.ssh/id_rsa): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter passphrase (empty for no passphrase): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter same passphrase again: '''cr&amp;gt;'''&lt;br /&gt;
 Your identification has been saved in /root/.ssh/id_rsa.&lt;br /&gt;
 Your public key has been saved in /root/.ssh/id_rsa.pub.&lt;br /&gt;
 The key fingerprint is:&lt;br /&gt;
 SHA256:ATSDdER5/l8OJvr+jpINIReJtd81zntVbTjuJW5aobE root@client&lt;br /&gt;
 The key's randomart image is:&lt;br /&gt;
 +---[RSA 2048]----+&lt;br /&gt;
 |   ..=O+..       |&lt;br /&gt;
 |    ..o++.     ..|&lt;br /&gt;
 |       oo.    = +|&lt;br /&gt;
 |      . +o . = +.|&lt;br /&gt;
 |       oSo. o * o|&lt;br /&gt;
 |        . o o*.=.|&lt;br /&gt;
 |         = +E+* .|&lt;br /&gt;
 |        + ...+.. |&lt;br /&gt;
 |         ++o+    |&lt;br /&gt;
 +----[SHA256]-----+&lt;br /&gt;
 # '''scp root@client:.ssh/id_rsa.pub root@server:.ssh/id_rsa.pub'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 id_rsa.pub                                          100% 394      1.8MB/s   00:00&lt;br /&gt;
 # '''ssh server'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 # '''cd .ssh'''&lt;br /&gt;
 # '''cat &amp;gt;&amp;gt; authorized_keys &amp;lt; id_rsa.pub'''&lt;br /&gt;
 # '''chmod 600 authorized_keys'''&lt;br /&gt;
 # '''rm id_rsa.pub'''&lt;br /&gt;
&lt;br /&gt;
== Useful linux commands ==&lt;br /&gt;
&lt;br /&gt;
{| {{thead}}&lt;br /&gt;
|-&lt;br /&gt;
! {{chead}} width=&amp;quot;220&amp;quot; | Command&lt;br /&gt;
! {{chead}} | Effect&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''cd'''&amp;lt;/tt&amp;gt;||change directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chmod -R ppp ddd'''&amp;lt;/tt&amp;gt;||recursively change permissions on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chown -R uuu:ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change user:group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chgrp -R ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''command xxx &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; grep yyy'''&amp;lt;/tt&amp;gt;||search for string yyy in output of command xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ethtool -s eth0 wol g'''&amp;lt;/tt&amp;gt;||puts interface eth0 in wake-on-lan status.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''find xxx -name yyy -print'''&amp;lt;/tt&amp;gt;||find file yyy in in subdirectories of xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ifconfig -a'''&amp;lt;/tt&amp;gt;||kill print the network interfaces configuration.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''iptables -L'''&amp;lt;/tt&amp;gt;||print the firewall rules.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''killall xxx'''&amp;lt;/tt&amp;gt;||kill program named xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ldconfig'''&amp;lt;/tt&amp;gt;||reload libraries taking into account new libraries just built.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ln -s existing new'''&amp;lt;/tt&amp;gt;||create a symbolic link new to an existing directory or file.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ls -al'''&amp;lt;/tt&amp;gt;||list the working directory, including files beginning with a dot.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''man xxx'''&amp;lt;/tt&amp;gt;||display the xxx command manual page.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''more xxx'''&amp;lt;/tt&amp;gt;||display file xxx with the possibility of moving up and down. '''less''' and '''most''' are similar commands.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''mount -t ttt /dev/xxx /mnt/ddd'''&amp;lt;/tt&amp;gt;||mount device xxx as type ttt under directory ddd.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''(u)mount /mnt/ddd'''&amp;lt;/tt&amp;gt;||(u)mount device ddd as specified in /etc/fstab.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''nmap &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||check filtering status of ports on &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;. '''-sU''' for UDP.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ntpdate -bv 0.fr.pool.ntp.org'''&amp;lt;/tt&amp;gt;|| force ntp synchronization.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ps -ef'''&amp;lt;/tt&amp;gt;||list the running processes.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''pwd'''&amp;lt;/tt&amp;gt;||print working directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''rm -r'''&amp;lt;/tt&amp;gt;||remove file or directory recursively.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''route'''&amp;lt;/tt&amp;gt;||display the network routing table.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''scp -p usr1@hst1:/str1  usr2@hst2:/str2'''&amp;lt;/tt&amp;gt;||copy files between hosts.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''screen &amp;lt;i&amp;gt;-S&amp;lt;name&amp;gt;&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||screen offers a frame to run a shell, detach from it (&amp;lt;ctrl&amp;gt;-a d) and later reattach to it.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ssh &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||connect remotely to site &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''su -l uuuu'''&amp;lt;/tt&amp;gt;||execute shell as another user. if -l is used an environment similar to what the other user would have had with a direct login is provided.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''telinit n'''&amp;lt;/tt&amp;gt;||go to the runlevel n (1=single-user, 3=multi-user, 4=graphical, 6=reboot).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''umask'''&amp;lt;/tt&amp;gt;||edit /etc/profile to change the default umask value of 022 and '''set it to 027''' (files not readable by other users), a good setting except when installing as root server software to be ran as a standard user account (permission issues).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''vi'''&amp;lt;/tt&amp;gt;||run the vi text editor. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Maintaining Slackware]]|[[Main Page]]|[[Configuration files]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=155</id>
		<title>Linux basics</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=155"/>
				<updated>2026-03-21T12:09:42Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using VI ==&lt;br /&gt;
&lt;br /&gt;
'''vi''' (pronounced vee-eye) is the Unix standard text editor so affords editing the configuration files by hand. If you don’t know it yet, it can be a bit surprising. Actually, '''vi''' was created at a time when the keyboards did not have any arrow or insert keys. So there are two modes: the «open» mode and the «insert» mode.&lt;br /&gt;
&lt;br /&gt;
The open mode affords moving the cursor. '''j''', '''k''', '''l''', '''m''' move the cursor by one character. '''ctrl-f''' moves one page forward and '''ctrl-b''' moves one page backwards. '''w''' moves one word forward and  '''b''' moves one word backwards. It is also possible to use the arrow keys.&lt;br /&gt;
&lt;br /&gt;
'''i''' goes into insert mode before the cursor, '''a''' goes into insert mode after the cursor, and '''A''' goes into insert mode at the end of the line. '''o''' adds a line after the current line, and '''O''' adds a live before the current line. '''R''' goes into rewrite mode.&lt;br /&gt;
&lt;br /&gt;
'''esc''' affords getting out of the insert mode.&lt;br /&gt;
&lt;br /&gt;
'''c$''' affords replacing the end of the line and '''d$''' affords deleting the end of the line. '''cw''' affords replacing one word and '''dw''' affords deleting one word. '''dd''' affords deleting the current line.&lt;br /&gt;
&lt;br /&gt;
''':q''' affords quitting without saving. If the file has been modified, quitting must be forced by typing ''':q!'''. ''':x''' affords saving and quitting. If the file does not have the write rigths, saving must be forced by typing ''':x!'''. ''':w''' affords writing the text in a new file. If the new file already exists, writing must be forced by typing ''':w!'''.&lt;br /&gt;
&lt;br /&gt;
''':num''' affords moving to the line number num. ''':$''' affords moving to the end of the file.&lt;br /&gt;
''':num1copynum2''' affords copying the line number num1 after the line number num2. ''':num1mnum2''' affords moving the line number num1 after the line number num2.&lt;br /&gt;
&lt;br /&gt;
For detailed information, check the [http://vimdoc.sourceforge.net/htmldoc/help.html VIM Documentation]. To enter special characters check the page on [http://vimdoc.sourceforge.net/htmldoc/digraph.html digraphs]. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
&lt;br /&gt;
To get syntax highligting instead of '''vi''' use the '''vim'''(vi improved) replacement :&lt;br /&gt;
&lt;br /&gt;
# cd /usr/bin&lt;br /&gt;
# rm vi&lt;br /&gt;
# ln -s vim vi&lt;br /&gt;
&lt;br /&gt;
== Using SSH ==&lt;br /&gt;
&lt;br /&gt;
SSH is a suite of tools affording connecting remotely over encrypted communications. On the client side, '''ssh''' offers a command line terminal, '''scp''' affords copying a file, and '''sftp''' behaves like ftp. The server side consists of sshd, sftp-server, and ssh-agent. ssh-add, ssh-keysign, ssh-keyscan, and ssh-keygen afford key management. The SSH present on Slackware and the BSDs is [https://www.openssh.com/ OpenSSH], developped by members of the [https://www.openbsd.org/ OpenBSD] project.&lt;br /&gt;
&lt;br /&gt;
'''ssh''' obviously requires your password every time it is executed. This can be avoided by creating on the client a pair of rsa keys and copying the public key to the server. Not specifying a passphrase is not very secure but will afford avoiding having to enter it every time :&lt;br /&gt;
&lt;br /&gt;
 # '''ssh-keygen -t rsa'''&lt;br /&gt;
 Generating public/private rsa key pair.&lt;br /&gt;
 Enter file in which to save the key (/root/.ssh/id_rsa): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter passphrase (empty for no passphrase): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter same passphrase again: '''cr&amp;gt;'''&lt;br /&gt;
 Your identification has been saved in /root/.ssh/id_rsa.&lt;br /&gt;
 Your public key has been saved in /root/.ssh/id_rsa.pub.&lt;br /&gt;
 The key fingerprint is:&lt;br /&gt;
 SHA256:ATSDdER5/l8OJvr+jpINIReJtd81zntVbTjuJW5aobE root@client&lt;br /&gt;
 The key's randomart image is:&lt;br /&gt;
 +---[RSA 2048]----+&lt;br /&gt;
 |   ..=O+..       |&lt;br /&gt;
 |    ..o++.     ..|&lt;br /&gt;
 |       oo.    = +|&lt;br /&gt;
 |      . +o . = +.|&lt;br /&gt;
 |       oSo. o * o|&lt;br /&gt;
 |        . o o*.=.|&lt;br /&gt;
 |         = +E+* .|&lt;br /&gt;
 |        + ...+.. |&lt;br /&gt;
 |         ++o+    |&lt;br /&gt;
 +----[SHA256]-----+&lt;br /&gt;
 # '''scp root@client:.ssh/id_rsa.pub root@server:.ssh/id_rsa.pub'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 id_rsa.pub                                          100% 394      1.8MB/s   00:00&lt;br /&gt;
 # '''ssh server'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 # '''cd .ssh'''&lt;br /&gt;
 # '''cat &amp;gt;&amp;gt; authorized_keys &amp;lt; id_rsa.pub'''&lt;br /&gt;
 # '''chmod 600 authorized_keys'''&lt;br /&gt;
 # '''rm id_rsa.pub'''&lt;br /&gt;
&lt;br /&gt;
== Useful linux commands ==&lt;br /&gt;
&lt;br /&gt;
{| {{thead}}&lt;br /&gt;
|-&lt;br /&gt;
! {{chead}} width=&amp;quot;220&amp;quot; | Command&lt;br /&gt;
! {{chead}} | Effect&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''cd'''&amp;lt;/tt&amp;gt;||change directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chmod -R ppp ddd'''&amp;lt;/tt&amp;gt;||recursively change permissions on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chown -R uuu:ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change user:group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chgrp -R ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''command xxx &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; grep yyy'''&amp;lt;/tt&amp;gt;||search for string yyy in output of command xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ethtool -s eth0 wol g'''&amp;lt;/tt&amp;gt;||puts interface eth0 in wake-on-lan status.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''find xxx -name yyy -print'''&amp;lt;/tt&amp;gt;||find file yyy in in subdirectories of xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ifconfig -a'''&amp;lt;/tt&amp;gt;||kill print the network interfaces configuration.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''iptables -L'''&amp;lt;/tt&amp;gt;||print the firewall rules.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''killall xxx'''&amp;lt;/tt&amp;gt;||kill program named xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ldconfig'''&amp;lt;/tt&amp;gt;||reload libraries taking into account new libraries just built.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ln -s existing new'''&amp;lt;/tt&amp;gt;||create a symbolic link new to an existing directory or file.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ls -al'''&amp;lt;/tt&amp;gt;||list the working directory, including files beginning with a dot.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''man xxx'''&amp;lt;/tt&amp;gt;||display the xxx command manual page.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''more xxx'''&amp;lt;/tt&amp;gt;||display file xxx with the possibility of moving up and down. '''less''' and '''most''' are similar commands.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''mount -t ttt /dev/xxx /mnt/ddd'''&amp;lt;/tt&amp;gt;||mount device xxx as type ttt under directory ddd.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''(u)mount /mnt/ddd'''&amp;lt;/tt&amp;gt;||(u)mount device ddd as specified in /etc/fstab.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''nmap &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||check filtering status of ports on &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;. '''-sU''' for UDP.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ntpdate -bv 0.fr.pool.ntp.org'''&amp;lt;/tt&amp;gt;|| force ntp synchronization.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ps -ef'''&amp;lt;/tt&amp;gt;||list the running processes.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''pwd'''&amp;lt;/tt&amp;gt;||print working directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''rm -r'''&amp;lt;/tt&amp;gt;||remove file or directory recursively.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''route'''&amp;lt;/tt&amp;gt;||display the network routing table.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''scp -p usr1@hst1:/str1  usr2@hst2:/str2'''&amp;lt;/tt&amp;gt;||copy files between hosts.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''screen &amp;lt;i&amp;gt;-S&amp;lt;name&amp;gt;&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||screen offers a frame to run a shell, detach from it (&amp;lt;ctrl&amp;gt;-a d) and later reattach to it.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ssh &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||connect remotely to site &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''su -l uuuu'''&amp;lt;/tt&amp;gt;||execute shell as another user. if -l is used an environment similar to what the other user would have had with a direct login is provided.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''telinit n'''&amp;lt;/tt&amp;gt;||go to the runlevel n (1=single-user, 3=multi-user, 4=graphical, 6=reboot).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''umask'''&amp;lt;/tt&amp;gt;||edit /etc/profile to change the default umask value of 022 and '''set it to 027''' (files not readable by other users), a good setting except when installing as root server software to be ran as a standard user account (permission issues).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''vi'''&amp;lt;/tt&amp;gt;||run the vi text editor. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Maintaining Slackware]]|[[Main Page]]|[[Configuration files]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=X11_over_the_network&amp;diff=154</id>
		<title>X11 over the network</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=X11_over_the_network&amp;diff=154"/>
				<updated>2026-03-20T10:00:08Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Xdm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
Using X over the network affords accessing remote servers graphically as if you were on the console. So for instance, from your Windows workstation, you can run Windows and Linux side by side, full screen, and switch with function-key combinations such as alt-tab or ctrl-alt-F7 or F8. A very handy feature. X is natively present and fast on Linux. On Windows, it will always be a bit slower, and you need to install an X server. [https://sourceforge.net/projects/vcxsrv/ VcXrv] is a very competent one.&lt;br /&gt;
&lt;br /&gt;
The software presenting an X window on a terminal is called an X server, which is contrary to what we are used to, as the X server is not on the server but actually on the client ! Over the Internet, you will always encapsulate X11 in SSH ('''X11 forwarding''', to configure in '''/etc/ssh/sshd_config''') as the X protocols are not secure. However, X needs a significant bandwidth so it is not likely that you will use it over an ADSL connection as it would be too slow. Optical fiber could be OK though.&lt;br /&gt;
&lt;br /&gt;
For more information on using remote X applications, check this [http://www.xs4all.nl/~zweije/xauth.html mini-HOWTO] or this excellent [http://shop.oreilly.com/product/9780596101954.do O'Reilly book].&lt;br /&gt;
&lt;br /&gt;
== Xdm, Kdm, Gdm ==&lt;br /&gt;
&lt;br /&gt;
X requires a daemon on the server to handle connections. The base daemon is Xdm, that offers a graphical login directly under X, with no desktop manager. Access can be local on the computer console, or can be from an X terminal or X emulated terminal on the network.&lt;br /&gt;
&lt;br /&gt;
The KDE and Gnome desktop environments Kdm and Gdm come with Xdm variants that have a different look and feel. It is possible to run one or several of the three, provided that they will not compete for management of the same terminals.&lt;br /&gt;
&lt;br /&gt;
However it makes sense to use only one. Kdm is a good choice as it affords choosing the Session Window Manager (Kde, Xfce4, ...) from the connection dialog box.&lt;br /&gt;
&lt;br /&gt;
== Kdm ==&lt;br /&gt;
&lt;br /&gt;
For KDE to manage X terminals over the network, update '''/etc/kde/kdm/kdmrc''' specifying '''Enable=true''' for '''[Xdmcp]'''.&lt;br /&gt;
&lt;br /&gt;
In '''/etc/kde/kdm/Xaccess''', uncomment line  '''#* # any host can get a login window''' to authorize connection from any incoming IP address (or to restrict usage to your local network).&lt;br /&gt;
&lt;br /&gt;
Another trick using KDM : to be able to connect as root, update '''/etc/kde/kdm/kdmrc''', specifying '''AllowRootLogin=true''' for '''[X-*-Core]'''.&lt;br /&gt;
&lt;br /&gt;
== Xdm ==&lt;br /&gt;
&lt;br /&gt;
In '''/etc/X11/xdm/xdm-config''', comment out the line '''#DisplayManager.requestPort:    0''' to authorize X terminal access from the network. Else port 177 won't be listened, as can be verified using '''nmap -sU localhost''', that lists the listening UDP ports. If checking with tcpdump, '''udp port xdmcp unreachable''' will be seen on the wire.&lt;br /&gt;
&lt;br /&gt;
In '''/etc/X11/xdm/Xaccess''', uncomment line  '''#* # any host can get a login window''' to authorize connection from any incoming IP address (or to restrict usage to your local network). In '''/etc/X11/xdm/Xservers''', comment out the line with ''':0''' to avoid getting an X login screen on the console.&lt;br /&gt;
&lt;br /&gt;
To automatically launch '''xdm''' during Slackware init, add the following lines to '''/etc/rc.d/rc.local''' :&lt;br /&gt;
&lt;br /&gt;
 # Xdm&lt;br /&gt;
 if [ -x /usr/X11/bin/xdm ]; then&lt;br /&gt;
         /usr/X11/bin/xdm&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
== X11 firewalling ==&lt;br /&gt;
&lt;br /&gt;
At the firewall level, the X terminal must be able to contact the host using '''UDP 177''' and the host must be able to callback the X terminal using '''TCP 6000:6063'''. Open the corresponding ports, but to avoid login information to be sent over the wire, restrict usage to the local network :&lt;br /&gt;
&lt;br /&gt;
 # SSH-tunnelled X-Window output appears as input on interface lo&lt;br /&gt;
 iptables -A INPUT -p udp -j ACCEPT --dport 177 -s 192.168.0.0/24&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 6000:6063 -m state --state NEW -s 192.168.0.0/24&lt;br /&gt;
 iptables -A INPUT -i lo -p tcp -j ACCEPT --dport 6000:6063 -m state --state NEW -s 192.168.0.0/24&lt;br /&gt;
&lt;br /&gt;
For access from the Internet, il will be better to encapsulate X11 within an SSH session, using the X11 forwarding option. Due to encryption, this is however much slower. In this case, instead of KDE, prefer a less network-intensive window manager such as xfce4.&lt;br /&gt;
&lt;br /&gt;
== X11 server ==&lt;br /&gt;
&lt;br /&gt;
The X terminal can be a Linux computer on which you run the X server to display X from a remote client. For instance typing '''nohup X -query &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt; :1 &amp;amp;''' will display X from host &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt; on virtual terminal 8. This way you will be able to keep local X and remote X side by side and switch between them using '''&amp;lt;ctrl&amp;gt;&amp;lt;alt&amp;gt;&amp;lt;F7&amp;gt;''' and '''&amp;lt;ctrl&amp;gt;&amp;lt;alt&amp;gt;&amp;lt;F8&amp;gt;'''.&lt;br /&gt;
&lt;br /&gt;
The X terminal can also be a Windows PC equipped with an X emulator such as [https://sourceforge.net/projects/vcxsrv/ VcXrv] or other software found from the Internet. At the time of this writing though, such software is frustrating due to unstability or poor licensing conditions, so VcXrv seems to currently be the better choice, although a bit slow. &amp;lt;u&amp;gt;'''Note'''&amp;lt;/u&amp;gt; : Specify in the configuration that you will be using XDMCP.&lt;br /&gt;
&lt;br /&gt;
== Windows firewall ==&lt;br /&gt;
&lt;br /&gt;
On Windows, use the firewall with «'''Allow exceptions'''» and create an entry in the firewall for the X11 protocol (port 6000), specifying in the scope the server IP address or the local network (not the Internet).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[X11 configuration]]|[[Main Page]]|[[Compiling the Kernel]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=X11_over_the_network&amp;diff=153</id>
		<title>X11 over the network</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=X11_over_the_network&amp;diff=153"/>
				<updated>2026-03-20T09:59:16Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Xdm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
Using X over the network affords accessing remote servers graphically as if you were on the console. So for instance, from your Windows workstation, you can run Windows and Linux side by side, full screen, and switch with function-key combinations such as alt-tab or ctrl-alt-F7 or F8. A very handy feature. X is natively present and fast on Linux. On Windows, it will always be a bit slower, and you need to install an X server. [https://sourceforge.net/projects/vcxsrv/ VcXrv] is a very competent one.&lt;br /&gt;
&lt;br /&gt;
The software presenting an X window on a terminal is called an X server, which is contrary to what we are used to, as the X server is not on the server but actually on the client ! Over the Internet, you will always encapsulate X11 in SSH ('''X11 forwarding''', to configure in '''/etc/ssh/sshd_config''') as the X protocols are not secure. However, X needs a significant bandwidth so it is not likely that you will use it over an ADSL connection as it would be too slow. Optical fiber could be OK though.&lt;br /&gt;
&lt;br /&gt;
For more information on using remote X applications, check this [http://www.xs4all.nl/~zweije/xauth.html mini-HOWTO] or this excellent [http://shop.oreilly.com/product/9780596101954.do O'Reilly book].&lt;br /&gt;
&lt;br /&gt;
== Xdm, Kdm, Gdm ==&lt;br /&gt;
&lt;br /&gt;
X requires a daemon on the server to handle connections. The base daemon is Xdm, that offers a graphical login directly under X, with no desktop manager. Access can be local on the computer console, or can be from an X terminal or X emulated terminal on the network.&lt;br /&gt;
&lt;br /&gt;
The KDE and Gnome desktop environments Kdm and Gdm come with Xdm variants that have a different look and feel. It is possible to run one or several of the three, provided that they will not compete for management of the same terminals.&lt;br /&gt;
&lt;br /&gt;
However it makes sense to use only one. Kdm is a good choice as it affords choosing the Session Window Manager (Kde, Xfce4, ...) from the connection dialog box.&lt;br /&gt;
&lt;br /&gt;
== Kdm ==&lt;br /&gt;
&lt;br /&gt;
For KDE to manage X terminals over the network, update '''/etc/kde/kdm/kdmrc''' specifying '''Enable=true''' for '''[Xdmcp]'''.&lt;br /&gt;
&lt;br /&gt;
In '''/etc/kde/kdm/Xaccess''', uncomment line  '''#* # any host can get a login window''' to authorize connection from any incoming IP address (or to restrict usage to your local network).&lt;br /&gt;
&lt;br /&gt;
Another trick using KDM : to be able to connect as root, update '''/etc/kde/kdm/kdmrc''', specifying '''AllowRootLogin=true''' for '''[X-*-Core]'''.&lt;br /&gt;
&lt;br /&gt;
== Xdm ==&lt;br /&gt;
&lt;br /&gt;
In '''/etc/X11/xdm/xdm-config''', comment out the last line '''!DisplayManager.requestPort:    0''' to authorize X terminal access from the network. Else port 177 won't be listened, as can be verified using '''nmap -sU localhost''', that lists the listening UDP ports. If checking with tcpdump, '''udp port xdmcp unreachable''' will be seen on the wire.&lt;br /&gt;
&lt;br /&gt;
In '''/etc/X11/xdm/Xaccess''', uncomment line  '''#* # any host can get a login window''' to authorize connection from any incoming IP address (or to restrict usage to your local network). In '''/etc/X11/xdm/Xservers''', comment out the line with ''':0''' to avoid getting an X login screen on the console.&lt;br /&gt;
&lt;br /&gt;
To automatically launch '''xdm''' during Slackware init, add the following lines to '''/etc/rc.d/rc.local''' :&lt;br /&gt;
&lt;br /&gt;
 # Xdm&lt;br /&gt;
 if [ -x /usr/X11/bin/xdm ]; then&lt;br /&gt;
         /usr/X11/bin/xdm&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
== X11 firewalling ==&lt;br /&gt;
&lt;br /&gt;
At the firewall level, the X terminal must be able to contact the host using '''UDP 177''' and the host must be able to callback the X terminal using '''TCP 6000:6063'''. Open the corresponding ports, but to avoid login information to be sent over the wire, restrict usage to the local network :&lt;br /&gt;
&lt;br /&gt;
 # SSH-tunnelled X-Window output appears as input on interface lo&lt;br /&gt;
 iptables -A INPUT -p udp -j ACCEPT --dport 177 -s 192.168.0.0/24&lt;br /&gt;
 iptables -A INPUT -p tcp -j ACCEPT --dport 6000:6063 -m state --state NEW -s 192.168.0.0/24&lt;br /&gt;
 iptables -A INPUT -i lo -p tcp -j ACCEPT --dport 6000:6063 -m state --state NEW -s 192.168.0.0/24&lt;br /&gt;
&lt;br /&gt;
For access from the Internet, il will be better to encapsulate X11 within an SSH session, using the X11 forwarding option. Due to encryption, this is however much slower. In this case, instead of KDE, prefer a less network-intensive window manager such as xfce4.&lt;br /&gt;
&lt;br /&gt;
== X11 server ==&lt;br /&gt;
&lt;br /&gt;
The X terminal can be a Linux computer on which you run the X server to display X from a remote client. For instance typing '''nohup X -query &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt; :1 &amp;amp;''' will display X from host &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt; on virtual terminal 8. This way you will be able to keep local X and remote X side by side and switch between them using '''&amp;lt;ctrl&amp;gt;&amp;lt;alt&amp;gt;&amp;lt;F7&amp;gt;''' and '''&amp;lt;ctrl&amp;gt;&amp;lt;alt&amp;gt;&amp;lt;F8&amp;gt;'''.&lt;br /&gt;
&lt;br /&gt;
The X terminal can also be a Windows PC equipped with an X emulator such as [https://sourceforge.net/projects/vcxsrv/ VcXrv] or other software found from the Internet. At the time of this writing though, such software is frustrating due to unstability or poor licensing conditions, so VcXrv seems to currently be the better choice, although a bit slow. &amp;lt;u&amp;gt;'''Note'''&amp;lt;/u&amp;gt; : Specify in the configuration that you will be using XDMCP.&lt;br /&gt;
&lt;br /&gt;
== Windows firewall ==&lt;br /&gt;
&lt;br /&gt;
On Windows, use the firewall with «'''Allow exceptions'''» and create an entry in the firewall for the X11 protocol (port 6000), specifying in the scope the server IP address or the local network (not the Internet).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[X11 configuration]]|[[Main Page]]|[[Compiling the Kernel]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=152</id>
		<title>Linux basics</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=152"/>
				<updated>2026-01-05T21:50:06Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Useful linux commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using VI ==&lt;br /&gt;
&lt;br /&gt;
'''vi''' (pronounced vee-eye) is the Unix standard text editor so affords editing the configuration files by hand. If you don’t know it yet, it can be a bit surprising. Actually, '''vi''' was created at a time when the keyboards did not have any arrow or insert keys. So there are two modes: the «open» mode and the «insert» mode.&lt;br /&gt;
&lt;br /&gt;
The open mode affords moving the cursor. '''j''', '''k''', '''l''', '''m''' move the cursor by one character. '''ctrl-f''' moves one page forward and '''ctrl-b''' moves one page backwards. '''w''' moves one word forward and  '''b''' moves one word backwards. It is also possible to use the arrow keys.&lt;br /&gt;
&lt;br /&gt;
'''i''' goes into insert mode before the cursor, '''a''' goes into insert mode after the cursor, and '''A''' goes into insert mode at the end of the line. '''o''' adds a line after the current line, and '''O''' adds a live before the current line. '''R''' goes into rewrite mode.&lt;br /&gt;
&lt;br /&gt;
'''esc''' affords getting out of the insert mode.&lt;br /&gt;
&lt;br /&gt;
'''c$''' affords replacing the end of the line and '''d$''' affords deleting the end of the line. '''cw''' affords replacing one word and '''dw''' affords deleting one word. '''dd''' affords deleting the current line.&lt;br /&gt;
&lt;br /&gt;
''':q''' affords quitting without saving. If the file has been modified, quitting must be forced by typing ''':q!'''. ''':x''' affords saving and quitting. If the file does not have the write rigths, saving must be forced by typing ''':x!'''. ''':w''' affords writing the text in a new file. If the new file already exists, writing must be forced by typing ''':w!'''.&lt;br /&gt;
&lt;br /&gt;
''':num''' affords moving to the line number num. ''':$''' affords moving to the end of the file.&lt;br /&gt;
''':num1copynum2''' affords copying the line number num1 after the line number num2. ''':num1mnum2''' affords moving the line number num1 after the line number num2.&lt;br /&gt;
&lt;br /&gt;
For detailed information, check the [http://vimdoc.sourceforge.net/htmldoc/help.html VIM Documentation]. To enter special characters check the page on [http://vimdoc.sourceforge.net/htmldoc/digraph.html digraphs]. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
&lt;br /&gt;
== Using SSH ==&lt;br /&gt;
&lt;br /&gt;
SSH is a suite of tools affording connecting remotely over encrypted communications. On the client side, '''ssh''' offers a command line terminal, '''scp''' affords copying a file, and '''sftp''' behaves like ftp. The server side consists of sshd, sftp-server, and ssh-agent. ssh-add, ssh-keysign, ssh-keyscan, and ssh-keygen afford key management. The SSH present on Slackware and the BSDs is [https://www.openssh.com/ OpenSSH], developped by members of the [https://www.openbsd.org/ OpenBSD] project.&lt;br /&gt;
&lt;br /&gt;
'''ssh''' obviously requires your password every time it is executed. This can be avoided by creating on the client a pair of rsa keys and copying the public key to the server. Not specifying a passphrase is not very secure but will afford avoiding having to enter it every time :&lt;br /&gt;
&lt;br /&gt;
 # '''ssh-keygen -t rsa'''&lt;br /&gt;
 Generating public/private rsa key pair.&lt;br /&gt;
 Enter file in which to save the key (/root/.ssh/id_rsa): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter passphrase (empty for no passphrase): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter same passphrase again: '''cr&amp;gt;'''&lt;br /&gt;
 Your identification has been saved in /root/.ssh/id_rsa.&lt;br /&gt;
 Your public key has been saved in /root/.ssh/id_rsa.pub.&lt;br /&gt;
 The key fingerprint is:&lt;br /&gt;
 SHA256:ATSDdER5/l8OJvr+jpINIReJtd81zntVbTjuJW5aobE root@client&lt;br /&gt;
 The key's randomart image is:&lt;br /&gt;
 +---[RSA 2048]----+&lt;br /&gt;
 |   ..=O+..       |&lt;br /&gt;
 |    ..o++.     ..|&lt;br /&gt;
 |       oo.    = +|&lt;br /&gt;
 |      . +o . = +.|&lt;br /&gt;
 |       oSo. o * o|&lt;br /&gt;
 |        . o o*.=.|&lt;br /&gt;
 |         = +E+* .|&lt;br /&gt;
 |        + ...+.. |&lt;br /&gt;
 |         ++o+    |&lt;br /&gt;
 +----[SHA256]-----+&lt;br /&gt;
 # '''scp root@client:.ssh/id_rsa.pub root@server:.ssh/id_rsa.pub'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 id_rsa.pub                                          100% 394      1.8MB/s   00:00&lt;br /&gt;
 # '''ssh server'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 # '''cd .ssh'''&lt;br /&gt;
 # '''cat &amp;gt;&amp;gt; authorized_keys &amp;lt; id_rsa.pub'''&lt;br /&gt;
 # '''chmod 600 authorized_keys'''&lt;br /&gt;
 # '''rm id_rsa.pub'''&lt;br /&gt;
&lt;br /&gt;
== Useful linux commands ==&lt;br /&gt;
&lt;br /&gt;
{| {{thead}}&lt;br /&gt;
|-&lt;br /&gt;
! {{chead}} width=&amp;quot;220&amp;quot; | Command&lt;br /&gt;
! {{chead}} | Effect&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''cd'''&amp;lt;/tt&amp;gt;||change directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chmod -R ppp ddd'''&amp;lt;/tt&amp;gt;||recursively change permissions on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chown -R uuu:ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change user:group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chgrp -R ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''command xxx &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; grep yyy'''&amp;lt;/tt&amp;gt;||search for string yyy in output of command xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ethtool -s eth0 wol g'''&amp;lt;/tt&amp;gt;||puts interface eth0 in wake-on-lan status.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''find xxx -name yyy -print'''&amp;lt;/tt&amp;gt;||find file yyy in in subdirectories of xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ifconfig -a'''&amp;lt;/tt&amp;gt;||kill print the network interfaces configuration.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''iptables -L'''&amp;lt;/tt&amp;gt;||print the firewall rules.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''killall xxx'''&amp;lt;/tt&amp;gt;||kill program named xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ldconfig'''&amp;lt;/tt&amp;gt;||reload libraries taking into account new libraries just built.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ln -s existing new'''&amp;lt;/tt&amp;gt;||create a symbolic link new to an existing directory or file.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ls -al'''&amp;lt;/tt&amp;gt;||list the working directory, including files beginning with a dot.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''man xxx'''&amp;lt;/tt&amp;gt;||display the xxx command manual page.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''more xxx'''&amp;lt;/tt&amp;gt;||display file xxx with the possibility of moving up and down. '''less''' and '''most''' are similar commands.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''mount -t ttt /dev/xxx /mnt/ddd'''&amp;lt;/tt&amp;gt;||mount device xxx as type ttt under directory ddd.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''(u)mount /mnt/ddd'''&amp;lt;/tt&amp;gt;||(u)mount device ddd as specified in /etc/fstab.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''nmap &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||check filtering status of ports on &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;. '''-sU''' for UDP.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ntpdate -bv 0.fr.pool.ntp.org'''&amp;lt;/tt&amp;gt;|| force ntp synchronization.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ps -ef'''&amp;lt;/tt&amp;gt;||list the running processes.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''pwd'''&amp;lt;/tt&amp;gt;||print working directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''rm -r'''&amp;lt;/tt&amp;gt;||remove file or directory recursively.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''route'''&amp;lt;/tt&amp;gt;||display the network routing table.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''scp -p usr1@hst1:/str1  usr2@hst2:/str2'''&amp;lt;/tt&amp;gt;||copy files between hosts.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''screen &amp;lt;i&amp;gt;-S&amp;lt;name&amp;gt;&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||screen offers a frame to run a shell, detach from it (&amp;lt;ctrl&amp;gt;-a d) and later reattach to it.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ssh &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||connect remotely to site &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''su -l uuuu'''&amp;lt;/tt&amp;gt;||execute shell as another user. if -l is used an environment similar to what the other user would have had with a direct login is provided.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''telinit n'''&amp;lt;/tt&amp;gt;||go to the runlevel n (1=single-user, 3=multi-user, 4=graphical, 6=reboot).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''umask'''&amp;lt;/tt&amp;gt;||edit /etc/profile to change the default umask value of 022 and '''set it to 027''' (files not readable by other users), a good setting except when installing as root server software to be ran as a standard user account (permission issues).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''vi'''&amp;lt;/tt&amp;gt;||run the vi text editor. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Maintaining Slackware]]|[[Main Page]]|[[Configuration files]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=151</id>
		<title>Linux basics</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=151"/>
				<updated>2025-03-25T21:54:51Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Useful linux commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using VI ==&lt;br /&gt;
&lt;br /&gt;
'''vi''' (pronounced vee-eye) is the Unix standard text editor so affords editing the configuration files by hand. If you don’t know it yet, it can be a bit surprising. Actually, '''vi''' was created at a time when the keyboards did not have any arrow or insert keys. So there are two modes: the «open» mode and the «insert» mode.&lt;br /&gt;
&lt;br /&gt;
The open mode affords moving the cursor. '''j''', '''k''', '''l''', '''m''' move the cursor by one character. '''ctrl-f''' moves one page forward and '''ctrl-b''' moves one page backwards. '''w''' moves one word forward and  '''b''' moves one word backwards. It is also possible to use the arrow keys.&lt;br /&gt;
&lt;br /&gt;
'''i''' goes into insert mode before the cursor, '''a''' goes into insert mode after the cursor, and '''A''' goes into insert mode at the end of the line. '''o''' adds a line after the current line, and '''O''' adds a live before the current line. '''R''' goes into rewrite mode.&lt;br /&gt;
&lt;br /&gt;
'''esc''' affords getting out of the insert mode.&lt;br /&gt;
&lt;br /&gt;
'''c$''' affords replacing the end of the line and '''d$''' affords deleting the end of the line. '''cw''' affords replacing one word and '''dw''' affords deleting one word. '''dd''' affords deleting the current line.&lt;br /&gt;
&lt;br /&gt;
''':q''' affords quitting without saving. If the file has been modified, quitting must be forced by typing ''':q!'''. ''':x''' affords saving and quitting. If the file does not have the write rigths, saving must be forced by typing ''':x!'''. ''':w''' affords writing the text in a new file. If the new file already exists, writing must be forced by typing ''':w!'''.&lt;br /&gt;
&lt;br /&gt;
''':num''' affords moving to the line number num. ''':$''' affords moving to the end of the file.&lt;br /&gt;
''':num1copynum2''' affords copying the line number num1 after the line number num2. ''':num1mnum2''' affords moving the line number num1 after the line number num2.&lt;br /&gt;
&lt;br /&gt;
For detailed information, check the [http://vimdoc.sourceforge.net/htmldoc/help.html VIM Documentation]. To enter special characters check the page on [http://vimdoc.sourceforge.net/htmldoc/digraph.html digraphs]. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
&lt;br /&gt;
== Using SSH ==&lt;br /&gt;
&lt;br /&gt;
SSH is a suite of tools affording connecting remotely over encrypted communications. On the client side, '''ssh''' offers a command line terminal, '''scp''' affords copying a file, and '''sftp''' behaves like ftp. The server side consists of sshd, sftp-server, and ssh-agent. ssh-add, ssh-keysign, ssh-keyscan, and ssh-keygen afford key management. The SSH present on Slackware and the BSDs is [https://www.openssh.com/ OpenSSH], developped by members of the [https://www.openbsd.org/ OpenBSD] project.&lt;br /&gt;
&lt;br /&gt;
'''ssh''' obviously requires your password every time it is executed. This can be avoided by creating on the client a pair of rsa keys and copying the public key to the server. Not specifying a passphrase is not very secure but will afford avoiding having to enter it every time :&lt;br /&gt;
&lt;br /&gt;
 # '''ssh-keygen -t rsa'''&lt;br /&gt;
 Generating public/private rsa key pair.&lt;br /&gt;
 Enter file in which to save the key (/root/.ssh/id_rsa): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter passphrase (empty for no passphrase): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter same passphrase again: '''cr&amp;gt;'''&lt;br /&gt;
 Your identification has been saved in /root/.ssh/id_rsa.&lt;br /&gt;
 Your public key has been saved in /root/.ssh/id_rsa.pub.&lt;br /&gt;
 The key fingerprint is:&lt;br /&gt;
 SHA256:ATSDdER5/l8OJvr+jpINIReJtd81zntVbTjuJW5aobE root@client&lt;br /&gt;
 The key's randomart image is:&lt;br /&gt;
 +---[RSA 2048]----+&lt;br /&gt;
 |   ..=O+..       |&lt;br /&gt;
 |    ..o++.     ..|&lt;br /&gt;
 |       oo.    = +|&lt;br /&gt;
 |      . +o . = +.|&lt;br /&gt;
 |       oSo. o * o|&lt;br /&gt;
 |        . o o*.=.|&lt;br /&gt;
 |         = +E+* .|&lt;br /&gt;
 |        + ...+.. |&lt;br /&gt;
 |         ++o+    |&lt;br /&gt;
 +----[SHA256]-----+&lt;br /&gt;
 # '''scp root@client:.ssh/id_rsa.pub root@server:.ssh/id_rsa.pub'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 id_rsa.pub                                          100% 394      1.8MB/s   00:00&lt;br /&gt;
 # '''ssh server'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 # '''cd .ssh'''&lt;br /&gt;
 # '''cat &amp;gt;&amp;gt; authorized_keys &amp;lt; id_rsa.pub'''&lt;br /&gt;
 # '''chmod 600 authorized_keys'''&lt;br /&gt;
 # '''rm id_rsa.pub'''&lt;br /&gt;
&lt;br /&gt;
== Useful linux commands ==&lt;br /&gt;
&lt;br /&gt;
{| {{thead}}&lt;br /&gt;
|-&lt;br /&gt;
! {{chead}} width=&amp;quot;220&amp;quot; | Command&lt;br /&gt;
! {{chead}} | Effect&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''cd'''&amp;lt;/tt&amp;gt;||change directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chmod -R ppp ddd'''&amp;lt;/tt&amp;gt;||recursively change permissions on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chown -R uuu:ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change user:group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chgrp -R ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''command xxx &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; grep yyy'''&amp;lt;/tt&amp;gt;||search for string yyy in output of command xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ethtool -s eth0 wol g'''&amp;lt;/tt&amp;gt;||puts interface eth0 in wake-on-lan status.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''find xxx -name yyy -print'''&amp;lt;/tt&amp;gt;||find file yyy in in subdirectories of xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ifconfig -a'''&amp;lt;/tt&amp;gt;||kill print the network interfaces configuration.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''iptables -L'''&amp;lt;/tt&amp;gt;||print the firewall rules.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''killall xxx'''&amp;lt;/tt&amp;gt;||kill program named xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ldconfig'''&amp;lt;/tt&amp;gt;||reload libraries taking into account new libraries just built.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ln -s existing new'''&amp;lt;/tt&amp;gt;||create a symbolic link new to an existing directory or file.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ls -al'''&amp;lt;/tt&amp;gt;||list the working directory, including files beginning with a dot.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''man xxx'''&amp;lt;/tt&amp;gt;||display the xxx command manual page.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''more xxx'''&amp;lt;/tt&amp;gt;||display file xxx with the possibility of moving up and down. '''less''' and '''most''' are similar commands.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''mount -t ttt /dev/xxx /mnt/ddd'''&amp;lt;/tt&amp;gt;||mount device xxx as type ttt under directory ddd.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''(u)mount /mnt/ddd'''&amp;lt;/tt&amp;gt;||(u)mount device ddd as specified in /etc/fstab.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''nmap &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||check filtering status of ports on &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;. '''-sU''' for UDP.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ntpdate -bv 0.fr.pool.ntp.org'''&amp;lt;/tt&amp;gt;|| force ntp synchronization.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ps -ef'''&amp;lt;/tt&amp;gt;||list the running processes.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''pwd'''&amp;lt;/tt&amp;gt;||print working directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''rm -r'''&amp;lt;/tt&amp;gt;||remove file or directory recursively.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''route'''&amp;lt;/tt&amp;gt;||display the network routing table.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''screen &amp;lt;i&amp;gt;-S&amp;lt;name&amp;gt;&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||screen offers a frame to run a shell, detach from it (&amp;lt;ctrl&amp;gt;-a d) and later reattach to it.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ssh &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||connect remotely to site &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''su -l uuuu'''&amp;lt;/tt&amp;gt;||execute shell as another user. if -l is used an environment similar to what the other user would have had with a direct login is provided.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''telinit n'''&amp;lt;/tt&amp;gt;||go to the runlevel n (1=single-user, 3=multi-user, 4=graphical, 6=reboot).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''umask'''&amp;lt;/tt&amp;gt;||edit /etc/profile to change the default umask value of 022 and '''set it to 027''' (files not readable by other users), a good setting except when installing as root server software to be ran as a standard user account (permission issues).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''vi'''&amp;lt;/tt&amp;gt;||run the vi text editor. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Maintaining Slackware]]|[[Main Page]]|[[Configuration files]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=150</id>
		<title>Linux basics</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Linux_basics&amp;diff=150"/>
				<updated>2025-03-25T21:54:13Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Useful linux commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using VI ==&lt;br /&gt;
&lt;br /&gt;
'''vi''' (pronounced vee-eye) is the Unix standard text editor so affords editing the configuration files by hand. If you don’t know it yet, it can be a bit surprising. Actually, '''vi''' was created at a time when the keyboards did not have any arrow or insert keys. So there are two modes: the «open» mode and the «insert» mode.&lt;br /&gt;
&lt;br /&gt;
The open mode affords moving the cursor. '''j''', '''k''', '''l''', '''m''' move the cursor by one character. '''ctrl-f''' moves one page forward and '''ctrl-b''' moves one page backwards. '''w''' moves one word forward and  '''b''' moves one word backwards. It is also possible to use the arrow keys.&lt;br /&gt;
&lt;br /&gt;
'''i''' goes into insert mode before the cursor, '''a''' goes into insert mode after the cursor, and '''A''' goes into insert mode at the end of the line. '''o''' adds a line after the current line, and '''O''' adds a live before the current line. '''R''' goes into rewrite mode.&lt;br /&gt;
&lt;br /&gt;
'''esc''' affords getting out of the insert mode.&lt;br /&gt;
&lt;br /&gt;
'''c$''' affords replacing the end of the line and '''d$''' affords deleting the end of the line. '''cw''' affords replacing one word and '''dw''' affords deleting one word. '''dd''' affords deleting the current line.&lt;br /&gt;
&lt;br /&gt;
''':q''' affords quitting without saving. If the file has been modified, quitting must be forced by typing ''':q!'''. ''':x''' affords saving and quitting. If the file does not have the write rigths, saving must be forced by typing ''':x!'''. ''':w''' affords writing the text in a new file. If the new file already exists, writing must be forced by typing ''':w!'''.&lt;br /&gt;
&lt;br /&gt;
''':num''' affords moving to the line number num. ''':$''' affords moving to the end of the file.&lt;br /&gt;
''':num1copynum2''' affords copying the line number num1 after the line number num2. ''':num1mnum2''' affords moving the line number num1 after the line number num2.&lt;br /&gt;
&lt;br /&gt;
For detailed information, check the [http://vimdoc.sourceforge.net/htmldoc/help.html VIM Documentation]. To enter special characters check the page on [http://vimdoc.sourceforge.net/htmldoc/digraph.html digraphs]. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
&lt;br /&gt;
== Using SSH ==&lt;br /&gt;
&lt;br /&gt;
SSH is a suite of tools affording connecting remotely over encrypted communications. On the client side, '''ssh''' offers a command line terminal, '''scp''' affords copying a file, and '''sftp''' behaves like ftp. The server side consists of sshd, sftp-server, and ssh-agent. ssh-add, ssh-keysign, ssh-keyscan, and ssh-keygen afford key management. The SSH present on Slackware and the BSDs is [https://www.openssh.com/ OpenSSH], developped by members of the [https://www.openbsd.org/ OpenBSD] project.&lt;br /&gt;
&lt;br /&gt;
'''ssh''' obviously requires your password every time it is executed. This can be avoided by creating on the client a pair of rsa keys and copying the public key to the server. Not specifying a passphrase is not very secure but will afford avoiding having to enter it every time :&lt;br /&gt;
&lt;br /&gt;
 # '''ssh-keygen -t rsa'''&lt;br /&gt;
 Generating public/private rsa key pair.&lt;br /&gt;
 Enter file in which to save the key (/root/.ssh/id_rsa): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter passphrase (empty for no passphrase): '''&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 Enter same passphrase again: '''cr&amp;gt;'''&lt;br /&gt;
 Your identification has been saved in /root/.ssh/id_rsa.&lt;br /&gt;
 Your public key has been saved in /root/.ssh/id_rsa.pub.&lt;br /&gt;
 The key fingerprint is:&lt;br /&gt;
 SHA256:ATSDdER5/l8OJvr+jpINIReJtd81zntVbTjuJW5aobE root@client&lt;br /&gt;
 The key's randomart image is:&lt;br /&gt;
 +---[RSA 2048]----+&lt;br /&gt;
 |   ..=O+..       |&lt;br /&gt;
 |    ..o++.     ..|&lt;br /&gt;
 |       oo.    = +|&lt;br /&gt;
 |      . +o . = +.|&lt;br /&gt;
 |       oSo. o * o|&lt;br /&gt;
 |        . o o*.=.|&lt;br /&gt;
 |         = +E+* .|&lt;br /&gt;
 |        + ...+.. |&lt;br /&gt;
 |         ++o+    |&lt;br /&gt;
 +----[SHA256]-----+&lt;br /&gt;
 # '''scp root@client:.ssh/id_rsa.pub root@server:.ssh/id_rsa.pub'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 id_rsa.pub                                          100% 394      1.8MB/s   00:00&lt;br /&gt;
 # '''ssh server'''&lt;br /&gt;
 password: '''secret&amp;lt;cr&amp;gt;'''&lt;br /&gt;
 # '''cd .ssh'''&lt;br /&gt;
 # '''cat &amp;gt;&amp;gt; authorized_keys &amp;lt; id_rsa.pub'''&lt;br /&gt;
 # '''chmod 600 authorized_keys'''&lt;br /&gt;
 # '''rm id_rsa.pub'''&lt;br /&gt;
&lt;br /&gt;
== Useful linux commands ==&lt;br /&gt;
&lt;br /&gt;
{| {{thead}}&lt;br /&gt;
|-&lt;br /&gt;
! {{chead}} width=&amp;quot;220&amp;quot; | Command&lt;br /&gt;
! {{chead}} | Effect&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''cd'''&amp;lt;/tt&amp;gt;||change directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chmod -R ppp ddd'''&amp;lt;/tt&amp;gt;||recursively change permissions on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chown -R uuu:ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change user:group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''chgrp -R ggg ddd'''&amp;lt;/tt&amp;gt;||recursively change group ownership on file or directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''command xxx &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; grep yyy'''&amp;lt;/tt&amp;gt;||search for string yyy in output of command xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ethtool -s eth0 wol g'''&amp;lt;/tt&amp;gt;||puts interface eth0 in wake-on-lan status.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''find xxx -name yyy -print'''&amp;lt;/tt&amp;gt;||find file yyy in in subdirectories of xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ifconfig -a'''&amp;lt;/tt&amp;gt;||kill print the network interfaces configuration.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''iptables -L'''&amp;lt;/tt&amp;gt;||print the firewall rules.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''killall xxx'''&amp;lt;/tt&amp;gt;||kill program named xxx.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ldconfig'''&amp;lt;/tt&amp;gt;||reload libraries taking into account new libraries just built.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ln -s existing new'''&amp;lt;/tt&amp;gt;||create a symbolic link new to an existing directory or file.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ls -al'''&amp;lt;/tt&amp;gt;||list the working directory, including files beginning with a dot.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''man xxx'''&amp;lt;/tt&amp;gt;||display the xxx command manual page.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''more xxx'''&amp;lt;/tt&amp;gt;||display file xxx with the possibility of moving up and down. '''less''' and '''most''' are similar commands.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''mount -t ttt /dev/xxx /mnt/ddd'''&amp;lt;/tt&amp;gt;||mount device xxx as type ttt under directory ddd.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''(u)mount /mnt/ddd'''&amp;lt;/tt&amp;gt;||(u)mount device ddd as specified in /etc/fstab.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''nmap &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||check filtering status of ports on &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;. '''-sU''' for UDP.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ntpdate -bv 0.fr.pool.ntp.org|| force ntp synchronization.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ps -ef'''&amp;lt;/tt&amp;gt;||list the running processes.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''pwd'''&amp;lt;/tt&amp;gt;||print working directory.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''rm -r'''&amp;lt;/tt&amp;gt;||remove file or directory recursively.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''route'''&amp;lt;/tt&amp;gt;||display the network routing table.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''screen &amp;lt;i&amp;gt;-S&amp;lt;name&amp;gt;&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||screen offers a frame to run a shell, detach from it (&amp;lt;ctrl&amp;gt;-a d) and later reattach to it.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''ssh &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;'''&amp;lt;/tt&amp;gt;||connect remotely to site &amp;lt;i&amp;gt;host&amp;lt;/i&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''su -l uuuu'''&amp;lt;/tt&amp;gt;||execute shell as another user. if -l is used an environment similar to what the other user would have had with a direct login is provided.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''telinit n'''&amp;lt;/tt&amp;gt;||go to the runlevel n (1=single-user, 3=multi-user, 4=graphical, 6=reboot).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''umask'''&amp;lt;/tt&amp;gt;||edit /etc/profile to change the default umask value of 022 and '''set it to 027''' (files not readable by other users), a good setting except when installing as root server software to be ran as a standard user account (permission issues).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;'''vi'''&amp;lt;/tt&amp;gt;||run the vi text editor. To get rid of the message &amp;quot;skipping N old session files&amp;quot;, delete files elvis*.ses in /var/tmp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Maintaining Slackware]]|[[Main Page]]|[[Configuration files]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=149</id>
		<title>Compiling Xen</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=149"/>
				<updated>2025-02-08T20:56:31Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* A few quirks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is Xen ? ==&lt;br /&gt;
&lt;br /&gt;
[http://wiki.xen.org/wiki/Xen_Overview Xen] is an hypervisor, a thin software layer executing multiple virtual machines, each running its own operating system. Xen is normally used as a server virtualization platform, running on headless servers without graphical console and controlled through the network. However it is also possible to run Xen on graphical desktops, and with proper hardware virtualization, to dedicate the primary graphics card (and keyboard / mouse) to a virtual machine, making it possible to have high performance full 3D and video acceleration in a virtual machine (see [http://wiki.xen.org/wiki/Xen_VGA_Passthrough Xen VGA Passthru]). Xen is otherwise free and open source.&lt;br /&gt;
&lt;br /&gt;
== A few quirks ==&lt;br /&gt;
&lt;br /&gt;
The '''dev86-0.16.21-x86_64-1.txz''' package included with Slackware 14.2 does not afford compiling '''xen-4.9.0''' properly, and must be replaced by '''[{{SERVER}}/wikislax/download/dev86-0.16.17-x86_64-2.txz dev86-0.16.17-x86_64-2.txz]''', that can be found on the Slackware 13.37, 14.0, or 14.1 distribution disks, in directory '''slackware64/d'''. Trying to compile dev86 [http://v3.sk/~lkundrak/dev86/ from source] is not an alternative : dev86 source versions 0.16.18 to 0.16.21 have the same issue compiling xen-4.9.0, and older 0.16.17 does not compile on Slackware 14.2. No such issue compiling xen-4.18.4 on slackware 15.0.&lt;br /&gt;
&lt;br /&gt;
 # removepkg /var/log/packages/dev86-0.16.21-x86_64-1.txz&lt;br /&gt;
 # installpkg dev86-0.16.17-x86_64-2.txz&lt;br /&gt;
&lt;br /&gt;
Also, the '''grub-2.00''' included with Slackware 14.2 does not afford booting xen. However, getting the latest version '''grub-2.02''' from source does work. Slackware 15.0 includes grub-2.06 which is no problem.&lt;br /&gt;
&lt;br /&gt;
== Hardware requirements ==&lt;br /&gt;
&lt;br /&gt;
Xen runs on Intel X86 hardware and requires a processor and motherboard supporting VT-x and optionally VT-d for hardware virtualization. See this [http://www.intel.com/support/motherboards/desktop/sb/cs-030922.htm page] for a list of Intel compatible motherboards and chipsets and this [http://ark.intel.com/ page] for a list of compatible processors. Our system running Xen successfully at the time of this writing (and since June 2012) is based on a DZ77GA70K Intel motherboard, an Intel® Core™ i7-3770 Processor (the overclockable i7-3770 &amp;quot;K&amp;quot; model does not afford virtualization), 32 Gb of PC12800 memory and an MSI GeForce G210 graphics board.&lt;br /&gt;
&lt;br /&gt;
== Documentation difficulties ==&lt;br /&gt;
&lt;br /&gt;
Although the software itself works well and is pretty straighforward, good quality Internet information is missing. The volume of information on the Xen wiki is plethoric, but mostly irrelevant as pertaining to old versions of everything. Building the big picture requires interpretation of tiny bits in forum messages, a pretty painful process, although I have to recognize that it worked for me in the end. An alternative is to use one of these old-style information repositories named &amp;quot;books&amp;quot;. Yes it is pretty old-fashionned ;) but actually there are good ones on the topic. Here is [http://www.amazon.co.uk/The-Book-Xen-Practical-Administrator/dp/1593271867/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1341037874&amp;amp;sr=1-1 the most recent I found], it is a good value but of course you can find more on [http://www.amazon.co.uk/s/ref=nb_sb_noss_2?url=search-alias%3Dstripbooks&amp;amp;field-keywords=xen&amp;amp;x=0&amp;amp;y=0 amazon(.co.uk)].&lt;br /&gt;
&lt;br /&gt;
== Software constraints ==&lt;br /&gt;
&lt;br /&gt;
To make a long story short, at the time of this writing (and since June 2012) working with nVidia graphic boards on Xen and X11 requires the &amp;quot;nouveau&amp;quot; driver. Other drivers like nv or the nVidia proprietary driver do not support Xen and switch off the screen when launched or do not display properly. &amp;quot;Nouveau&amp;quot; requires a fairly recent version of X11. Slackware 13.37 or newer is required. &amp;quot;Nouveau&amp;quot; is available in kernel 3.4.2 upstream and was previously included as a staging driver. Xen dom0 support was included in kernel 3.0. To benefit from both Xen and &amp;quot;Nouveau&amp;quot;, the best is to use kernel 3.4.2 upstream.&lt;br /&gt;
&lt;br /&gt;
== Installing acpica ==&lt;br /&gt;
&lt;br /&gt;
Xen requires acpica. [https://www.acpica.org/downloads Download] then install as below :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf acpica-unix-yyyymmdd.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root acpica-unix-yyyymmdd&lt;br /&gt;
 # cd acpica-unix-yyyymmdd&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
&lt;br /&gt;
== Installing yajl ==&lt;br /&gt;
&lt;br /&gt;
Xen 4.19.1 requires yajl. [http://lloyd.github.io/yajl/ Download] then install as below. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : there is no option to specify the target library directory so the files need to be moved manually.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf lloyd-yajl-17b1790.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root lloyd-yajl-17b1790&lt;br /&gt;
 # cd lloyd-yajl-17b1790&lt;br /&gt;
 # ./configure&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
 # cd ../lib&lt;br /&gt;
 # mv libyajl* ../lib64&lt;br /&gt;
 # ldconfig&lt;br /&gt;
&lt;br /&gt;
== Compiling Xen ==&lt;br /&gt;
&lt;br /&gt;
[http://xen.org/products/xen_source.html Download Xen] from the official [http://www.xen.org xen.org] site. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : File stubs-32.h is missing in the compiler includes so we add a link to the existing stubs-64.h. Also, some Xen Python scripts are installed in /usr/local/lib64/python-2.7/site-packages which python cannot find so we add links from the standard library as well.&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/include/gnu&lt;br /&gt;
 # ln -s stubs-64.h stubs-32.h&lt;br /&gt;
 # cd&lt;br /&gt;
 # tar -C /usr/local -xvf xen-x.y.z.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root xen-x.y.z&lt;br /&gt;
 # cd xen-x.y.z&lt;br /&gt;
 # ./configure --libdir=/usr/local/lib64 --with-initddir=/etc/rc.d&lt;br /&gt;
 # make world&lt;br /&gt;
 # make install&lt;br /&gt;
 # make clean&lt;br /&gt;
 # cd ../lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen /usr/lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen-3.0-py2.7.egg-info /usr/lib64/python2.7/site-packages&lt;br /&gt;
&lt;br /&gt;
== Adjusting rc.local* ==&lt;br /&gt;
&lt;br /&gt;
Xen needs a couple of daemons to run to ensure VM management. Add these lines to rc.local and rc.local_shutdown :&lt;br /&gt;
&lt;br /&gt;
 PATH=/usr/local/sbin:/usr/local/bin:$PATH&lt;br /&gt;
 export PATH&lt;br /&gt;
 &lt;br /&gt;
 # start xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons start&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # stop xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons stop&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
== Compiling a dom0 Kernel ==&lt;br /&gt;
&lt;br /&gt;
Domain-0 (dom0 for short) is a special guest (virtual machine) that the Xen hypervisor always loads on host startup. Dom0 is used to control and manage the Xen hypervisor, and provides virtual disks and networks for other unprivileged guests (=domUs). Dom0 support was introduced in Linux kernel 3.0. The kernel generated must include the .config file domU and [http://wiki.xen.org/wiki/Mainline_Linux_Kernel_Configs#Configuring_the_kernel dom0 options]. Here is a minimal example of such a [{{SERVER}}/wikislax/download/config-dom0 .config dom0] file. Feel free to use it as a base, replacing device drivers as required. The rest of the kernel compilation is nominal :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/src -xvf linux-4.4.88.tar.bz2&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # rm linux&lt;br /&gt;
 # ln -s linux-4.4.88 linux&lt;br /&gt;
 # cd linux&lt;br /&gt;
 # make menuconfig&lt;br /&gt;
 # make&lt;br /&gt;
 # make modules_install&lt;br /&gt;
 # cp arch/x86_64/boot/bzImage /boot/vmlinuz-4.4.88-dom0&lt;br /&gt;
 # cp System.map /boot/System.map-4.4.88-dom0&lt;br /&gt;
 # cp .config /boot/config-4.4.88-dom0&lt;br /&gt;
&lt;br /&gt;
We're now all set up, Xen is ready to be booted by grub2 !&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ pFoot |[[Compiling from Source]]|[[Main Page]]|[[Using Grub2]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=148</id>
		<title>Compiling Xen</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=148"/>
				<updated>2025-02-08T20:45:03Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is Xen ? ==&lt;br /&gt;
&lt;br /&gt;
[http://wiki.xen.org/wiki/Xen_Overview Xen] is an hypervisor, a thin software layer executing multiple virtual machines, each running its own operating system. Xen is normally used as a server virtualization platform, running on headless servers without graphical console and controlled through the network. However it is also possible to run Xen on graphical desktops, and with proper hardware virtualization, to dedicate the primary graphics card (and keyboard / mouse) to a virtual machine, making it possible to have high performance full 3D and video acceleration in a virtual machine (see [http://wiki.xen.org/wiki/Xen_VGA_Passthrough Xen VGA Passthru]). Xen is otherwise free and open source.&lt;br /&gt;
&lt;br /&gt;
== A few quirks ==&lt;br /&gt;
&lt;br /&gt;
The '''dev86-0.16.21-x86_64-1.txz''' package included with Slackware 14.2 does not afford compiling '''xen-4.9.0''' properly, and must be replaced by '''[{{SERVER}}/wikislax/download/dev86-0.16.17-x86_64-2.txz dev86-0.16.17-x86_64-2.txz]''', that can be found on the Slackware 13.37, 14.0, or 14.1 distribution disks, in directory '''slackware64/d'''. Trying to compile dev86 [http://v3.sk/~lkundrak/dev86/ from source] is not an alternative : dev86 source versions 0.16.18 to 0.16.21 have the same issue compiling xen-4.9.0, and older 0.16.17 does not compile on Slackware 14.2.&lt;br /&gt;
&lt;br /&gt;
 # removepkg /var/log/packages/dev86-0.16.21-x86_64-1.txz&lt;br /&gt;
 # installpkg dev86-0.16.17-x86_64-2.txz&lt;br /&gt;
&lt;br /&gt;
Also, the '''grub-2.00''' included with Slackware 14.2 does not afford booting xen. However, getting the latest version '''grub-2.02''' from source does work.&lt;br /&gt;
&lt;br /&gt;
== Hardware requirements ==&lt;br /&gt;
&lt;br /&gt;
Xen runs on Intel X86 hardware and requires a processor and motherboard supporting VT-x and optionally VT-d for hardware virtualization. See this [http://www.intel.com/support/motherboards/desktop/sb/cs-030922.htm page] for a list of Intel compatible motherboards and chipsets and this [http://ark.intel.com/ page] for a list of compatible processors. Our system running Xen successfully at the time of this writing (and since June 2012) is based on a DZ77GA70K Intel motherboard, an Intel® Core™ i7-3770 Processor (the overclockable i7-3770 &amp;quot;K&amp;quot; model does not afford virtualization), 32 Gb of PC12800 memory and an MSI GeForce G210 graphics board.&lt;br /&gt;
&lt;br /&gt;
== Documentation difficulties ==&lt;br /&gt;
&lt;br /&gt;
Although the software itself works well and is pretty straighforward, good quality Internet information is missing. The volume of information on the Xen wiki is plethoric, but mostly irrelevant as pertaining to old versions of everything. Building the big picture requires interpretation of tiny bits in forum messages, a pretty painful process, although I have to recognize that it worked for me in the end. An alternative is to use one of these old-style information repositories named &amp;quot;books&amp;quot;. Yes it is pretty old-fashionned ;) but actually there are good ones on the topic. Here is [http://www.amazon.co.uk/The-Book-Xen-Practical-Administrator/dp/1593271867/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1341037874&amp;amp;sr=1-1 the most recent I found], it is a good value but of course you can find more on [http://www.amazon.co.uk/s/ref=nb_sb_noss_2?url=search-alias%3Dstripbooks&amp;amp;field-keywords=xen&amp;amp;x=0&amp;amp;y=0 amazon(.co.uk)].&lt;br /&gt;
&lt;br /&gt;
== Software constraints ==&lt;br /&gt;
&lt;br /&gt;
To make a long story short, at the time of this writing (and since June 2012) working with nVidia graphic boards on Xen and X11 requires the &amp;quot;nouveau&amp;quot; driver. Other drivers like nv or the nVidia proprietary driver do not support Xen and switch off the screen when launched or do not display properly. &amp;quot;Nouveau&amp;quot; requires a fairly recent version of X11. Slackware 13.37 or newer is required. &amp;quot;Nouveau&amp;quot; is available in kernel 3.4.2 upstream and was previously included as a staging driver. Xen dom0 support was included in kernel 3.0. To benefit from both Xen and &amp;quot;Nouveau&amp;quot;, the best is to use kernel 3.4.2 upstream.&lt;br /&gt;
&lt;br /&gt;
== Installing acpica ==&lt;br /&gt;
&lt;br /&gt;
Xen requires acpica. [https://www.acpica.org/downloads Download] then install as below :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf acpica-unix-yyyymmdd.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root acpica-unix-yyyymmdd&lt;br /&gt;
 # cd acpica-unix-yyyymmdd&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
&lt;br /&gt;
== Installing yajl ==&lt;br /&gt;
&lt;br /&gt;
Xen 4.19.1 requires yajl. [http://lloyd.github.io/yajl/ Download] then install as below. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : there is no option to specify the target library directory so the files need to be moved manually.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf lloyd-yajl-17b1790.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root lloyd-yajl-17b1790&lt;br /&gt;
 # cd lloyd-yajl-17b1790&lt;br /&gt;
 # ./configure&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
 # cd ../lib&lt;br /&gt;
 # mv libyajl* ../lib64&lt;br /&gt;
 # ldconfig&lt;br /&gt;
&lt;br /&gt;
== Compiling Xen ==&lt;br /&gt;
&lt;br /&gt;
[http://xen.org/products/xen_source.html Download Xen] from the official [http://www.xen.org xen.org] site. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : File stubs-32.h is missing in the compiler includes so we add a link to the existing stubs-64.h. Also, some Xen Python scripts are installed in /usr/local/lib64/python-2.7/site-packages which python cannot find so we add links from the standard library as well.&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/include/gnu&lt;br /&gt;
 # ln -s stubs-64.h stubs-32.h&lt;br /&gt;
 # cd&lt;br /&gt;
 # tar -C /usr/local -xvf xen-x.y.z.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root xen-x.y.z&lt;br /&gt;
 # cd xen-x.y.z&lt;br /&gt;
 # ./configure --libdir=/usr/local/lib64 --with-initddir=/etc/rc.d&lt;br /&gt;
 # make world&lt;br /&gt;
 # make install&lt;br /&gt;
 # make clean&lt;br /&gt;
 # cd ../lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen /usr/lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen-3.0-py2.7.egg-info /usr/lib64/python2.7/site-packages&lt;br /&gt;
&lt;br /&gt;
== Adjusting rc.local* ==&lt;br /&gt;
&lt;br /&gt;
Xen needs a couple of daemons to run to ensure VM management. Add these lines to rc.local and rc.local_shutdown :&lt;br /&gt;
&lt;br /&gt;
 PATH=/usr/local/sbin:/usr/local/bin:$PATH&lt;br /&gt;
 export PATH&lt;br /&gt;
 &lt;br /&gt;
 # start xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons start&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # stop xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons stop&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
== Compiling a dom0 Kernel ==&lt;br /&gt;
&lt;br /&gt;
Domain-0 (dom0 for short) is a special guest (virtual machine) that the Xen hypervisor always loads on host startup. Dom0 is used to control and manage the Xen hypervisor, and provides virtual disks and networks for other unprivileged guests (=domUs). Dom0 support was introduced in Linux kernel 3.0. The kernel generated must include the .config file domU and [http://wiki.xen.org/wiki/Mainline_Linux_Kernel_Configs#Configuring_the_kernel dom0 options]. Here is a minimal example of such a [{{SERVER}}/wikislax/download/config-dom0 .config dom0] file. Feel free to use it as a base, replacing device drivers as required. The rest of the kernel compilation is nominal :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/src -xvf linux-4.4.88.tar.bz2&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # rm linux&lt;br /&gt;
 # ln -s linux-4.4.88 linux&lt;br /&gt;
 # cd linux&lt;br /&gt;
 # make menuconfig&lt;br /&gt;
 # make&lt;br /&gt;
 # make modules_install&lt;br /&gt;
 # cp arch/x86_64/boot/bzImage /boot/vmlinuz-4.4.88-dom0&lt;br /&gt;
 # cp System.map /boot/System.map-4.4.88-dom0&lt;br /&gt;
 # cp .config /boot/config-4.4.88-dom0&lt;br /&gt;
&lt;br /&gt;
We're now all set up, Xen is ready to be booted by grub2 !&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ pFoot |[[Compiling from Source]]|[[Main Page]]|[[Using Grub2]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=147</id>
		<title>Compiling Xen</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=147"/>
				<updated>2025-02-08T20:03:22Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Installing yajl */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is Xen ? ==&lt;br /&gt;
&lt;br /&gt;
[http://wiki.xen.org/wiki/Xen_Overview Xen] is an hypervisor, a thin software layer executing multiple virtual machines, each running its own operating system. Xen is normally used as a server virtualization platform, running on headless servers without graphical console and controlled through the network. However it is also possible to run Xen on graphical desktops, and with proper hardware virtualization, to dedicate the primary graphics card (and keyboard / mouse) to a virtual machine, making it possible to have high performance full 3D and video acceleration in a virtual machine (see [http://wiki.xen.org/wiki/Xen_VGA_Passthrough Xen VGA Passthru]). Xen is otherwise free and open source.&lt;br /&gt;
&lt;br /&gt;
== A few quirks ==&lt;br /&gt;
&lt;br /&gt;
The '''dev86-0.16.21-x86_64-1.txz''' package included with Slackware 14.2 does not afford compiling '''xen-4.9.0''' properly, and must be replaced by '''[{{SERVER}}/wikislax/download/dev86-0.16.17-x86_64-2.txz dev86-0.16.17-x86_64-2.txz]''', that can be found on the Slackware 13.37, 14.0, or 14.1 distribution disks, in directory '''slackware64/d'''. Trying to compile dev86 [http://v3.sk/~lkundrak/dev86/ from source] is not an alternative : dev86 source versions 0.16.18 to 0.16.21 have the same issue compiling xen-4.9.0, and older 0.16.17 does not compile on Slackware 14.2.&lt;br /&gt;
&lt;br /&gt;
 # removepkg /var/log/packages/dev86-0.16.21-x86_64-1.txz&lt;br /&gt;
 # installpkg dev86-0.16.17-x86_64-2.txz&lt;br /&gt;
&lt;br /&gt;
Also, the '''grub-2.00''' included with Slackware 14.2 does not afford booting xen. However, getting the latest version '''grub-2.02''' from source does work.&lt;br /&gt;
&lt;br /&gt;
== Hardware requirements ==&lt;br /&gt;
&lt;br /&gt;
Xen runs on Intel X86 hardware and requires a processor and motherboard supporting VT-x and optionally VT-d for hardware virtualization. See this [http://www.intel.com/support/motherboards/desktop/sb/cs-030922.htm page] for a list of Intel compatible motherboards and chipsets and this [http://ark.intel.com/ page] for a list of compatible processors. Our system running Xen successfully at the time of this writing (and since June 2012) is based on a DZ77GA70K Intel motherboard, an Intel® Core™ i7-3770 Processor (the overclockable i7-3770 &amp;quot;K&amp;quot; model does not afford virtualization), 32 Gb of PC12800 memory and an MSI GeForce G210 graphics board.&lt;br /&gt;
&lt;br /&gt;
== Documentation difficulties ==&lt;br /&gt;
&lt;br /&gt;
Although the software itself works well and is pretty straighforward, good quality Internet information is missing. The volume of information on the Xen wiki is plethoric, but mostly irrelevant as pertaining to old versions of everything. Building the big picture requires interpretation of tiny bits in forum messages, a pretty painful process, although I have to recognize that it worked for me in the end. An alternative is to use one of these old-style information repositories named &amp;quot;books&amp;quot;. Yes it is pretty old-fashionned ;) but actually there are good ones on the topic. Here is [http://www.amazon.co.uk/The-Book-Xen-Practical-Administrator/dp/1593271867/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1341037874&amp;amp;sr=1-1 the most recent I found], it is a good value but of course you can find more on [http://www.amazon.co.uk/s/ref=nb_sb_noss_2?url=search-alias%3Dstripbooks&amp;amp;field-keywords=xen&amp;amp;x=0&amp;amp;y=0 amazon(.co.uk)].&lt;br /&gt;
&lt;br /&gt;
== Software constraints ==&lt;br /&gt;
&lt;br /&gt;
To make a long story short, at the time of this writing (and since June 2012) working with nVidia graphic boards on Xen and X11 requires the &amp;quot;nouveau&amp;quot; driver. Other drivers like nv or the nVidia proprietary driver do not support Xen and switch off the screen when launched or do not display properly. &amp;quot;Nouveau&amp;quot; requires a fairly recent version of X11. Slackware 13.37 or newer is required. &amp;quot;Nouveau&amp;quot; is available in kernel 3.4.2 upstream and was previously included as a staging driver. Xen dom0 support was included in kernel 3.0. To benefit from both Xen and &amp;quot;Nouveau&amp;quot;, the best is to use kernel 3.4.2 upstream.&lt;br /&gt;
&lt;br /&gt;
== Installing acpica ==&lt;br /&gt;
&lt;br /&gt;
Xen requires acpica. [https://www.acpica.org/downloads Download] then install as below :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf acpica-unix-yyyymmdd.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root acpica-unix-yyyymmdd&lt;br /&gt;
 # cd acpica-unix-yyyymmdd&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
&lt;br /&gt;
== Installing yajl ==&lt;br /&gt;
&lt;br /&gt;
Xen 4.19.1 requires yajl. [http://lloyd.github.io/yajl/ Download] then install as below. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : there is no option to specify the target library directory so the files need to be moved manually.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf lloyd-yajl-17b1790.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root lloyd-yajl-17b1790&lt;br /&gt;
 # cd lloyd-yajl-17b1790&lt;br /&gt;
 # ./configure&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
 # cd ../lib&lt;br /&gt;
 # mv libyajl* ../lib64&lt;br /&gt;
 # ldconfig&lt;br /&gt;
&lt;br /&gt;
== Updating go ==&lt;br /&gt;
&lt;br /&gt;
Xen 4.19.1 requires the go language. Go is included as part of gcc but does not work &amp;quot;as is&amp;quot; and must be replaced by the version from the go web site. [https://go.dev/dl/ Download] then install as below.&lt;br /&gt;
&lt;br /&gt;
 # cd  /var/log/packages&lt;br /&gt;
 # ls | grep gcc-go&lt;br /&gt;
 gcc-go-11.2.0-x86_64-2&lt;br /&gt;
 # removepkg gcc-go-11.2.0-x86_64-2&lt;br /&gt;
 . . .&lt;br /&gt;
 # tar -C /usr/local -xvf go1.23.5.linux-amd64.tar.gz&lt;br /&gt;
&lt;br /&gt;
Then add the '''/usr/local/go/bin''' to '''$PATH''' in /etc/profile. Make sure it works :&lt;br /&gt;
&lt;br /&gt;
 # go version&lt;br /&gt;
 go version go1.23.5 linux/amd64&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Compiling Xen ==&lt;br /&gt;
&lt;br /&gt;
[http://xen.org/products/xen_source.html Download Xen] from the official [http://www.xen.org xen.org] site. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : File stubs-32.h is missing in the compiler includes so we add a link to the existing stubs-64.h. Also, some Xen Python scripts are installed in /usr/local/lib64/python-2.7/site-packages which python cannot find so we add links from the standard library as well.&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/include/gnu&lt;br /&gt;
 # ln -s stubs-64.h stubs-32.h&lt;br /&gt;
 # cd&lt;br /&gt;
 # tar -C /usr/local -xvf xen-x.y.z.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root xen-x.y.z&lt;br /&gt;
 # cd xen-x.y.z&lt;br /&gt;
 # ./configure --libdir=/usr/local/lib64 --with-initddir=/etc/rc.d&lt;br /&gt;
 # make world&lt;br /&gt;
 # make install&lt;br /&gt;
 # make clean&lt;br /&gt;
 # cd ../lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen /usr/lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen-3.0-py2.7.egg-info /usr/lib64/python2.7/site-packages&lt;br /&gt;
&lt;br /&gt;
== Adjusting rc.local* ==&lt;br /&gt;
&lt;br /&gt;
Xen needs a couple of daemons to run to ensure VM management. Add these lines to rc.local and rc.local_shutdown :&lt;br /&gt;
&lt;br /&gt;
 PATH=/usr/local/sbin:/usr/local/bin:$PATH&lt;br /&gt;
 export PATH&lt;br /&gt;
 &lt;br /&gt;
 # start xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons start&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # stop xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons stop&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
== Compiling a dom0 Kernel ==&lt;br /&gt;
&lt;br /&gt;
Domain-0 (dom0 for short) is a special guest (virtual machine) that the Xen hypervisor always loads on host startup. Dom0 is used to control and manage the Xen hypervisor, and provides virtual disks and networks for other unprivileged guests (=domUs). Dom0 support was introduced in Linux kernel 3.0. The kernel generated must include the .config file domU and [http://wiki.xen.org/wiki/Mainline_Linux_Kernel_Configs#Configuring_the_kernel dom0 options]. Here is a minimal example of such a [{{SERVER}}/wikislax/download/config-dom0 .config dom0] file. Feel free to use it as a base, replacing device drivers as required. The rest of the kernel compilation is nominal :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/src -xvf linux-4.4.88.tar.bz2&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # rm linux&lt;br /&gt;
 # ln -s linux-4.4.88 linux&lt;br /&gt;
 # cd linux&lt;br /&gt;
 # make menuconfig&lt;br /&gt;
 # make&lt;br /&gt;
 # make modules_install&lt;br /&gt;
 # cp arch/x86_64/boot/bzImage /boot/vmlinuz-4.4.88-dom0&lt;br /&gt;
 # cp System.map /boot/System.map-4.4.88-dom0&lt;br /&gt;
 # cp .config /boot/config-4.4.88-dom0&lt;br /&gt;
&lt;br /&gt;
We're now all set up, Xen is ready to be booted by grub2 !&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ pFoot |[[Compiling from Source]]|[[Main Page]]|[[Using Grub2]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=146</id>
		<title>Compiling Xen</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=146"/>
				<updated>2025-02-04T13:13:21Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is Xen ? ==&lt;br /&gt;
&lt;br /&gt;
[http://wiki.xen.org/wiki/Xen_Overview Xen] is an hypervisor, a thin software layer executing multiple virtual machines, each running its own operating system. Xen is normally used as a server virtualization platform, running on headless servers without graphical console and controlled through the network. However it is also possible to run Xen on graphical desktops, and with proper hardware virtualization, to dedicate the primary graphics card (and keyboard / mouse) to a virtual machine, making it possible to have high performance full 3D and video acceleration in a virtual machine (see [http://wiki.xen.org/wiki/Xen_VGA_Passthrough Xen VGA Passthru]). Xen is otherwise free and open source.&lt;br /&gt;
&lt;br /&gt;
== A few quirks ==&lt;br /&gt;
&lt;br /&gt;
The '''dev86-0.16.21-x86_64-1.txz''' package included with Slackware 14.2 does not afford compiling '''xen-4.9.0''' properly, and must be replaced by '''[{{SERVER}}/wikislax/download/dev86-0.16.17-x86_64-2.txz dev86-0.16.17-x86_64-2.txz]''', that can be found on the Slackware 13.37, 14.0, or 14.1 distribution disks, in directory '''slackware64/d'''. Trying to compile dev86 [http://v3.sk/~lkundrak/dev86/ from source] is not an alternative : dev86 source versions 0.16.18 to 0.16.21 have the same issue compiling xen-4.9.0, and older 0.16.17 does not compile on Slackware 14.2.&lt;br /&gt;
&lt;br /&gt;
 # removepkg /var/log/packages/dev86-0.16.21-x86_64-1.txz&lt;br /&gt;
 # installpkg dev86-0.16.17-x86_64-2.txz&lt;br /&gt;
&lt;br /&gt;
Also, the '''grub-2.00''' included with Slackware 14.2 does not afford booting xen. However, getting the latest version '''grub-2.02''' from source does work.&lt;br /&gt;
&lt;br /&gt;
== Hardware requirements ==&lt;br /&gt;
&lt;br /&gt;
Xen runs on Intel X86 hardware and requires a processor and motherboard supporting VT-x and optionally VT-d for hardware virtualization. See this [http://www.intel.com/support/motherboards/desktop/sb/cs-030922.htm page] for a list of Intel compatible motherboards and chipsets and this [http://ark.intel.com/ page] for a list of compatible processors. Our system running Xen successfully at the time of this writing (and since June 2012) is based on a DZ77GA70K Intel motherboard, an Intel® Core™ i7-3770 Processor (the overclockable i7-3770 &amp;quot;K&amp;quot; model does not afford virtualization), 32 Gb of PC12800 memory and an MSI GeForce G210 graphics board.&lt;br /&gt;
&lt;br /&gt;
== Documentation difficulties ==&lt;br /&gt;
&lt;br /&gt;
Although the software itself works well and is pretty straighforward, good quality Internet information is missing. The volume of information on the Xen wiki is plethoric, but mostly irrelevant as pertaining to old versions of everything. Building the big picture requires interpretation of tiny bits in forum messages, a pretty painful process, although I have to recognize that it worked for me in the end. An alternative is to use one of these old-style information repositories named &amp;quot;books&amp;quot;. Yes it is pretty old-fashionned ;) but actually there are good ones on the topic. Here is [http://www.amazon.co.uk/The-Book-Xen-Practical-Administrator/dp/1593271867/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1341037874&amp;amp;sr=1-1 the most recent I found], it is a good value but of course you can find more on [http://www.amazon.co.uk/s/ref=nb_sb_noss_2?url=search-alias%3Dstripbooks&amp;amp;field-keywords=xen&amp;amp;x=0&amp;amp;y=0 amazon(.co.uk)].&lt;br /&gt;
&lt;br /&gt;
== Software constraints ==&lt;br /&gt;
&lt;br /&gt;
To make a long story short, at the time of this writing (and since June 2012) working with nVidia graphic boards on Xen and X11 requires the &amp;quot;nouveau&amp;quot; driver. Other drivers like nv or the nVidia proprietary driver do not support Xen and switch off the screen when launched or do not display properly. &amp;quot;Nouveau&amp;quot; requires a fairly recent version of X11. Slackware 13.37 or newer is required. &amp;quot;Nouveau&amp;quot; is available in kernel 3.4.2 upstream and was previously included as a staging driver. Xen dom0 support was included in kernel 3.0. To benefit from both Xen and &amp;quot;Nouveau&amp;quot;, the best is to use kernel 3.4.2 upstream.&lt;br /&gt;
&lt;br /&gt;
== Installing acpica ==&lt;br /&gt;
&lt;br /&gt;
Xen requires acpica. [https://www.acpica.org/downloads Download] then install as below :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf acpica-unix-yyyymmdd.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root acpica-unix-yyyymmdd&lt;br /&gt;
 # cd acpica-unix-yyyymmdd&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
&lt;br /&gt;
== Installing yajl ==&lt;br /&gt;
&lt;br /&gt;
Xen 4.19.1 requires yajl. Yajl is part of Slackware 15.0 but must be replaced by a newer version. [http://lloyd.github.io/yajl/ Download] then install as below. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : there is no option to specify the target library directory so the files need to be moved manually.&lt;br /&gt;
&lt;br /&gt;
 # cd  /var/log/packages&lt;br /&gt;
 # ls | grep yajl&lt;br /&gt;
 yajl-2.1.0-x86_64-3_SBo&lt;br /&gt;
 # removepkg yajl-2.1.0-x86_64-3_SBo&lt;br /&gt;
 . . .&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf lloyd-yajl-17b1790.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root lloyd-yajl-17b1790&lt;br /&gt;
 # cd lloyd-yajl-17b1790&lt;br /&gt;
 # ./configure&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
 # cd ../lib&lt;br /&gt;
 # mv libyajl* ../lib64&lt;br /&gt;
 # ldconfig&lt;br /&gt;
&lt;br /&gt;
== Updating go ==&lt;br /&gt;
&lt;br /&gt;
Xen 4.19.1 requires the go language. Go is included as part of gcc but does not work &amp;quot;as is&amp;quot; and must be replaced by the version from the go web site. [https://go.dev/dl/ Download] then install as below.&lt;br /&gt;
&lt;br /&gt;
 # cd  /var/log/packages&lt;br /&gt;
 # ls | grep gcc-go&lt;br /&gt;
 gcc-go-11.2.0-x86_64-2&lt;br /&gt;
 # removepkg gcc-go-11.2.0-x86_64-2&lt;br /&gt;
 . . .&lt;br /&gt;
 # tar -C /usr/local -xvf go1.23.5.linux-amd64.tar.gz&lt;br /&gt;
&lt;br /&gt;
Then add the '''/usr/local/go/bin''' to '''$PATH''' in /etc/profile. Make sure it works :&lt;br /&gt;
&lt;br /&gt;
 # go version&lt;br /&gt;
 go version go1.23.5 linux/amd64&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Compiling Xen ==&lt;br /&gt;
&lt;br /&gt;
[http://xen.org/products/xen_source.html Download Xen] from the official [http://www.xen.org xen.org] site. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : File stubs-32.h is missing in the compiler includes so we add a link to the existing stubs-64.h. Also, some Xen Python scripts are installed in /usr/local/lib64/python-2.7/site-packages which python cannot find so we add links from the standard library as well.&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/include/gnu&lt;br /&gt;
 # ln -s stubs-64.h stubs-32.h&lt;br /&gt;
 # cd&lt;br /&gt;
 # tar -C /usr/local -xvf xen-x.y.z.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root xen-x.y.z&lt;br /&gt;
 # cd xen-x.y.z&lt;br /&gt;
 # ./configure --libdir=/usr/local/lib64 --with-initddir=/etc/rc.d&lt;br /&gt;
 # make world&lt;br /&gt;
 # make install&lt;br /&gt;
 # make clean&lt;br /&gt;
 # cd ../lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen /usr/lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen-3.0-py2.7.egg-info /usr/lib64/python2.7/site-packages&lt;br /&gt;
&lt;br /&gt;
== Adjusting rc.local* ==&lt;br /&gt;
&lt;br /&gt;
Xen needs a couple of daemons to run to ensure VM management. Add these lines to rc.local and rc.local_shutdown :&lt;br /&gt;
&lt;br /&gt;
 PATH=/usr/local/sbin:/usr/local/bin:$PATH&lt;br /&gt;
 export PATH&lt;br /&gt;
 &lt;br /&gt;
 # start xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons start&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # stop xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons stop&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
== Compiling a dom0 Kernel ==&lt;br /&gt;
&lt;br /&gt;
Domain-0 (dom0 for short) is a special guest (virtual machine) that the Xen hypervisor always loads on host startup. Dom0 is used to control and manage the Xen hypervisor, and provides virtual disks and networks for other unprivileged guests (=domUs). Dom0 support was introduced in Linux kernel 3.0. The kernel generated must include the .config file domU and [http://wiki.xen.org/wiki/Mainline_Linux_Kernel_Configs#Configuring_the_kernel dom0 options]. Here is a minimal example of such a [{{SERVER}}/wikislax/download/config-dom0 .config dom0] file. Feel free to use it as a base, replacing device drivers as required. The rest of the kernel compilation is nominal :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/src -xvf linux-4.4.88.tar.bz2&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # rm linux&lt;br /&gt;
 # ln -s linux-4.4.88 linux&lt;br /&gt;
 # cd linux&lt;br /&gt;
 # make menuconfig&lt;br /&gt;
 # make&lt;br /&gt;
 # make modules_install&lt;br /&gt;
 # cp arch/x86_64/boot/bzImage /boot/vmlinuz-4.4.88-dom0&lt;br /&gt;
 # cp System.map /boot/System.map-4.4.88-dom0&lt;br /&gt;
 # cp .config /boot/config-4.4.88-dom0&lt;br /&gt;
&lt;br /&gt;
We're now all set up, Xen is ready to be booted by grub2 !&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ pFoot |[[Compiling from Source]]|[[Main Page]]|[[Using Grub2]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=145</id>
		<title>Compiling Xen</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=145"/>
				<updated>2025-02-04T12:56:15Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Compiling yajl */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is Xen ? ==&lt;br /&gt;
&lt;br /&gt;
[http://wiki.xen.org/wiki/Xen_Overview Xen] is an hypervisor, a thin software layer executing multiple virtual machines, each running its own operating system. Xen is normally used as a server virtualization platform, running on headless servers without graphical console and controlled through the network. However it is also possible to run Xen on graphical desktops, and with proper hardware virtualization, to dedicate the primary graphics card (and keyboard / mouse) to a virtual machine, making it possible to have high performance full 3D and video acceleration in a virtual machine (see [http://wiki.xen.org/wiki/Xen_VGA_Passthrough Xen VGA Passthru]). Xen is otherwise free and open source.&lt;br /&gt;
&lt;br /&gt;
== A few quirks ==&lt;br /&gt;
&lt;br /&gt;
The '''dev86-0.16.21-x86_64-1.txz''' package included with Slackware 14.2 does not afford compiling '''xen-4.9.0''' properly, and must be replaced by '''[{{SERVER}}/wikislax/download/dev86-0.16.17-x86_64-2.txz dev86-0.16.17-x86_64-2.txz]''', that can be found on the Slackware 13.37, 14.0, or 14.1 distribution disks, in directory '''slackware64/d'''. Trying to compile dev86 [http://v3.sk/~lkundrak/dev86/ from source] is not an alternative : dev86 source versions 0.16.18 to 0.16.21 have the same issue compiling xen-4.9.0, and older 0.16.17 does not compile on Slackware 14.2.&lt;br /&gt;
&lt;br /&gt;
 # removepkg /var/log/packages/dev86-0.16.21-x86_64-1.txz&lt;br /&gt;
 # installpkg dev86-0.16.17-x86_64-2.txz&lt;br /&gt;
&lt;br /&gt;
Also, the '''grub-2.00''' included with Slackware 14.2 does not afford booting xen. However, getting the latest version '''grub-2.02''' from source does work.&lt;br /&gt;
&lt;br /&gt;
== Hardware requirements ==&lt;br /&gt;
&lt;br /&gt;
Xen runs on Intel X86 hardware and requires a processor and motherboard supporting VT-x and optionally VT-d for hardware virtualization. See this [http://www.intel.com/support/motherboards/desktop/sb/cs-030922.htm page] for a list of Intel compatible motherboards and chipsets and this [http://ark.intel.com/ page] for a list of compatible processors. Our system running Xen successfully at the time of this writing (and since June 2012) is based on a DZ77GA70K Intel motherboard, an Intel® Core™ i7-3770 Processor (the overclockable i7-3770 &amp;quot;K&amp;quot; model does not afford virtualization), 32 Gb of PC12800 memory and an MSI GeForce G210 graphics board.&lt;br /&gt;
&lt;br /&gt;
== Documentation difficulties ==&lt;br /&gt;
&lt;br /&gt;
Although the software itself works well and is pretty straighforward, good quality Internet information is missing. The volume of information on the Xen wiki is plethoric, but mostly irrelevant as pertaining to old versions of everything. Building the big picture requires interpretation of tiny bits in forum messages, a pretty painful process, although I have to recognize that it worked for me in the end. An alternative is to use one of these old-style information repositories named &amp;quot;books&amp;quot;. Yes it is pretty old-fashionned ;) but actually there are good ones on the topic. Here is [http://www.amazon.co.uk/The-Book-Xen-Practical-Administrator/dp/1593271867/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1341037874&amp;amp;sr=1-1 the most recent I found], it is a good value but of course you can find more on [http://www.amazon.co.uk/s/ref=nb_sb_noss_2?url=search-alias%3Dstripbooks&amp;amp;field-keywords=xen&amp;amp;x=0&amp;amp;y=0 amazon(.co.uk)].&lt;br /&gt;
&lt;br /&gt;
== Software constraints ==&lt;br /&gt;
&lt;br /&gt;
To make a long story short, at the time of this writing (and since June 2012) working with nVidia graphic boards on Xen and X11 requires the &amp;quot;nouveau&amp;quot; driver. Other drivers like nv or the nVidia proprietary driver do not support Xen and switch off the screen when launched or do not display properly. &amp;quot;Nouveau&amp;quot; requires a fairly recent version of X11. Slackware 13.37 or newer is required. &amp;quot;Nouveau&amp;quot; is available in kernel 3.4.2 upstream and was previously included as a staging driver. Xen dom0 support was included in kernel 3.0. To benefit from both Xen and &amp;quot;Nouveau&amp;quot;, the best is to use kernel 3.4.2 upstream.&lt;br /&gt;
&lt;br /&gt;
== Installing acpica ==&lt;br /&gt;
&lt;br /&gt;
Xen requires acpica. [https://www.acpica.org/downloads Download] then install as below :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf acpica-unix-yyyymmdd.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root acpica-unix-yyyymmdd&lt;br /&gt;
 # cd acpica-unix-yyyymmdd&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
&lt;br /&gt;
== Installing yajl ==&lt;br /&gt;
&lt;br /&gt;
Xen requires yajl. [http://lloyd.github.io/yajl/ Download] then install as below. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : there is no option to specify the target library directory so the files need to be moved manually.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf lloyd-yajl-x.y.z.66cb08c.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root lloyd-yajl-66cb08c&lt;br /&gt;
 # cd lloyd-yajl-66cb08c&lt;br /&gt;
 # ./configure&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
 # cd ../lib&lt;br /&gt;
 # mv libyajl* ../lib64&lt;br /&gt;
 # ldconfig&lt;br /&gt;
 # cd ..&lt;br /&gt;
 # rm -r lloyd-yajl-66cb08c&lt;br /&gt;
&lt;br /&gt;
== Updating go ==&lt;br /&gt;
&lt;br /&gt;
Xen 4.19.1 requires the go language. Go is included as part of gcc but does not work &amp;quot;as is&amp;quot; and must be replaced by the version from the go web site. [https://go.dev/dl/ Download] then install as below.&lt;br /&gt;
&lt;br /&gt;
 # ls /var/log/packages | grep gcc-go&lt;br /&gt;
 gcc-go-11.2.0-x86_64-2&lt;br /&gt;
 # removepkg gcc-go-11.2.0-x86_64-2&lt;br /&gt;
 . . .&lt;br /&gt;
 # tar -C /usr/local -xvf go1.23.5.linux-amd64.tar.gz&lt;br /&gt;
&lt;br /&gt;
Then add the '''/usr/local/go/bin''' to '''$PATH''' in /etc/profile. Make sure it works :&lt;br /&gt;
&lt;br /&gt;
 # go version&lt;br /&gt;
 go version go1.23.5 linux/amd64&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Compiling Xen ==&lt;br /&gt;
&lt;br /&gt;
[http://xen.org/products/xen_source.html Download Xen] from the official [http://www.xen.org xen.org] site. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : File stubs-32.h is missing in the compiler includes so we add a link to the existing stubs-64.h. Also, some Xen Python scripts are installed in /usr/local/lib64/python-2.7/site-packages which python cannot find so we add links from the standard library as well.&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/include/gnu&lt;br /&gt;
 # ln -s stubs-64.h stubs-32.h&lt;br /&gt;
 # cd&lt;br /&gt;
 # tar -C /usr/local -xvf xen-x.y.z.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root xen-x.y.z&lt;br /&gt;
 # cd xen-x.y.z&lt;br /&gt;
 # ./configure --libdir=/usr/local/lib64 --with-initddir=/etc/rc.d&lt;br /&gt;
 # make world&lt;br /&gt;
 # make install&lt;br /&gt;
 # make clean&lt;br /&gt;
 # cd ../lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen /usr/lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen-3.0-py2.7.egg-info /usr/lib64/python2.7/site-packages&lt;br /&gt;
&lt;br /&gt;
== Adjusting rc.local* ==&lt;br /&gt;
&lt;br /&gt;
Xen needs a couple of daemons to run to ensure VM management. Add these lines to rc.local and rc.local_shutdown :&lt;br /&gt;
&lt;br /&gt;
 PATH=/usr/local/sbin:/usr/local/bin:$PATH&lt;br /&gt;
 export PATH&lt;br /&gt;
 &lt;br /&gt;
 # start xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons start&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # stop xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons stop&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
== Compiling a dom0 Kernel ==&lt;br /&gt;
&lt;br /&gt;
Domain-0 (dom0 for short) is a special guest (virtual machine) that the Xen hypervisor always loads on host startup. Dom0 is used to control and manage the Xen hypervisor, and provides virtual disks and networks for other unprivileged guests (=domUs). Dom0 support was introduced in Linux kernel 3.0. The kernel generated must include the .config file domU and [http://wiki.xen.org/wiki/Mainline_Linux_Kernel_Configs#Configuring_the_kernel dom0 options]. Here is a minimal example of such a [{{SERVER}}/wikislax/download/config-dom0 .config dom0] file. Feel free to use it as a base, replacing device drivers as required. The rest of the kernel compilation is nominal :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/src -xvf linux-4.4.88.tar.bz2&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # rm linux&lt;br /&gt;
 # ln -s linux-4.4.88 linux&lt;br /&gt;
 # cd linux&lt;br /&gt;
 # make menuconfig&lt;br /&gt;
 # make&lt;br /&gt;
 # make modules_install&lt;br /&gt;
 # cp arch/x86_64/boot/bzImage /boot/vmlinuz-4.4.88-dom0&lt;br /&gt;
 # cp System.map /boot/System.map-4.4.88-dom0&lt;br /&gt;
 # cp .config /boot/config-4.4.88-dom0&lt;br /&gt;
&lt;br /&gt;
We're now all set up, Xen is ready to be booted by grub2 !&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ pFoot |[[Compiling from Source]]|[[Main Page]]|[[Using Grub2]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=144</id>
		<title>Compiling Xen</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=144"/>
				<updated>2025-02-04T12:52:26Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Compiling acpica */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is Xen ? ==&lt;br /&gt;
&lt;br /&gt;
[http://wiki.xen.org/wiki/Xen_Overview Xen] is an hypervisor, a thin software layer executing multiple virtual machines, each running its own operating system. Xen is normally used as a server virtualization platform, running on headless servers without graphical console and controlled through the network. However it is also possible to run Xen on graphical desktops, and with proper hardware virtualization, to dedicate the primary graphics card (and keyboard / mouse) to a virtual machine, making it possible to have high performance full 3D and video acceleration in a virtual machine (see [http://wiki.xen.org/wiki/Xen_VGA_Passthrough Xen VGA Passthru]). Xen is otherwise free and open source.&lt;br /&gt;
&lt;br /&gt;
== A few quirks ==&lt;br /&gt;
&lt;br /&gt;
The '''dev86-0.16.21-x86_64-1.txz''' package included with Slackware 14.2 does not afford compiling '''xen-4.9.0''' properly, and must be replaced by '''[{{SERVER}}/wikislax/download/dev86-0.16.17-x86_64-2.txz dev86-0.16.17-x86_64-2.txz]''', that can be found on the Slackware 13.37, 14.0, or 14.1 distribution disks, in directory '''slackware64/d'''. Trying to compile dev86 [http://v3.sk/~lkundrak/dev86/ from source] is not an alternative : dev86 source versions 0.16.18 to 0.16.21 have the same issue compiling xen-4.9.0, and older 0.16.17 does not compile on Slackware 14.2.&lt;br /&gt;
&lt;br /&gt;
 # removepkg /var/log/packages/dev86-0.16.21-x86_64-1.txz&lt;br /&gt;
 # installpkg dev86-0.16.17-x86_64-2.txz&lt;br /&gt;
&lt;br /&gt;
Also, the '''grub-2.00''' included with Slackware 14.2 does not afford booting xen. However, getting the latest version '''grub-2.02''' from source does work.&lt;br /&gt;
&lt;br /&gt;
== Hardware requirements ==&lt;br /&gt;
&lt;br /&gt;
Xen runs on Intel X86 hardware and requires a processor and motherboard supporting VT-x and optionally VT-d for hardware virtualization. See this [http://www.intel.com/support/motherboards/desktop/sb/cs-030922.htm page] for a list of Intel compatible motherboards and chipsets and this [http://ark.intel.com/ page] for a list of compatible processors. Our system running Xen successfully at the time of this writing (and since June 2012) is based on a DZ77GA70K Intel motherboard, an Intel® Core™ i7-3770 Processor (the overclockable i7-3770 &amp;quot;K&amp;quot; model does not afford virtualization), 32 Gb of PC12800 memory and an MSI GeForce G210 graphics board.&lt;br /&gt;
&lt;br /&gt;
== Documentation difficulties ==&lt;br /&gt;
&lt;br /&gt;
Although the software itself works well and is pretty straighforward, good quality Internet information is missing. The volume of information on the Xen wiki is plethoric, but mostly irrelevant as pertaining to old versions of everything. Building the big picture requires interpretation of tiny bits in forum messages, a pretty painful process, although I have to recognize that it worked for me in the end. An alternative is to use one of these old-style information repositories named &amp;quot;books&amp;quot;. Yes it is pretty old-fashionned ;) but actually there are good ones on the topic. Here is [http://www.amazon.co.uk/The-Book-Xen-Practical-Administrator/dp/1593271867/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1341037874&amp;amp;sr=1-1 the most recent I found], it is a good value but of course you can find more on [http://www.amazon.co.uk/s/ref=nb_sb_noss_2?url=search-alias%3Dstripbooks&amp;amp;field-keywords=xen&amp;amp;x=0&amp;amp;y=0 amazon(.co.uk)].&lt;br /&gt;
&lt;br /&gt;
== Software constraints ==&lt;br /&gt;
&lt;br /&gt;
To make a long story short, at the time of this writing (and since June 2012) working with nVidia graphic boards on Xen and X11 requires the &amp;quot;nouveau&amp;quot; driver. Other drivers like nv or the nVidia proprietary driver do not support Xen and switch off the screen when launched or do not display properly. &amp;quot;Nouveau&amp;quot; requires a fairly recent version of X11. Slackware 13.37 or newer is required. &amp;quot;Nouveau&amp;quot; is available in kernel 3.4.2 upstream and was previously included as a staging driver. Xen dom0 support was included in kernel 3.0. To benefit from both Xen and &amp;quot;Nouveau&amp;quot;, the best is to use kernel 3.4.2 upstream.&lt;br /&gt;
&lt;br /&gt;
== Installing acpica ==&lt;br /&gt;
&lt;br /&gt;
Xen requires acpica. [https://www.acpica.org/downloads Download] then install as below :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf acpica-unix-yyyymmdd.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root acpica-unix-yyyymmdd&lt;br /&gt;
 # cd acpica-unix-yyyymmdd&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
&lt;br /&gt;
== Compiling yajl ==&lt;br /&gt;
&lt;br /&gt;
Xen requires yajl. [http://lloyd.github.io/yajl/ Download] then install as below. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : there is no option to specify the target library directory so the files need to be moved manually.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf lloyd-yajl-x.y.z.66cb08c.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root lloyd-yajl-66cb08c&lt;br /&gt;
 # cd lloyd-yajl-66cb08c&lt;br /&gt;
 # ./configure&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
 # cd ../lib&lt;br /&gt;
 # mv libyajl* ../lib64&lt;br /&gt;
 # ldconfig&lt;br /&gt;
 # cd ..&lt;br /&gt;
 # rm -r lloyd-yajl-66cb08c&lt;br /&gt;
&lt;br /&gt;
== Updating go ==&lt;br /&gt;
&lt;br /&gt;
Xen 4.19.1 requires the go language. Go is included as part of gcc but does not work &amp;quot;as is&amp;quot; and must be replaced by the version from the go web site. [https://go.dev/dl/ Download] then install as below.&lt;br /&gt;
&lt;br /&gt;
 # ls /var/log/packages | grep gcc-go&lt;br /&gt;
 gcc-go-11.2.0-x86_64-2&lt;br /&gt;
 # removepkg gcc-go-11.2.0-x86_64-2&lt;br /&gt;
 . . .&lt;br /&gt;
 # tar -C /usr/local -xvf go1.23.5.linux-amd64.tar.gz&lt;br /&gt;
&lt;br /&gt;
Then add the '''/usr/local/go/bin''' to '''$PATH''' in /etc/profile. Make sure it works :&lt;br /&gt;
&lt;br /&gt;
 # go version&lt;br /&gt;
 go version go1.23.5 linux/amd64&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Compiling Xen ==&lt;br /&gt;
&lt;br /&gt;
[http://xen.org/products/xen_source.html Download Xen] from the official [http://www.xen.org xen.org] site. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : File stubs-32.h is missing in the compiler includes so we add a link to the existing stubs-64.h. Also, some Xen Python scripts are installed in /usr/local/lib64/python-2.7/site-packages which python cannot find so we add links from the standard library as well.&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/include/gnu&lt;br /&gt;
 # ln -s stubs-64.h stubs-32.h&lt;br /&gt;
 # cd&lt;br /&gt;
 # tar -C /usr/local -xvf xen-x.y.z.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root xen-x.y.z&lt;br /&gt;
 # cd xen-x.y.z&lt;br /&gt;
 # ./configure --libdir=/usr/local/lib64 --with-initddir=/etc/rc.d&lt;br /&gt;
 # make world&lt;br /&gt;
 # make install&lt;br /&gt;
 # make clean&lt;br /&gt;
 # cd ../lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen /usr/lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen-3.0-py2.7.egg-info /usr/lib64/python2.7/site-packages&lt;br /&gt;
&lt;br /&gt;
== Adjusting rc.local* ==&lt;br /&gt;
&lt;br /&gt;
Xen needs a couple of daemons to run to ensure VM management. Add these lines to rc.local and rc.local_shutdown :&lt;br /&gt;
&lt;br /&gt;
 PATH=/usr/local/sbin:/usr/local/bin:$PATH&lt;br /&gt;
 export PATH&lt;br /&gt;
 &lt;br /&gt;
 # start xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons start&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # stop xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons stop&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
== Compiling a dom0 Kernel ==&lt;br /&gt;
&lt;br /&gt;
Domain-0 (dom0 for short) is a special guest (virtual machine) that the Xen hypervisor always loads on host startup. Dom0 is used to control and manage the Xen hypervisor, and provides virtual disks and networks for other unprivileged guests (=domUs). Dom0 support was introduced in Linux kernel 3.0. The kernel generated must include the .config file domU and [http://wiki.xen.org/wiki/Mainline_Linux_Kernel_Configs#Configuring_the_kernel dom0 options]. Here is a minimal example of such a [{{SERVER}}/wikislax/download/config-dom0 .config dom0] file. Feel free to use it as a base, replacing device drivers as required. The rest of the kernel compilation is nominal :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/src -xvf linux-4.4.88.tar.bz2&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # rm linux&lt;br /&gt;
 # ln -s linux-4.4.88 linux&lt;br /&gt;
 # cd linux&lt;br /&gt;
 # make menuconfig&lt;br /&gt;
 # make&lt;br /&gt;
 # make modules_install&lt;br /&gt;
 # cp arch/x86_64/boot/bzImage /boot/vmlinuz-4.4.88-dom0&lt;br /&gt;
 # cp System.map /boot/System.map-4.4.88-dom0&lt;br /&gt;
 # cp .config /boot/config-4.4.88-dom0&lt;br /&gt;
&lt;br /&gt;
We're now all set up, Xen is ready to be booted by grub2 !&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ pFoot |[[Compiling from Source]]|[[Main Page]]|[[Using Grub2]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=143</id>
		<title>Compiling Xen</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=143"/>
				<updated>2025-02-04T12:50:35Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Updating go */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is Xen ? ==&lt;br /&gt;
&lt;br /&gt;
[http://wiki.xen.org/wiki/Xen_Overview Xen] is an hypervisor, a thin software layer executing multiple virtual machines, each running its own operating system. Xen is normally used as a server virtualization platform, running on headless servers without graphical console and controlled through the network. However it is also possible to run Xen on graphical desktops, and with proper hardware virtualization, to dedicate the primary graphics card (and keyboard / mouse) to a virtual machine, making it possible to have high performance full 3D and video acceleration in a virtual machine (see [http://wiki.xen.org/wiki/Xen_VGA_Passthrough Xen VGA Passthru]). Xen is otherwise free and open source.&lt;br /&gt;
&lt;br /&gt;
== A few quirks ==&lt;br /&gt;
&lt;br /&gt;
The '''dev86-0.16.21-x86_64-1.txz''' package included with Slackware 14.2 does not afford compiling '''xen-4.9.0''' properly, and must be replaced by '''[{{SERVER}}/wikislax/download/dev86-0.16.17-x86_64-2.txz dev86-0.16.17-x86_64-2.txz]''', that can be found on the Slackware 13.37, 14.0, or 14.1 distribution disks, in directory '''slackware64/d'''. Trying to compile dev86 [http://v3.sk/~lkundrak/dev86/ from source] is not an alternative : dev86 source versions 0.16.18 to 0.16.21 have the same issue compiling xen-4.9.0, and older 0.16.17 does not compile on Slackware 14.2.&lt;br /&gt;
&lt;br /&gt;
 # removepkg /var/log/packages/dev86-0.16.21-x86_64-1.txz&lt;br /&gt;
 # installpkg dev86-0.16.17-x86_64-2.txz&lt;br /&gt;
&lt;br /&gt;
Also, the '''grub-2.00''' included with Slackware 14.2 does not afford booting xen. However, getting the latest version '''grub-2.02''' from source does work.&lt;br /&gt;
&lt;br /&gt;
== Hardware requirements ==&lt;br /&gt;
&lt;br /&gt;
Xen runs on Intel X86 hardware and requires a processor and motherboard supporting VT-x and optionally VT-d for hardware virtualization. See this [http://www.intel.com/support/motherboards/desktop/sb/cs-030922.htm page] for a list of Intel compatible motherboards and chipsets and this [http://ark.intel.com/ page] for a list of compatible processors. Our system running Xen successfully at the time of this writing (and since June 2012) is based on a DZ77GA70K Intel motherboard, an Intel® Core™ i7-3770 Processor (the overclockable i7-3770 &amp;quot;K&amp;quot; model does not afford virtualization), 32 Gb of PC12800 memory and an MSI GeForce G210 graphics board.&lt;br /&gt;
&lt;br /&gt;
== Documentation difficulties ==&lt;br /&gt;
&lt;br /&gt;
Although the software itself works well and is pretty straighforward, good quality Internet information is missing. The volume of information on the Xen wiki is plethoric, but mostly irrelevant as pertaining to old versions of everything. Building the big picture requires interpretation of tiny bits in forum messages, a pretty painful process, although I have to recognize that it worked for me in the end. An alternative is to use one of these old-style information repositories named &amp;quot;books&amp;quot;. Yes it is pretty old-fashionned ;) but actually there are good ones on the topic. Here is [http://www.amazon.co.uk/The-Book-Xen-Practical-Administrator/dp/1593271867/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1341037874&amp;amp;sr=1-1 the most recent I found], it is a good value but of course you can find more on [http://www.amazon.co.uk/s/ref=nb_sb_noss_2?url=search-alias%3Dstripbooks&amp;amp;field-keywords=xen&amp;amp;x=0&amp;amp;y=0 amazon(.co.uk)].&lt;br /&gt;
&lt;br /&gt;
== Software constraints ==&lt;br /&gt;
&lt;br /&gt;
To make a long story short, at the time of this writing (and since June 2012) working with nVidia graphic boards on Xen and X11 requires the &amp;quot;nouveau&amp;quot; driver. Other drivers like nv or the nVidia proprietary driver do not support Xen and switch off the screen when launched or do not display properly. &amp;quot;Nouveau&amp;quot; requires a fairly recent version of X11. Slackware 13.37 or newer is required. &amp;quot;Nouveau&amp;quot; is available in kernel 3.4.2 upstream and was previously included as a staging driver. Xen dom0 support was included in kernel 3.0. To benefit from both Xen and &amp;quot;Nouveau&amp;quot;, the best is to use kernel 3.4.2 upstream.&lt;br /&gt;
&lt;br /&gt;
== Compiling acpica ==&lt;br /&gt;
&lt;br /&gt;
Xen requires acpica. [https://www.acpica.org/downloads Download] then install as below :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf acpica-unix-yyyymmdd.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root acpica-unix-yyyymmdd&lt;br /&gt;
 # cd acpica-unix-yyyymmdd&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
 # cd ..&lt;br /&gt;
 # rm -r acpica-unix-yyyymmdd&lt;br /&gt;
&lt;br /&gt;
== Compiling yajl ==&lt;br /&gt;
&lt;br /&gt;
Xen requires yajl. [http://lloyd.github.io/yajl/ Download] then install as below. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : there is no option to specify the target library directory so the files need to be moved manually.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf lloyd-yajl-x.y.z.66cb08c.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root lloyd-yajl-66cb08c&lt;br /&gt;
 # cd lloyd-yajl-66cb08c&lt;br /&gt;
 # ./configure&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
 # cd ../lib&lt;br /&gt;
 # mv libyajl* ../lib64&lt;br /&gt;
 # ldconfig&lt;br /&gt;
 # cd ..&lt;br /&gt;
 # rm -r lloyd-yajl-66cb08c&lt;br /&gt;
&lt;br /&gt;
== Updating go ==&lt;br /&gt;
&lt;br /&gt;
Xen 4.19.1 requires the go language. Go is included as part of gcc but does not work &amp;quot;as is&amp;quot; and must be replaced by the version from the go web site. [https://go.dev/dl/ Download] then install as below.&lt;br /&gt;
&lt;br /&gt;
 # ls /var/log/packages | grep gcc-go&lt;br /&gt;
 gcc-go-11.2.0-x86_64-2&lt;br /&gt;
 # removepkg gcc-go-11.2.0-x86_64-2&lt;br /&gt;
 . . .&lt;br /&gt;
 # tar -C /usr/local -xvf go1.23.5.linux-amd64.tar.gz&lt;br /&gt;
&lt;br /&gt;
Then add the '''/usr/local/go/bin''' to '''$PATH''' in /etc/profile. Make sure it works :&lt;br /&gt;
&lt;br /&gt;
 # go version&lt;br /&gt;
 go version go1.23.5 linux/amd64&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
== Compiling Xen ==&lt;br /&gt;
&lt;br /&gt;
[http://xen.org/products/xen_source.html Download Xen] from the official [http://www.xen.org xen.org] site. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : File stubs-32.h is missing in the compiler includes so we add a link to the existing stubs-64.h. Also, some Xen Python scripts are installed in /usr/local/lib64/python-2.7/site-packages which python cannot find so we add links from the standard library as well.&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/include/gnu&lt;br /&gt;
 # ln -s stubs-64.h stubs-32.h&lt;br /&gt;
 # cd&lt;br /&gt;
 # tar -C /usr/local -xvf xen-x.y.z.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root xen-x.y.z&lt;br /&gt;
 # cd xen-x.y.z&lt;br /&gt;
 # ./configure --libdir=/usr/local/lib64 --with-initddir=/etc/rc.d&lt;br /&gt;
 # make world&lt;br /&gt;
 # make install&lt;br /&gt;
 # make clean&lt;br /&gt;
 # cd ../lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen /usr/lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen-3.0-py2.7.egg-info /usr/lib64/python2.7/site-packages&lt;br /&gt;
&lt;br /&gt;
== Adjusting rc.local* ==&lt;br /&gt;
&lt;br /&gt;
Xen needs a couple of daemons to run to ensure VM management. Add these lines to rc.local and rc.local_shutdown :&lt;br /&gt;
&lt;br /&gt;
 PATH=/usr/local/sbin:/usr/local/bin:$PATH&lt;br /&gt;
 export PATH&lt;br /&gt;
 &lt;br /&gt;
 # start xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons start&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # stop xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons stop&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
== Compiling a dom0 Kernel ==&lt;br /&gt;
&lt;br /&gt;
Domain-0 (dom0 for short) is a special guest (virtual machine) that the Xen hypervisor always loads on host startup. Dom0 is used to control and manage the Xen hypervisor, and provides virtual disks and networks for other unprivileged guests (=domUs). Dom0 support was introduced in Linux kernel 3.0. The kernel generated must include the .config file domU and [http://wiki.xen.org/wiki/Mainline_Linux_Kernel_Configs#Configuring_the_kernel dom0 options]. Here is a minimal example of such a [{{SERVER}}/wikislax/download/config-dom0 .config dom0] file. Feel free to use it as a base, replacing device drivers as required. The rest of the kernel compilation is nominal :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/src -xvf linux-4.4.88.tar.bz2&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # rm linux&lt;br /&gt;
 # ln -s linux-4.4.88 linux&lt;br /&gt;
 # cd linux&lt;br /&gt;
 # make menuconfig&lt;br /&gt;
 # make&lt;br /&gt;
 # make modules_install&lt;br /&gt;
 # cp arch/x86_64/boot/bzImage /boot/vmlinuz-4.4.88-dom0&lt;br /&gt;
 # cp System.map /boot/System.map-4.4.88-dom0&lt;br /&gt;
 # cp .config /boot/config-4.4.88-dom0&lt;br /&gt;
&lt;br /&gt;
We're now all set up, Xen is ready to be booted by grub2 !&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ pFoot |[[Compiling from Source]]|[[Main Page]]|[[Using Grub2]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=142</id>
		<title>Compiling Xen</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=142"/>
				<updated>2025-02-04T12:48:06Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Updating go */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is Xen ? ==&lt;br /&gt;
&lt;br /&gt;
[http://wiki.xen.org/wiki/Xen_Overview Xen] is an hypervisor, a thin software layer executing multiple virtual machines, each running its own operating system. Xen is normally used as a server virtualization platform, running on headless servers without graphical console and controlled through the network. However it is also possible to run Xen on graphical desktops, and with proper hardware virtualization, to dedicate the primary graphics card (and keyboard / mouse) to a virtual machine, making it possible to have high performance full 3D and video acceleration in a virtual machine (see [http://wiki.xen.org/wiki/Xen_VGA_Passthrough Xen VGA Passthru]). Xen is otherwise free and open source.&lt;br /&gt;
&lt;br /&gt;
== A few quirks ==&lt;br /&gt;
&lt;br /&gt;
The '''dev86-0.16.21-x86_64-1.txz''' package included with Slackware 14.2 does not afford compiling '''xen-4.9.0''' properly, and must be replaced by '''[{{SERVER}}/wikislax/download/dev86-0.16.17-x86_64-2.txz dev86-0.16.17-x86_64-2.txz]''', that can be found on the Slackware 13.37, 14.0, or 14.1 distribution disks, in directory '''slackware64/d'''. Trying to compile dev86 [http://v3.sk/~lkundrak/dev86/ from source] is not an alternative : dev86 source versions 0.16.18 to 0.16.21 have the same issue compiling xen-4.9.0, and older 0.16.17 does not compile on Slackware 14.2.&lt;br /&gt;
&lt;br /&gt;
 # removepkg /var/log/packages/dev86-0.16.21-x86_64-1.txz&lt;br /&gt;
 # installpkg dev86-0.16.17-x86_64-2.txz&lt;br /&gt;
&lt;br /&gt;
Also, the '''grub-2.00''' included with Slackware 14.2 does not afford booting xen. However, getting the latest version '''grub-2.02''' from source does work.&lt;br /&gt;
&lt;br /&gt;
== Hardware requirements ==&lt;br /&gt;
&lt;br /&gt;
Xen runs on Intel X86 hardware and requires a processor and motherboard supporting VT-x and optionally VT-d for hardware virtualization. See this [http://www.intel.com/support/motherboards/desktop/sb/cs-030922.htm page] for a list of Intel compatible motherboards and chipsets and this [http://ark.intel.com/ page] for a list of compatible processors. Our system running Xen successfully at the time of this writing (and since June 2012) is based on a DZ77GA70K Intel motherboard, an Intel® Core™ i7-3770 Processor (the overclockable i7-3770 &amp;quot;K&amp;quot; model does not afford virtualization), 32 Gb of PC12800 memory and an MSI GeForce G210 graphics board.&lt;br /&gt;
&lt;br /&gt;
== Documentation difficulties ==&lt;br /&gt;
&lt;br /&gt;
Although the software itself works well and is pretty straighforward, good quality Internet information is missing. The volume of information on the Xen wiki is plethoric, but mostly irrelevant as pertaining to old versions of everything. Building the big picture requires interpretation of tiny bits in forum messages, a pretty painful process, although I have to recognize that it worked for me in the end. An alternative is to use one of these old-style information repositories named &amp;quot;books&amp;quot;. Yes it is pretty old-fashionned ;) but actually there are good ones on the topic. Here is [http://www.amazon.co.uk/The-Book-Xen-Practical-Administrator/dp/1593271867/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1341037874&amp;amp;sr=1-1 the most recent I found], it is a good value but of course you can find more on [http://www.amazon.co.uk/s/ref=nb_sb_noss_2?url=search-alias%3Dstripbooks&amp;amp;field-keywords=xen&amp;amp;x=0&amp;amp;y=0 amazon(.co.uk)].&lt;br /&gt;
&lt;br /&gt;
== Software constraints ==&lt;br /&gt;
&lt;br /&gt;
To make a long story short, at the time of this writing (and since June 2012) working with nVidia graphic boards on Xen and X11 requires the &amp;quot;nouveau&amp;quot; driver. Other drivers like nv or the nVidia proprietary driver do not support Xen and switch off the screen when launched or do not display properly. &amp;quot;Nouveau&amp;quot; requires a fairly recent version of X11. Slackware 13.37 or newer is required. &amp;quot;Nouveau&amp;quot; is available in kernel 3.4.2 upstream and was previously included as a staging driver. Xen dom0 support was included in kernel 3.0. To benefit from both Xen and &amp;quot;Nouveau&amp;quot;, the best is to use kernel 3.4.2 upstream.&lt;br /&gt;
&lt;br /&gt;
== Compiling acpica ==&lt;br /&gt;
&lt;br /&gt;
Xen requires acpica. [https://www.acpica.org/downloads Download] then install as below :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf acpica-unix-yyyymmdd.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root acpica-unix-yyyymmdd&lt;br /&gt;
 # cd acpica-unix-yyyymmdd&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
 # cd ..&lt;br /&gt;
 # rm -r acpica-unix-yyyymmdd&lt;br /&gt;
&lt;br /&gt;
== Compiling yajl ==&lt;br /&gt;
&lt;br /&gt;
Xen requires yajl. [http://lloyd.github.io/yajl/ Download] then install as below. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : there is no option to specify the target library directory so the files need to be moved manually.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf lloyd-yajl-x.y.z.66cb08c.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root lloyd-yajl-66cb08c&lt;br /&gt;
 # cd lloyd-yajl-66cb08c&lt;br /&gt;
 # ./configure&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
 # cd ../lib&lt;br /&gt;
 # mv libyajl* ../lib64&lt;br /&gt;
 # ldconfig&lt;br /&gt;
 # cd ..&lt;br /&gt;
 # rm -r lloyd-yajl-66cb08c&lt;br /&gt;
&lt;br /&gt;
== Updating go ==&lt;br /&gt;
&lt;br /&gt;
Xen 4.19.1 requires the go language. Go is included as part of gcc but does not work &amp;quot;as is&amp;quot; and must be replaced by the version from the go web site. [https://go.dev/dl/ Download] then install as below.&lt;br /&gt;
&lt;br /&gt;
 # ls /var/log/packages | grep gcc-go&lt;br /&gt;
 gcc-go-11.2.0-x86_64-2&lt;br /&gt;
 # removepkg gcc-go-11.2.0-x86_64-2&lt;br /&gt;
 . . .&lt;br /&gt;
 # tar -C /usr/local -xvf go1.23.5.linux-amd64.tar.gz&lt;br /&gt;
&lt;br /&gt;
Then add the '''/usr/local/go/bin''' to '''$PATH''' in /etc/profile.&lt;br /&gt;
&lt;br /&gt;
== Compiling Xen ==&lt;br /&gt;
&lt;br /&gt;
[http://xen.org/products/xen_source.html Download Xen] from the official [http://www.xen.org xen.org] site. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : File stubs-32.h is missing in the compiler includes so we add a link to the existing stubs-64.h. Also, some Xen Python scripts are installed in /usr/local/lib64/python-2.7/site-packages which python cannot find so we add links from the standard library as well.&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/include/gnu&lt;br /&gt;
 # ln -s stubs-64.h stubs-32.h&lt;br /&gt;
 # cd&lt;br /&gt;
 # tar -C /usr/local -xvf xen-x.y.z.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root xen-x.y.z&lt;br /&gt;
 # cd xen-x.y.z&lt;br /&gt;
 # ./configure --libdir=/usr/local/lib64 --with-initddir=/etc/rc.d&lt;br /&gt;
 # make world&lt;br /&gt;
 # make install&lt;br /&gt;
 # make clean&lt;br /&gt;
 # cd ../lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen /usr/lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen-3.0-py2.7.egg-info /usr/lib64/python2.7/site-packages&lt;br /&gt;
&lt;br /&gt;
== Adjusting rc.local* ==&lt;br /&gt;
&lt;br /&gt;
Xen needs a couple of daemons to run to ensure VM management. Add these lines to rc.local and rc.local_shutdown :&lt;br /&gt;
&lt;br /&gt;
 PATH=/usr/local/sbin:/usr/local/bin:$PATH&lt;br /&gt;
 export PATH&lt;br /&gt;
 &lt;br /&gt;
 # start xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons start&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # stop xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons stop&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
== Compiling a dom0 Kernel ==&lt;br /&gt;
&lt;br /&gt;
Domain-0 (dom0 for short) is a special guest (virtual machine) that the Xen hypervisor always loads on host startup. Dom0 is used to control and manage the Xen hypervisor, and provides virtual disks and networks for other unprivileged guests (=domUs). Dom0 support was introduced in Linux kernel 3.0. The kernel generated must include the .config file domU and [http://wiki.xen.org/wiki/Mainline_Linux_Kernel_Configs#Configuring_the_kernel dom0 options]. Here is a minimal example of such a [{{SERVER}}/wikislax/download/config-dom0 .config dom0] file. Feel free to use it as a base, replacing device drivers as required. The rest of the kernel compilation is nominal :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/src -xvf linux-4.4.88.tar.bz2&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # rm linux&lt;br /&gt;
 # ln -s linux-4.4.88 linux&lt;br /&gt;
 # cd linux&lt;br /&gt;
 # make menuconfig&lt;br /&gt;
 # make&lt;br /&gt;
 # make modules_install&lt;br /&gt;
 # cp arch/x86_64/boot/bzImage /boot/vmlinuz-4.4.88-dom0&lt;br /&gt;
 # cp System.map /boot/System.map-4.4.88-dom0&lt;br /&gt;
 # cp .config /boot/config-4.4.88-dom0&lt;br /&gt;
&lt;br /&gt;
We're now all set up, Xen is ready to be booted by grub2 !&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ pFoot |[[Compiling from Source]]|[[Main Page]]|[[Using Grub2]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=141</id>
		<title>Compiling Xen</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=141"/>
				<updated>2025-02-04T12:46:52Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Updating go */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is Xen ? ==&lt;br /&gt;
&lt;br /&gt;
[http://wiki.xen.org/wiki/Xen_Overview Xen] is an hypervisor, a thin software layer executing multiple virtual machines, each running its own operating system. Xen is normally used as a server virtualization platform, running on headless servers without graphical console and controlled through the network. However it is also possible to run Xen on graphical desktops, and with proper hardware virtualization, to dedicate the primary graphics card (and keyboard / mouse) to a virtual machine, making it possible to have high performance full 3D and video acceleration in a virtual machine (see [http://wiki.xen.org/wiki/Xen_VGA_Passthrough Xen VGA Passthru]). Xen is otherwise free and open source.&lt;br /&gt;
&lt;br /&gt;
== A few quirks ==&lt;br /&gt;
&lt;br /&gt;
The '''dev86-0.16.21-x86_64-1.txz''' package included with Slackware 14.2 does not afford compiling '''xen-4.9.0''' properly, and must be replaced by '''[{{SERVER}}/wikislax/download/dev86-0.16.17-x86_64-2.txz dev86-0.16.17-x86_64-2.txz]''', that can be found on the Slackware 13.37, 14.0, or 14.1 distribution disks, in directory '''slackware64/d'''. Trying to compile dev86 [http://v3.sk/~lkundrak/dev86/ from source] is not an alternative : dev86 source versions 0.16.18 to 0.16.21 have the same issue compiling xen-4.9.0, and older 0.16.17 does not compile on Slackware 14.2.&lt;br /&gt;
&lt;br /&gt;
 # removepkg /var/log/packages/dev86-0.16.21-x86_64-1.txz&lt;br /&gt;
 # installpkg dev86-0.16.17-x86_64-2.txz&lt;br /&gt;
&lt;br /&gt;
Also, the '''grub-2.00''' included with Slackware 14.2 does not afford booting xen. However, getting the latest version '''grub-2.02''' from source does work.&lt;br /&gt;
&lt;br /&gt;
== Hardware requirements ==&lt;br /&gt;
&lt;br /&gt;
Xen runs on Intel X86 hardware and requires a processor and motherboard supporting VT-x and optionally VT-d for hardware virtualization. See this [http://www.intel.com/support/motherboards/desktop/sb/cs-030922.htm page] for a list of Intel compatible motherboards and chipsets and this [http://ark.intel.com/ page] for a list of compatible processors. Our system running Xen successfully at the time of this writing (and since June 2012) is based on a DZ77GA70K Intel motherboard, an Intel® Core™ i7-3770 Processor (the overclockable i7-3770 &amp;quot;K&amp;quot; model does not afford virtualization), 32 Gb of PC12800 memory and an MSI GeForce G210 graphics board.&lt;br /&gt;
&lt;br /&gt;
== Documentation difficulties ==&lt;br /&gt;
&lt;br /&gt;
Although the software itself works well and is pretty straighforward, good quality Internet information is missing. The volume of information on the Xen wiki is plethoric, but mostly irrelevant as pertaining to old versions of everything. Building the big picture requires interpretation of tiny bits in forum messages, a pretty painful process, although I have to recognize that it worked for me in the end. An alternative is to use one of these old-style information repositories named &amp;quot;books&amp;quot;. Yes it is pretty old-fashionned ;) but actually there are good ones on the topic. Here is [http://www.amazon.co.uk/The-Book-Xen-Practical-Administrator/dp/1593271867/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1341037874&amp;amp;sr=1-1 the most recent I found], it is a good value but of course you can find more on [http://www.amazon.co.uk/s/ref=nb_sb_noss_2?url=search-alias%3Dstripbooks&amp;amp;field-keywords=xen&amp;amp;x=0&amp;amp;y=0 amazon(.co.uk)].&lt;br /&gt;
&lt;br /&gt;
== Software constraints ==&lt;br /&gt;
&lt;br /&gt;
To make a long story short, at the time of this writing (and since June 2012) working with nVidia graphic boards on Xen and X11 requires the &amp;quot;nouveau&amp;quot; driver. Other drivers like nv or the nVidia proprietary driver do not support Xen and switch off the screen when launched or do not display properly. &amp;quot;Nouveau&amp;quot; requires a fairly recent version of X11. Slackware 13.37 or newer is required. &amp;quot;Nouveau&amp;quot; is available in kernel 3.4.2 upstream and was previously included as a staging driver. Xen dom0 support was included in kernel 3.0. To benefit from both Xen and &amp;quot;Nouveau&amp;quot;, the best is to use kernel 3.4.2 upstream.&lt;br /&gt;
&lt;br /&gt;
== Compiling acpica ==&lt;br /&gt;
&lt;br /&gt;
Xen requires acpica. [https://www.acpica.org/downloads Download] then install as below :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf acpica-unix-yyyymmdd.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root acpica-unix-yyyymmdd&lt;br /&gt;
 # cd acpica-unix-yyyymmdd&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
 # cd ..&lt;br /&gt;
 # rm -r acpica-unix-yyyymmdd&lt;br /&gt;
&lt;br /&gt;
== Compiling yajl ==&lt;br /&gt;
&lt;br /&gt;
Xen requires yajl. [http://lloyd.github.io/yajl/ Download] then install as below. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : there is no option to specify the target library directory so the files need to be moved manually.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf lloyd-yajl-x.y.z.66cb08c.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root lloyd-yajl-66cb08c&lt;br /&gt;
 # cd lloyd-yajl-66cb08c&lt;br /&gt;
 # ./configure&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
 # cd ../lib&lt;br /&gt;
 # mv libyajl* ../lib64&lt;br /&gt;
 # ldconfig&lt;br /&gt;
 # cd ..&lt;br /&gt;
 # rm -r lloyd-yajl-66cb08c&lt;br /&gt;
&lt;br /&gt;
== Updating go ==&lt;br /&gt;
&lt;br /&gt;
Xen 4.19.1 requires the go language. Go is included as part of gcc but does not work &amp;quot;as is&amp;quot; and must be replaced by the version from the go web site. [https://go.dev/dl/ Download] then install as below.&lt;br /&gt;
&lt;br /&gt;
 # ls /var/log/packages | grep gcc-go&lt;br /&gt;
 gcc-go-11.2.0-x86_64-2&lt;br /&gt;
 # removepkg gcc-go-11.2.0-x86_64-2&lt;br /&gt;
 . . .&lt;br /&gt;
 # tar -C /usr/local -xvf go1.23.5.linux-amd64.tar.gz&lt;br /&gt;
&lt;br /&gt;
Then add the '''/usr/local/go''' to '''$PATH''' in /etc/profile.&lt;br /&gt;
&lt;br /&gt;
== Compiling Xen ==&lt;br /&gt;
&lt;br /&gt;
[http://xen.org/products/xen_source.html Download Xen] from the official [http://www.xen.org xen.org] site. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : File stubs-32.h is missing in the compiler includes so we add a link to the existing stubs-64.h. Also, some Xen Python scripts are installed in /usr/local/lib64/python-2.7/site-packages which python cannot find so we add links from the standard library as well.&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/include/gnu&lt;br /&gt;
 # ln -s stubs-64.h stubs-32.h&lt;br /&gt;
 # cd&lt;br /&gt;
 # tar -C /usr/local -xvf xen-x.y.z.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root xen-x.y.z&lt;br /&gt;
 # cd xen-x.y.z&lt;br /&gt;
 # ./configure --libdir=/usr/local/lib64 --with-initddir=/etc/rc.d&lt;br /&gt;
 # make world&lt;br /&gt;
 # make install&lt;br /&gt;
 # make clean&lt;br /&gt;
 # cd ../lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen /usr/lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen-3.0-py2.7.egg-info /usr/lib64/python2.7/site-packages&lt;br /&gt;
&lt;br /&gt;
== Adjusting rc.local* ==&lt;br /&gt;
&lt;br /&gt;
Xen needs a couple of daemons to run to ensure VM management. Add these lines to rc.local and rc.local_shutdown :&lt;br /&gt;
&lt;br /&gt;
 PATH=/usr/local/sbin:/usr/local/bin:$PATH&lt;br /&gt;
 export PATH&lt;br /&gt;
 &lt;br /&gt;
 # start xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons start&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # stop xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons stop&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
== Compiling a dom0 Kernel ==&lt;br /&gt;
&lt;br /&gt;
Domain-0 (dom0 for short) is a special guest (virtual machine) that the Xen hypervisor always loads on host startup. Dom0 is used to control and manage the Xen hypervisor, and provides virtual disks and networks for other unprivileged guests (=domUs). Dom0 support was introduced in Linux kernel 3.0. The kernel generated must include the .config file domU and [http://wiki.xen.org/wiki/Mainline_Linux_Kernel_Configs#Configuring_the_kernel dom0 options]. Here is a minimal example of such a [{{SERVER}}/wikislax/download/config-dom0 .config dom0] file. Feel free to use it as a base, replacing device drivers as required. The rest of the kernel compilation is nominal :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/src -xvf linux-4.4.88.tar.bz2&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # rm linux&lt;br /&gt;
 # ln -s linux-4.4.88 linux&lt;br /&gt;
 # cd linux&lt;br /&gt;
 # make menuconfig&lt;br /&gt;
 # make&lt;br /&gt;
 # make modules_install&lt;br /&gt;
 # cp arch/x86_64/boot/bzImage /boot/vmlinuz-4.4.88-dom0&lt;br /&gt;
 # cp System.map /boot/System.map-4.4.88-dom0&lt;br /&gt;
 # cp .config /boot/config-4.4.88-dom0&lt;br /&gt;
&lt;br /&gt;
We're now all set up, Xen is ready to be booted by grub2 !&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ pFoot |[[Compiling from Source]]|[[Main Page]]|[[Using Grub2]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=140</id>
		<title>Compiling Xen</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=140"/>
				<updated>2025-02-04T12:41:46Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Updating go */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is Xen ? ==&lt;br /&gt;
&lt;br /&gt;
[http://wiki.xen.org/wiki/Xen_Overview Xen] is an hypervisor, a thin software layer executing multiple virtual machines, each running its own operating system. Xen is normally used as a server virtualization platform, running on headless servers without graphical console and controlled through the network. However it is also possible to run Xen on graphical desktops, and with proper hardware virtualization, to dedicate the primary graphics card (and keyboard / mouse) to a virtual machine, making it possible to have high performance full 3D and video acceleration in a virtual machine (see [http://wiki.xen.org/wiki/Xen_VGA_Passthrough Xen VGA Passthru]). Xen is otherwise free and open source.&lt;br /&gt;
&lt;br /&gt;
== A few quirks ==&lt;br /&gt;
&lt;br /&gt;
The '''dev86-0.16.21-x86_64-1.txz''' package included with Slackware 14.2 does not afford compiling '''xen-4.9.0''' properly, and must be replaced by '''[{{SERVER}}/wikislax/download/dev86-0.16.17-x86_64-2.txz dev86-0.16.17-x86_64-2.txz]''', that can be found on the Slackware 13.37, 14.0, or 14.1 distribution disks, in directory '''slackware64/d'''. Trying to compile dev86 [http://v3.sk/~lkundrak/dev86/ from source] is not an alternative : dev86 source versions 0.16.18 to 0.16.21 have the same issue compiling xen-4.9.0, and older 0.16.17 does not compile on Slackware 14.2.&lt;br /&gt;
&lt;br /&gt;
 # removepkg /var/log/packages/dev86-0.16.21-x86_64-1.txz&lt;br /&gt;
 # installpkg dev86-0.16.17-x86_64-2.txz&lt;br /&gt;
&lt;br /&gt;
Also, the '''grub-2.00''' included with Slackware 14.2 does not afford booting xen. However, getting the latest version '''grub-2.02''' from source does work.&lt;br /&gt;
&lt;br /&gt;
== Hardware requirements ==&lt;br /&gt;
&lt;br /&gt;
Xen runs on Intel X86 hardware and requires a processor and motherboard supporting VT-x and optionally VT-d for hardware virtualization. See this [http://www.intel.com/support/motherboards/desktop/sb/cs-030922.htm page] for a list of Intel compatible motherboards and chipsets and this [http://ark.intel.com/ page] for a list of compatible processors. Our system running Xen successfully at the time of this writing (and since June 2012) is based on a DZ77GA70K Intel motherboard, an Intel® Core™ i7-3770 Processor (the overclockable i7-3770 &amp;quot;K&amp;quot; model does not afford virtualization), 32 Gb of PC12800 memory and an MSI GeForce G210 graphics board.&lt;br /&gt;
&lt;br /&gt;
== Documentation difficulties ==&lt;br /&gt;
&lt;br /&gt;
Although the software itself works well and is pretty straighforward, good quality Internet information is missing. The volume of information on the Xen wiki is plethoric, but mostly irrelevant as pertaining to old versions of everything. Building the big picture requires interpretation of tiny bits in forum messages, a pretty painful process, although I have to recognize that it worked for me in the end. An alternative is to use one of these old-style information repositories named &amp;quot;books&amp;quot;. Yes it is pretty old-fashionned ;) but actually there are good ones on the topic. Here is [http://www.amazon.co.uk/The-Book-Xen-Practical-Administrator/dp/1593271867/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1341037874&amp;amp;sr=1-1 the most recent I found], it is a good value but of course you can find more on [http://www.amazon.co.uk/s/ref=nb_sb_noss_2?url=search-alias%3Dstripbooks&amp;amp;field-keywords=xen&amp;amp;x=0&amp;amp;y=0 amazon(.co.uk)].&lt;br /&gt;
&lt;br /&gt;
== Software constraints ==&lt;br /&gt;
&lt;br /&gt;
To make a long story short, at the time of this writing (and since June 2012) working with nVidia graphic boards on Xen and X11 requires the &amp;quot;nouveau&amp;quot; driver. Other drivers like nv or the nVidia proprietary driver do not support Xen and switch off the screen when launched or do not display properly. &amp;quot;Nouveau&amp;quot; requires a fairly recent version of X11. Slackware 13.37 or newer is required. &amp;quot;Nouveau&amp;quot; is available in kernel 3.4.2 upstream and was previously included as a staging driver. Xen dom0 support was included in kernel 3.0. To benefit from both Xen and &amp;quot;Nouveau&amp;quot;, the best is to use kernel 3.4.2 upstream.&lt;br /&gt;
&lt;br /&gt;
== Compiling acpica ==&lt;br /&gt;
&lt;br /&gt;
Xen requires acpica. [https://www.acpica.org/downloads Download] then install as below :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf acpica-unix-yyyymmdd.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root acpica-unix-yyyymmdd&lt;br /&gt;
 # cd acpica-unix-yyyymmdd&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
 # cd ..&lt;br /&gt;
 # rm -r acpica-unix-yyyymmdd&lt;br /&gt;
&lt;br /&gt;
== Compiling yajl ==&lt;br /&gt;
&lt;br /&gt;
Xen requires yajl. [http://lloyd.github.io/yajl/ Download] then install as below. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : there is no option to specify the target library directory so the files need to be moved manually.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf lloyd-yajl-x.y.z.66cb08c.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root lloyd-yajl-66cb08c&lt;br /&gt;
 # cd lloyd-yajl-66cb08c&lt;br /&gt;
 # ./configure&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
 # cd ../lib&lt;br /&gt;
 # mv libyajl* ../lib64&lt;br /&gt;
 # ldconfig&lt;br /&gt;
 # cd ..&lt;br /&gt;
 # rm -r lloyd-yajl-66cb08c&lt;br /&gt;
&lt;br /&gt;
== Updating go ==&lt;br /&gt;
&lt;br /&gt;
Xen 4.19.1 requires the go language. Go is included as part of gcc but does not work &amp;quot;as is&amp;quot; and must be replaced by the version from the go web site. [https://go.dev/dl/ Download] then install as below.&lt;br /&gt;
&lt;br /&gt;
 # ls /var/log/packages | grep gcc-go&lt;br /&gt;
 gcc-go-11.2.0-x86_64-2&lt;br /&gt;
 # removepkg gcc-go-11.2.0-x86_64-2&lt;br /&gt;
 . . .&lt;br /&gt;
 # tar -C /usr/local -xvf go1.23.5.linux-amd64.tar.gz&lt;br /&gt;
&lt;br /&gt;
== Compiling Xen ==&lt;br /&gt;
&lt;br /&gt;
[http://xen.org/products/xen_source.html Download Xen] from the official [http://www.xen.org xen.org] site. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : File stubs-32.h is missing in the compiler includes so we add a link to the existing stubs-64.h. Also, some Xen Python scripts are installed in /usr/local/lib64/python-2.7/site-packages which python cannot find so we add links from the standard library as well.&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/include/gnu&lt;br /&gt;
 # ln -s stubs-64.h stubs-32.h&lt;br /&gt;
 # cd&lt;br /&gt;
 # tar -C /usr/local -xvf xen-x.y.z.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root xen-x.y.z&lt;br /&gt;
 # cd xen-x.y.z&lt;br /&gt;
 # ./configure --libdir=/usr/local/lib64 --with-initddir=/etc/rc.d&lt;br /&gt;
 # make world&lt;br /&gt;
 # make install&lt;br /&gt;
 # make clean&lt;br /&gt;
 # cd ../lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen /usr/lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen-3.0-py2.7.egg-info /usr/lib64/python2.7/site-packages&lt;br /&gt;
&lt;br /&gt;
== Adjusting rc.local* ==&lt;br /&gt;
&lt;br /&gt;
Xen needs a couple of daemons to run to ensure VM management. Add these lines to rc.local and rc.local_shutdown :&lt;br /&gt;
&lt;br /&gt;
 PATH=/usr/local/sbin:/usr/local/bin:$PATH&lt;br /&gt;
 export PATH&lt;br /&gt;
 &lt;br /&gt;
 # start xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons start&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # stop xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons stop&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
== Compiling a dom0 Kernel ==&lt;br /&gt;
&lt;br /&gt;
Domain-0 (dom0 for short) is a special guest (virtual machine) that the Xen hypervisor always loads on host startup. Dom0 is used to control and manage the Xen hypervisor, and provides virtual disks and networks for other unprivileged guests (=domUs). Dom0 support was introduced in Linux kernel 3.0. The kernel generated must include the .config file domU and [http://wiki.xen.org/wiki/Mainline_Linux_Kernel_Configs#Configuring_the_kernel dom0 options]. Here is a minimal example of such a [{{SERVER}}/wikislax/download/config-dom0 .config dom0] file. Feel free to use it as a base, replacing device drivers as required. The rest of the kernel compilation is nominal :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/src -xvf linux-4.4.88.tar.bz2&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # rm linux&lt;br /&gt;
 # ln -s linux-4.4.88 linux&lt;br /&gt;
 # cd linux&lt;br /&gt;
 # make menuconfig&lt;br /&gt;
 # make&lt;br /&gt;
 # make modules_install&lt;br /&gt;
 # cp arch/x86_64/boot/bzImage /boot/vmlinuz-4.4.88-dom0&lt;br /&gt;
 # cp System.map /boot/System.map-4.4.88-dom0&lt;br /&gt;
 # cp .config /boot/config-4.4.88-dom0&lt;br /&gt;
&lt;br /&gt;
We're now all set up, Xen is ready to be booted by grub2 !&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ pFoot |[[Compiling from Source]]|[[Main Page]]|[[Using Grub2]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=139</id>
		<title>Compiling Xen</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=139"/>
				<updated>2025-02-04T08:30:53Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Updating go */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is Xen ? ==&lt;br /&gt;
&lt;br /&gt;
[http://wiki.xen.org/wiki/Xen_Overview Xen] is an hypervisor, a thin software layer executing multiple virtual machines, each running its own operating system. Xen is normally used as a server virtualization platform, running on headless servers without graphical console and controlled through the network. However it is also possible to run Xen on graphical desktops, and with proper hardware virtualization, to dedicate the primary graphics card (and keyboard / mouse) to a virtual machine, making it possible to have high performance full 3D and video acceleration in a virtual machine (see [http://wiki.xen.org/wiki/Xen_VGA_Passthrough Xen VGA Passthru]). Xen is otherwise free and open source.&lt;br /&gt;
&lt;br /&gt;
== A few quirks ==&lt;br /&gt;
&lt;br /&gt;
The '''dev86-0.16.21-x86_64-1.txz''' package included with Slackware 14.2 does not afford compiling '''xen-4.9.0''' properly, and must be replaced by '''[{{SERVER}}/wikislax/download/dev86-0.16.17-x86_64-2.txz dev86-0.16.17-x86_64-2.txz]''', that can be found on the Slackware 13.37, 14.0, or 14.1 distribution disks, in directory '''slackware64/d'''. Trying to compile dev86 [http://v3.sk/~lkundrak/dev86/ from source] is not an alternative : dev86 source versions 0.16.18 to 0.16.21 have the same issue compiling xen-4.9.0, and older 0.16.17 does not compile on Slackware 14.2.&lt;br /&gt;
&lt;br /&gt;
 # removepkg /var/log/packages/dev86-0.16.21-x86_64-1.txz&lt;br /&gt;
 # installpkg dev86-0.16.17-x86_64-2.txz&lt;br /&gt;
&lt;br /&gt;
Also, the '''grub-2.00''' included with Slackware 14.2 does not afford booting xen. However, getting the latest version '''grub-2.02''' from source does work.&lt;br /&gt;
&lt;br /&gt;
== Hardware requirements ==&lt;br /&gt;
&lt;br /&gt;
Xen runs on Intel X86 hardware and requires a processor and motherboard supporting VT-x and optionally VT-d for hardware virtualization. See this [http://www.intel.com/support/motherboards/desktop/sb/cs-030922.htm page] for a list of Intel compatible motherboards and chipsets and this [http://ark.intel.com/ page] for a list of compatible processors. Our system running Xen successfully at the time of this writing (and since June 2012) is based on a DZ77GA70K Intel motherboard, an Intel® Core™ i7-3770 Processor (the overclockable i7-3770 &amp;quot;K&amp;quot; model does not afford virtualization), 32 Gb of PC12800 memory and an MSI GeForce G210 graphics board.&lt;br /&gt;
&lt;br /&gt;
== Documentation difficulties ==&lt;br /&gt;
&lt;br /&gt;
Although the software itself works well and is pretty straighforward, good quality Internet information is missing. The volume of information on the Xen wiki is plethoric, but mostly irrelevant as pertaining to old versions of everything. Building the big picture requires interpretation of tiny bits in forum messages, a pretty painful process, although I have to recognize that it worked for me in the end. An alternative is to use one of these old-style information repositories named &amp;quot;books&amp;quot;. Yes it is pretty old-fashionned ;) but actually there are good ones on the topic. Here is [http://www.amazon.co.uk/The-Book-Xen-Practical-Administrator/dp/1593271867/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1341037874&amp;amp;sr=1-1 the most recent I found], it is a good value but of course you can find more on [http://www.amazon.co.uk/s/ref=nb_sb_noss_2?url=search-alias%3Dstripbooks&amp;amp;field-keywords=xen&amp;amp;x=0&amp;amp;y=0 amazon(.co.uk)].&lt;br /&gt;
&lt;br /&gt;
== Software constraints ==&lt;br /&gt;
&lt;br /&gt;
To make a long story short, at the time of this writing (and since June 2012) working with nVidia graphic boards on Xen and X11 requires the &amp;quot;nouveau&amp;quot; driver. Other drivers like nv or the nVidia proprietary driver do not support Xen and switch off the screen when launched or do not display properly. &amp;quot;Nouveau&amp;quot; requires a fairly recent version of X11. Slackware 13.37 or newer is required. &amp;quot;Nouveau&amp;quot; is available in kernel 3.4.2 upstream and was previously included as a staging driver. Xen dom0 support was included in kernel 3.0. To benefit from both Xen and &amp;quot;Nouveau&amp;quot;, the best is to use kernel 3.4.2 upstream.&lt;br /&gt;
&lt;br /&gt;
== Compiling acpica ==&lt;br /&gt;
&lt;br /&gt;
Xen requires acpica. [https://www.acpica.org/downloads Download] then install as below :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf acpica-unix-yyyymmdd.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root acpica-unix-yyyymmdd&lt;br /&gt;
 # cd acpica-unix-yyyymmdd&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
 # cd ..&lt;br /&gt;
 # rm -r acpica-unix-yyyymmdd&lt;br /&gt;
&lt;br /&gt;
== Compiling yajl ==&lt;br /&gt;
&lt;br /&gt;
Xen requires yajl. [http://lloyd.github.io/yajl/ Download] then install as below. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : there is no option to specify the target library directory so the files need to be moved manually.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf lloyd-yajl-x.y.z.66cb08c.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root lloyd-yajl-66cb08c&lt;br /&gt;
 # cd lloyd-yajl-66cb08c&lt;br /&gt;
 # ./configure&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
 # cd ../lib&lt;br /&gt;
 # mv libyajl* ../lib64&lt;br /&gt;
 # ldconfig&lt;br /&gt;
 # cd ..&lt;br /&gt;
 # rm -r lloyd-yajl-66cb08c&lt;br /&gt;
&lt;br /&gt;
== Updating go ==&lt;br /&gt;
&lt;br /&gt;
Xen 4.19.1 requires the go language. Go is included as part of gcc but does not work &amp;quot;as is&amp;quot; and must be replaced by the version from the go web site.&lt;br /&gt;
&lt;br /&gt;
 # ls /var/log/packages | grep gcc-go&lt;br /&gt;
 gcc-go-11.2.0-x86_64-2&lt;br /&gt;
 # removepkg gcc-go-11.2.0-x86_64-2&lt;br /&gt;
 . . .&lt;br /&gt;
 # wget https://go.dev/dl/go1.23.5.linux-amd64.tar.gz&lt;br /&gt;
 # tar -C /usr/local -xvf go1.23.5.linux-amd64.tar.gz&lt;br /&gt;
&lt;br /&gt;
== Compiling Xen ==&lt;br /&gt;
&lt;br /&gt;
[http://xen.org/products/xen_source.html Download Xen] from the official [http://www.xen.org xen.org] site. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : File stubs-32.h is missing in the compiler includes so we add a link to the existing stubs-64.h. Also, some Xen Python scripts are installed in /usr/local/lib64/python-2.7/site-packages which python cannot find so we add links from the standard library as well.&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/include/gnu&lt;br /&gt;
 # ln -s stubs-64.h stubs-32.h&lt;br /&gt;
 # cd&lt;br /&gt;
 # tar -C /usr/local -xvf xen-x.y.z.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root xen-x.y.z&lt;br /&gt;
 # cd xen-x.y.z&lt;br /&gt;
 # ./configure --libdir=/usr/local/lib64 --with-initddir=/etc/rc.d&lt;br /&gt;
 # make world&lt;br /&gt;
 # make install&lt;br /&gt;
 # make clean&lt;br /&gt;
 # cd ../lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen /usr/lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen-3.0-py2.7.egg-info /usr/lib64/python2.7/site-packages&lt;br /&gt;
&lt;br /&gt;
== Adjusting rc.local* ==&lt;br /&gt;
&lt;br /&gt;
Xen needs a couple of daemons to run to ensure VM management. Add these lines to rc.local and rc.local_shutdown :&lt;br /&gt;
&lt;br /&gt;
 PATH=/usr/local/sbin:/usr/local/bin:$PATH&lt;br /&gt;
 export PATH&lt;br /&gt;
 &lt;br /&gt;
 # start xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons start&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # stop xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons stop&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
== Compiling a dom0 Kernel ==&lt;br /&gt;
&lt;br /&gt;
Domain-0 (dom0 for short) is a special guest (virtual machine) that the Xen hypervisor always loads on host startup. Dom0 is used to control and manage the Xen hypervisor, and provides virtual disks and networks for other unprivileged guests (=domUs). Dom0 support was introduced in Linux kernel 3.0. The kernel generated must include the .config file domU and [http://wiki.xen.org/wiki/Mainline_Linux_Kernel_Configs#Configuring_the_kernel dom0 options]. Here is a minimal example of such a [{{SERVER}}/wikislax/download/config-dom0 .config dom0] file. Feel free to use it as a base, replacing device drivers as required. The rest of the kernel compilation is nominal :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/src -xvf linux-4.4.88.tar.bz2&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # rm linux&lt;br /&gt;
 # ln -s linux-4.4.88 linux&lt;br /&gt;
 # cd linux&lt;br /&gt;
 # make menuconfig&lt;br /&gt;
 # make&lt;br /&gt;
 # make modules_install&lt;br /&gt;
 # cp arch/x86_64/boot/bzImage /boot/vmlinuz-4.4.88-dom0&lt;br /&gt;
 # cp System.map /boot/System.map-4.4.88-dom0&lt;br /&gt;
 # cp .config /boot/config-4.4.88-dom0&lt;br /&gt;
&lt;br /&gt;
We're now all set up, Xen is ready to be booted by grub2 !&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ pFoot |[[Compiling from Source]]|[[Main Page]]|[[Using Grub2]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=138</id>
		<title>Compiling Xen</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=138"/>
				<updated>2025-02-04T08:26:34Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Updating go */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is Xen ? ==&lt;br /&gt;
&lt;br /&gt;
[http://wiki.xen.org/wiki/Xen_Overview Xen] is an hypervisor, a thin software layer executing multiple virtual machines, each running its own operating system. Xen is normally used as a server virtualization platform, running on headless servers without graphical console and controlled through the network. However it is also possible to run Xen on graphical desktops, and with proper hardware virtualization, to dedicate the primary graphics card (and keyboard / mouse) to a virtual machine, making it possible to have high performance full 3D and video acceleration in a virtual machine (see [http://wiki.xen.org/wiki/Xen_VGA_Passthrough Xen VGA Passthru]). Xen is otherwise free and open source.&lt;br /&gt;
&lt;br /&gt;
== A few quirks ==&lt;br /&gt;
&lt;br /&gt;
The '''dev86-0.16.21-x86_64-1.txz''' package included with Slackware 14.2 does not afford compiling '''xen-4.9.0''' properly, and must be replaced by '''[{{SERVER}}/wikislax/download/dev86-0.16.17-x86_64-2.txz dev86-0.16.17-x86_64-2.txz]''', that can be found on the Slackware 13.37, 14.0, or 14.1 distribution disks, in directory '''slackware64/d'''. Trying to compile dev86 [http://v3.sk/~lkundrak/dev86/ from source] is not an alternative : dev86 source versions 0.16.18 to 0.16.21 have the same issue compiling xen-4.9.0, and older 0.16.17 does not compile on Slackware 14.2.&lt;br /&gt;
&lt;br /&gt;
 # removepkg /var/log/packages/dev86-0.16.21-x86_64-1.txz&lt;br /&gt;
 # installpkg dev86-0.16.17-x86_64-2.txz&lt;br /&gt;
&lt;br /&gt;
Also, the '''grub-2.00''' included with Slackware 14.2 does not afford booting xen. However, getting the latest version '''grub-2.02''' from source does work.&lt;br /&gt;
&lt;br /&gt;
== Hardware requirements ==&lt;br /&gt;
&lt;br /&gt;
Xen runs on Intel X86 hardware and requires a processor and motherboard supporting VT-x and optionally VT-d for hardware virtualization. See this [http://www.intel.com/support/motherboards/desktop/sb/cs-030922.htm page] for a list of Intel compatible motherboards and chipsets and this [http://ark.intel.com/ page] for a list of compatible processors. Our system running Xen successfully at the time of this writing (and since June 2012) is based on a DZ77GA70K Intel motherboard, an Intel® Core™ i7-3770 Processor (the overclockable i7-3770 &amp;quot;K&amp;quot; model does not afford virtualization), 32 Gb of PC12800 memory and an MSI GeForce G210 graphics board.&lt;br /&gt;
&lt;br /&gt;
== Documentation difficulties ==&lt;br /&gt;
&lt;br /&gt;
Although the software itself works well and is pretty straighforward, good quality Internet information is missing. The volume of information on the Xen wiki is plethoric, but mostly irrelevant as pertaining to old versions of everything. Building the big picture requires interpretation of tiny bits in forum messages, a pretty painful process, although I have to recognize that it worked for me in the end. An alternative is to use one of these old-style information repositories named &amp;quot;books&amp;quot;. Yes it is pretty old-fashionned ;) but actually there are good ones on the topic. Here is [http://www.amazon.co.uk/The-Book-Xen-Practical-Administrator/dp/1593271867/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1341037874&amp;amp;sr=1-1 the most recent I found], it is a good value but of course you can find more on [http://www.amazon.co.uk/s/ref=nb_sb_noss_2?url=search-alias%3Dstripbooks&amp;amp;field-keywords=xen&amp;amp;x=0&amp;amp;y=0 amazon(.co.uk)].&lt;br /&gt;
&lt;br /&gt;
== Software constraints ==&lt;br /&gt;
&lt;br /&gt;
To make a long story short, at the time of this writing (and since June 2012) working with nVidia graphic boards on Xen and X11 requires the &amp;quot;nouveau&amp;quot; driver. Other drivers like nv or the nVidia proprietary driver do not support Xen and switch off the screen when launched or do not display properly. &amp;quot;Nouveau&amp;quot; requires a fairly recent version of X11. Slackware 13.37 or newer is required. &amp;quot;Nouveau&amp;quot; is available in kernel 3.4.2 upstream and was previously included as a staging driver. Xen dom0 support was included in kernel 3.0. To benefit from both Xen and &amp;quot;Nouveau&amp;quot;, the best is to use kernel 3.4.2 upstream.&lt;br /&gt;
&lt;br /&gt;
== Compiling acpica ==&lt;br /&gt;
&lt;br /&gt;
Xen requires acpica. [https://www.acpica.org/downloads Download] then install as below :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf acpica-unix-yyyymmdd.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root acpica-unix-yyyymmdd&lt;br /&gt;
 # cd acpica-unix-yyyymmdd&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
 # cd ..&lt;br /&gt;
 # rm -r acpica-unix-yyyymmdd&lt;br /&gt;
&lt;br /&gt;
== Compiling yajl ==&lt;br /&gt;
&lt;br /&gt;
Xen requires yajl. [http://lloyd.github.io/yajl/ Download] then install as below. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : there is no option to specify the target library directory so the files need to be moved manually.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf lloyd-yajl-x.y.z.66cb08c.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root lloyd-yajl-66cb08c&lt;br /&gt;
 # cd lloyd-yajl-66cb08c&lt;br /&gt;
 # ./configure&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
 # cd ../lib&lt;br /&gt;
 # mv libyajl* ../lib64&lt;br /&gt;
 # ldconfig&lt;br /&gt;
 # cd ..&lt;br /&gt;
 # rm -r lloyd-yajl-66cb08c&lt;br /&gt;
&lt;br /&gt;
== Updating go ==&lt;br /&gt;
&lt;br /&gt;
Xen requires the go language. Go is included as part of gcc but does not work &amp;quot;as is&amp;quot; and must be replaced by the version from the go web site.&lt;br /&gt;
&lt;br /&gt;
 # ls /var/log/packages | grep gcc-go&lt;br /&gt;
 gcc-go-11.2.0-x86_64-2&lt;br /&gt;
 # removepkg gcc-go-11.2.0-x86_64-2&lt;br /&gt;
 . . .&lt;br /&gt;
 # wget https://go.dev/dl/go1.23.5.linux-amd64.tar.gz&lt;br /&gt;
 # tar -C /usr/local -xvf go1.23.5.linux-amd64.tar.gz&lt;br /&gt;
&lt;br /&gt;
== Compiling Xen ==&lt;br /&gt;
&lt;br /&gt;
[http://xen.org/products/xen_source.html Download Xen] from the official [http://www.xen.org xen.org] site. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : File stubs-32.h is missing in the compiler includes so we add a link to the existing stubs-64.h. Also, some Xen Python scripts are installed in /usr/local/lib64/python-2.7/site-packages which python cannot find so we add links from the standard library as well.&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/include/gnu&lt;br /&gt;
 # ln -s stubs-64.h stubs-32.h&lt;br /&gt;
 # cd&lt;br /&gt;
 # tar -C /usr/local -xvf xen-x.y.z.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root xen-x.y.z&lt;br /&gt;
 # cd xen-x.y.z&lt;br /&gt;
 # ./configure --libdir=/usr/local/lib64 --with-initddir=/etc/rc.d&lt;br /&gt;
 # make world&lt;br /&gt;
 # make install&lt;br /&gt;
 # make clean&lt;br /&gt;
 # cd ../lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen /usr/lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen-3.0-py2.7.egg-info /usr/lib64/python2.7/site-packages&lt;br /&gt;
&lt;br /&gt;
== Adjusting rc.local* ==&lt;br /&gt;
&lt;br /&gt;
Xen needs a couple of daemons to run to ensure VM management. Add these lines to rc.local and rc.local_shutdown :&lt;br /&gt;
&lt;br /&gt;
 PATH=/usr/local/sbin:/usr/local/bin:$PATH&lt;br /&gt;
 export PATH&lt;br /&gt;
 &lt;br /&gt;
 # start xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons start&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # stop xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons stop&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
== Compiling a dom0 Kernel ==&lt;br /&gt;
&lt;br /&gt;
Domain-0 (dom0 for short) is a special guest (virtual machine) that the Xen hypervisor always loads on host startup. Dom0 is used to control and manage the Xen hypervisor, and provides virtual disks and networks for other unprivileged guests (=domUs). Dom0 support was introduced in Linux kernel 3.0. The kernel generated must include the .config file domU and [http://wiki.xen.org/wiki/Mainline_Linux_Kernel_Configs#Configuring_the_kernel dom0 options]. Here is a minimal example of such a [{{SERVER}}/wikislax/download/config-dom0 .config dom0] file. Feel free to use it as a base, replacing device drivers as required. The rest of the kernel compilation is nominal :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/src -xvf linux-4.4.88.tar.bz2&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # rm linux&lt;br /&gt;
 # ln -s linux-4.4.88 linux&lt;br /&gt;
 # cd linux&lt;br /&gt;
 # make menuconfig&lt;br /&gt;
 # make&lt;br /&gt;
 # make modules_install&lt;br /&gt;
 # cp arch/x86_64/boot/bzImage /boot/vmlinuz-4.4.88-dom0&lt;br /&gt;
 # cp System.map /boot/System.map-4.4.88-dom0&lt;br /&gt;
 # cp .config /boot/config-4.4.88-dom0&lt;br /&gt;
&lt;br /&gt;
We're now all set up, Xen is ready to be booted by grub2 !&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ pFoot |[[Compiling from Source]]|[[Main Page]]|[[Using Grub2]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=137</id>
		<title>Compiling Xen</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Compiling_Xen&amp;diff=137"/>
				<updated>2025-02-04T08:25:27Z</updated>
		
		<summary type="html">&lt;p&gt;Wikislax: /* Compiling yajl */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== What is Xen ? ==&lt;br /&gt;
&lt;br /&gt;
[http://wiki.xen.org/wiki/Xen_Overview Xen] is an hypervisor, a thin software layer executing multiple virtual machines, each running its own operating system. Xen is normally used as a server virtualization platform, running on headless servers without graphical console and controlled through the network. However it is also possible to run Xen on graphical desktops, and with proper hardware virtualization, to dedicate the primary graphics card (and keyboard / mouse) to a virtual machine, making it possible to have high performance full 3D and video acceleration in a virtual machine (see [http://wiki.xen.org/wiki/Xen_VGA_Passthrough Xen VGA Passthru]). Xen is otherwise free and open source.&lt;br /&gt;
&lt;br /&gt;
== A few quirks ==&lt;br /&gt;
&lt;br /&gt;
The '''dev86-0.16.21-x86_64-1.txz''' package included with Slackware 14.2 does not afford compiling '''xen-4.9.0''' properly, and must be replaced by '''[{{SERVER}}/wikislax/download/dev86-0.16.17-x86_64-2.txz dev86-0.16.17-x86_64-2.txz]''', that can be found on the Slackware 13.37, 14.0, or 14.1 distribution disks, in directory '''slackware64/d'''. Trying to compile dev86 [http://v3.sk/~lkundrak/dev86/ from source] is not an alternative : dev86 source versions 0.16.18 to 0.16.21 have the same issue compiling xen-4.9.0, and older 0.16.17 does not compile on Slackware 14.2.&lt;br /&gt;
&lt;br /&gt;
 # removepkg /var/log/packages/dev86-0.16.21-x86_64-1.txz&lt;br /&gt;
 # installpkg dev86-0.16.17-x86_64-2.txz&lt;br /&gt;
&lt;br /&gt;
Also, the '''grub-2.00''' included with Slackware 14.2 does not afford booting xen. However, getting the latest version '''grub-2.02''' from source does work.&lt;br /&gt;
&lt;br /&gt;
== Hardware requirements ==&lt;br /&gt;
&lt;br /&gt;
Xen runs on Intel X86 hardware and requires a processor and motherboard supporting VT-x and optionally VT-d for hardware virtualization. See this [http://www.intel.com/support/motherboards/desktop/sb/cs-030922.htm page] for a list of Intel compatible motherboards and chipsets and this [http://ark.intel.com/ page] for a list of compatible processors. Our system running Xen successfully at the time of this writing (and since June 2012) is based on a DZ77GA70K Intel motherboard, an Intel® Core™ i7-3770 Processor (the overclockable i7-3770 &amp;quot;K&amp;quot; model does not afford virtualization), 32 Gb of PC12800 memory and an MSI GeForce G210 graphics board.&lt;br /&gt;
&lt;br /&gt;
== Documentation difficulties ==&lt;br /&gt;
&lt;br /&gt;
Although the software itself works well and is pretty straighforward, good quality Internet information is missing. The volume of information on the Xen wiki is plethoric, but mostly irrelevant as pertaining to old versions of everything. Building the big picture requires interpretation of tiny bits in forum messages, a pretty painful process, although I have to recognize that it worked for me in the end. An alternative is to use one of these old-style information repositories named &amp;quot;books&amp;quot;. Yes it is pretty old-fashionned ;) but actually there are good ones on the topic. Here is [http://www.amazon.co.uk/The-Book-Xen-Practical-Administrator/dp/1593271867/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1341037874&amp;amp;sr=1-1 the most recent I found], it is a good value but of course you can find more on [http://www.amazon.co.uk/s/ref=nb_sb_noss_2?url=search-alias%3Dstripbooks&amp;amp;field-keywords=xen&amp;amp;x=0&amp;amp;y=0 amazon(.co.uk)].&lt;br /&gt;
&lt;br /&gt;
== Software constraints ==&lt;br /&gt;
&lt;br /&gt;
To make a long story short, at the time of this writing (and since June 2012) working with nVidia graphic boards on Xen and X11 requires the &amp;quot;nouveau&amp;quot; driver. Other drivers like nv or the nVidia proprietary driver do not support Xen and switch off the screen when launched or do not display properly. &amp;quot;Nouveau&amp;quot; requires a fairly recent version of X11. Slackware 13.37 or newer is required. &amp;quot;Nouveau&amp;quot; is available in kernel 3.4.2 upstream and was previously included as a staging driver. Xen dom0 support was included in kernel 3.0. To benefit from both Xen and &amp;quot;Nouveau&amp;quot;, the best is to use kernel 3.4.2 upstream.&lt;br /&gt;
&lt;br /&gt;
== Compiling acpica ==&lt;br /&gt;
&lt;br /&gt;
Xen requires acpica. [https://www.acpica.org/downloads Download] then install as below :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf acpica-unix-yyyymmdd.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root acpica-unix-yyyymmdd&lt;br /&gt;
 # cd acpica-unix-yyyymmdd&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
 # cd ..&lt;br /&gt;
 # rm -r acpica-unix-yyyymmdd&lt;br /&gt;
&lt;br /&gt;
== Compiling yajl ==&lt;br /&gt;
&lt;br /&gt;
Xen requires yajl. [http://lloyd.github.io/yajl/ Download] then install as below. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : there is no option to specify the target library directory so the files need to be moved manually.&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/local -xvf lloyd-yajl-x.y.z.66cb08c.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root lloyd-yajl-66cb08c&lt;br /&gt;
 # cd lloyd-yajl-66cb08c&lt;br /&gt;
 # ./configure&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
 # cd ../lib&lt;br /&gt;
 # mv libyajl* ../lib64&lt;br /&gt;
 # ldconfig&lt;br /&gt;
 # cd ..&lt;br /&gt;
 # rm -r lloyd-yajl-66cb08c&lt;br /&gt;
&lt;br /&gt;
== Updating go ==&lt;br /&gt;
&lt;br /&gt;
Xen requires the go language. Go is included as part of gcc but must be replace by the version from the go web site.&lt;br /&gt;
&lt;br /&gt;
 # ls /var/log/packages | grep gcc-go&lt;br /&gt;
 gcc-go-11.2.0-x86_64-2&lt;br /&gt;
 # removepkg gcc-go-11.2.0-x86_64-2&lt;br /&gt;
 . . .&lt;br /&gt;
 # wget https://go.dev/dl/go1.23.5.linux-amd64.tar.gz&lt;br /&gt;
 # tar -C /usr/local -xvf go1.23.5.linux-amd64.tar.gz&lt;br /&gt;
&lt;br /&gt;
== Compiling Xen ==&lt;br /&gt;
&lt;br /&gt;
[http://xen.org/products/xen_source.html Download Xen] from the official [http://www.xen.org xen.org] site. &amp;lt;u&amp;gt;Note&amp;lt;/u&amp;gt; : File stubs-32.h is missing in the compiler includes so we add a link to the existing stubs-64.h. Also, some Xen Python scripts are installed in /usr/local/lib64/python-2.7/site-packages which python cannot find so we add links from the standard library as well.&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/include/gnu&lt;br /&gt;
 # ln -s stubs-64.h stubs-32.h&lt;br /&gt;
 # cd&lt;br /&gt;
 # tar -C /usr/local -xvf xen-x.y.z.tar.gz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root xen-x.y.z&lt;br /&gt;
 # cd xen-x.y.z&lt;br /&gt;
 # ./configure --libdir=/usr/local/lib64 --with-initddir=/etc/rc.d&lt;br /&gt;
 # make world&lt;br /&gt;
 # make install&lt;br /&gt;
 # make clean&lt;br /&gt;
 # cd ../lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen /usr/lib64/python2.7/site-packages&lt;br /&gt;
 # ln -s xen-3.0-py2.7.egg-info /usr/lib64/python2.7/site-packages&lt;br /&gt;
&lt;br /&gt;
== Adjusting rc.local* ==&lt;br /&gt;
&lt;br /&gt;
Xen needs a couple of daemons to run to ensure VM management. Add these lines to rc.local and rc.local_shutdown :&lt;br /&gt;
&lt;br /&gt;
 PATH=/usr/local/sbin:/usr/local/bin:$PATH&lt;br /&gt;
 export PATH&lt;br /&gt;
 &lt;br /&gt;
 # start xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons start&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # stop xencommons&lt;br /&gt;
 if [ -x /etc/rc.d/xencommons ]; then&lt;br /&gt;
     /etc/rc.d/xencommons stop&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
== Compiling a dom0 Kernel ==&lt;br /&gt;
&lt;br /&gt;
Domain-0 (dom0 for short) is a special guest (virtual machine) that the Xen hypervisor always loads on host startup. Dom0 is used to control and manage the Xen hypervisor, and provides virtual disks and networks for other unprivileged guests (=domUs). Dom0 support was introduced in Linux kernel 3.0. The kernel generated must include the .config file domU and [http://wiki.xen.org/wiki/Mainline_Linux_Kernel_Configs#Configuring_the_kernel dom0 options]. Here is a minimal example of such a [{{SERVER}}/wikislax/download/config-dom0 .config dom0] file. Feel free to use it as a base, replacing device drivers as required. The rest of the kernel compilation is nominal :&lt;br /&gt;
&lt;br /&gt;
 # tar -C /usr/src -xvf linux-4.4.88.tar.bz2&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # rm linux&lt;br /&gt;
 # ln -s linux-4.4.88 linux&lt;br /&gt;
 # cd linux&lt;br /&gt;
 # make menuconfig&lt;br /&gt;
 # make&lt;br /&gt;
 # make modules_install&lt;br /&gt;
 # cp arch/x86_64/boot/bzImage /boot/vmlinuz-4.4.88-dom0&lt;br /&gt;
 # cp System.map /boot/System.map-4.4.88-dom0&lt;br /&gt;
 # cp .config /boot/config-4.4.88-dom0&lt;br /&gt;
&lt;br /&gt;
We're now all set up, Xen is ready to be booted by grub2 !&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ pFoot |[[Compiling from Source]]|[[Main Page]]|[[Using Grub2]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	</feed>