Mengubah enp0s17 menjadi eth0 pada ubuntu 16.04

Pada ubuntu versi ini ketika kita ketik ifconfig maka yang keluar selain localhost atau lo juga enp0s17 dan bukan eth0, di artikel ini kita akan coba mengubah kembali ke yang lama dari enp0s17 ke eth0 supaya kita mudah seting karena sudah terbiasa.
[code]
root@localhost:~# ifconfig
enp0s17 Link encap:Ethernet HWaddr 08:00:27:f7:44:f1
inet addr:192.168.2.3 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3085 errors:0 dropped:0 overruns:0 frame:0
TX packets:2838 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3831133 (3.8 MB) TX bytes:226243 (226.2 KB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:160 errors:0 dropped:0 overruns:0 frame:0
TX packets:160 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:11840 (11.8 KB) TX bytes:11840 (11.8 KB)

root@localhost:~#

root@localhost:~# dmesg | grep -i eth
[ 3.874367] e1000 0000:00:11.0 eth0: (PCI:33MHz:32-bit) 08:00:27:f7:44:f1
[ 3.875394] e1000 0000:00:11.0 eth0: Intel(R) PRO/1000 Network Connection
[ 3.883459] e1000 0000:00:11.0 enp0s17: renamed from eth0
root@localhost:~#
[/code]
kita bisa lihat bahwa eth0 diubah menjadi enp0s17 melalui perintah dmesg, selanjutnya kita akan mengubah menjadi ethX kembali dengan cara edit grub
[code]
root@localhost:~# nano /etc/default/grub
GNU nano 2.5.3 File: /etc/default/grub

# If you change this file, run ‘update-grub’ afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n ‘Simple configuration’

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=2
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=””
GRUB_CMDLINE_LINUX=””
[/code]

cari pada baris GRUB_CMDLINE_LINUX=”” yang kosong menjadi GRUB_CMDLINE_LINUX=”net.ifnames=0 biosdevname=0″
Selanjutnya kita simpan dan kita generate grub yang baru dari perubahan yang sudah kita lakukan.
[code]
root@localhost:~# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file …
Found linux image: /boot/vmlinuz-4.4.0-57-generic
Found initrd image: /boot/initrd.img-4.4.0-57-generic
Found linux image: /boot/vmlinuz-4.4.0-21-generic
Found initrd image: /boot/initrd.img-4.4.0-21-generic
done
root@localhost:~#
[/code]
Jika setingan jaringannya dhcp maka ubah seperti contoh berikut:
root@localhost:~# nano /etc/network/interfaces

Dari
[code]
auto enp0s17
iface enp0s17 inet dhcp
iface enp0s17 inet6 auto
[/code]
Menjadi
[code]
auto eth0
iface eth0 inet dhcp
iface eth0 inet6 auto
[/code]

apabila static diubah seperti cotoh berikut:
root@localhost:~# nano /etc/network/interfaces

kita ubah dari :
[code]
auto enp0s17
iface enp0s17 inet static
address 192.168.2.3
netmask 255.255.255.0
dns-nameservers 192.168.2.1
gateway 192.168.2.1
[/code]
Menjadi
[code]
auto eth0
iface eth0 inet static
address 192.168.2.3
netmask 255.255.255.0
dns-nameservers 192.168.2.1
gateway 192.168.2.1
[/code]
Selanjutnya kita restart dengan cara ketik

root@localhost:~# reboot
setelah selesai kita login kembali dan ketik ifconfig dan hasilnya adalah:

[code]
root@localhost:~# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:f7:44:f1
inet addr:192.168.2.3 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:143 errors:0 dropped:27 overruns:0 frame:0
TX packets:85 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:16337 (16.3 KB) TX bytes:14380 (14.3 KB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:160 errors:0 dropped:0 overruns:0 frame:0
TX packets:160 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:11840 (11.8 KB) TX bytes:11840 (11.8 KB)

root@localhost:~#
[/code]

Sekian Semoga bermanfaat

Menambah Author Box didalam setiap Post

Ada kalanya theme yang kita gunakan belum support kotak authornya yang bisanya berada di bawah setiap postingan kita, jika theme yang kita gunakan tidak ada author box nya kita bisa menambahkannya bisa dengan plugin atau bisa kita tambah sendiri dengan menambahkan pada functions.php didalam folder theme kita;
[code]function wpb_author_info_box( $content ) {

global $post;

// Mendeteksi jika ini single post maka tampilkan author
if ( is_single() && isset( $post->post_author ) ) {

// Tampilkan Author
$display_name = get_the_author_meta( ‘display_name’, $post->post_author );

// Jika display name tidak ada maka pakai username sebagai display name
if ( empty( $display_name ) )
$display_name = get_the_author_meta( ‘nickname’, $post->post_author );

// Tampilkan biografi author dari informasi profile dihalaman username
$user_description = get_the_author_meta( ‘user_description’, $post->post_author );

// Tampilkan url website author
$user_website = get_the_author_meta(‘url’, $post->post_author);

// Tampilkan link ke author
$user_posts = get_author_posts_url( get_the_author_meta( ‘ID’ , $post->post_author));

if ( ! empty( $display_name ) )

$author_details = ‘

About ‘ . $display_name . ‘

‘;

if ( ! empty( $user_description ) )
// Author avatar and bio

$author_details .= ‘

‘ . get_avatar( get_the_author_meta(‘user_email’) , 90 ) . nl2br( $user_description ). ‘

‘;

$author_details .= ‘

// Cek jika author mempunyai url website di profilnya
if ( ! empty( $user_website ) ) {

// Tampilkan link website author
$author_details .= ‘ | Website

‘;

} else {
// if there is no author website then just close the paragraph
$author_details .= ‘

‘;
}

// Tampilkan biografi info kedalam postingan
$content = $content . ‘

‘ . $author_details . ‘

‘;
}
return $content;
}

// Tambahkan fungsi ini kedalam konten post filter
add_action( ‘the_content’, ‘wpb_author_info_box’ );

// Allow HTML didalam kotak bio
remove_filter(‘pre_user_description’, ‘wp_filter_kses’);
[/code]

tambahkan css ini di style.css
[code].author_bio_section{
background: none repeat scroll 0 0 #F5F5F5;
padding: 15px;
border: 1px solid #ccc;
}
.author_name{
font-size:16px;
font-weight: bold;
}
.author_details img {
border: 1px solid #D8D8D8;
border-radius: 50%;
float: left;
margin: 0 10px 10px 0;
}[/code]