If you are familiar with Linux based system and you have multiple partitions or Hard drives then you know that the Linux OS will only mount the root partition where the File System has been installed. And in order to mount the other partition or hard drives you need to click on their Tabs on File manager or just mount with mount utility in command line. But we can automatically mount these partitions and Drives at startup, just by editing the fstab file on the file system.
Showing posts with label Operating-System. Show all posts
Showing posts with label Operating-System. Show all posts
How to setup Static IP Address on Ubuntu Server 16.04 over LAN (Also works on other Linux Dist.)
Open up /etc/network/interfaces file
sudo nano /etc/network/interfaces
# The primary network interface
auto ens18
iface ens18 inet dhcp
now change your primary interface 'ens18' from dhcp to static # The primary network interface
auto ens18
iface ens18 inet static
Note: the primary interface ens18 will be different in your system(for example 'eth0'). Now add the following options just below the above lines address 192.168.0.151
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
dns-nameservers 192.168.0.1
now the configuration is look like this # The primary network interface
auto ens18
iface ens18 inet static
address 192.168.0.151
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
dns-nameservers 192.168.0.1
where the address is static ip, and at network put your router's ip address and replace '1' with '0' in in right-most place of IP address. For example 192.168.0.1 => 192.168.0.0In broadcast put 255 at first place of your router's IP, and in gateway and dns-nameservers put your gateway (router) IP address. Now press Ctrl + O to save the file and Ctrl + X to exit. Now we need to edit the /etc/resolv.conf file.
sudo nano /etc/resolv.conf
at this file put your gateway address in the 'nameserver' option.
nameserver 192.168.0.1
now save the file and restart the networking componentssudo /etc/init.d/networking restart
Note: if by running above command the changes does not take place then just reboot the machine.
and thats it.
Enable Core Dump in current working directory for C/C++ programs on Ubuntu 16.x
Check the '/proc/sys/kernel/core_pattern' file
cat /proc/sys/kernel/core_pattern
if the output of above command is
|/usr/share/apport/apport %p %s %c %P
then you need to edit the 'core_pattern' file and replace
|/usr/share/apport/apport %p %s %c %P
with
core.%e.%p
to do this by below command
sudo su -c 'echo "core.%e.%p" > /proc/sys/kernel/core_pattern'
it will ask you for root password, and its done. At the string 'core.%e.%p' %e means the executable file name and %p denotes the processID. Now to test the core dumping first run below command
ulimit -c unlimited
then compile below code and run it.
test.c
cat /proc/sys/kernel/core_pattern
if the output of above command is
|/usr/share/apport/apport %p %s %c %P
then you need to edit the 'core_pattern' file and replace
|/usr/share/apport/apport %p %s %c %P
with
core.%e.%p
to do this by below command
sudo su -c 'echo "core.%e.%p" > /proc/sys/kernel/core_pattern'
it will ask you for root password, and its done. At the string 'core.%e.%p' %e means the executable file name and %p denotes the processID. Now to test the core dumping first run below command
ulimit -c unlimited
then compile below code and run it.
test.c
#include<stdio.h>
int main()
{
char buff[20];
int i;
for(i=0;i<40;i++) {
buff[i] ='\x41';
}
}
Installation and Configuration of Ubuntu 16.04 LTS
First install a fresh copy of ubuntu 16.04 LTS (Note : It also works on other version of ubuntu 16.x) on your system then run the following commands on terminal.
- Update the repository
- Install the new packages
- Install the Development tools with build-essentials packages
- Install Restricted-Extras packages(audio-video codecs, flash players etc.)
- Install vim editor
- Install gparted
- Install clementine music player (my favorite one)
- Also install vlc player
- Install Zim Desktop Wiki
- Installing Wine
sudo dpkg --add-architecture i386
after that type following command
sudo add-apt-repository ppa:wine/wine-builds
sudo apt-get update
sudo apt-get install --install-recommends winehq-devel
when the installation process is done, then type 'winecfg' command in terminal and hit enter, it will automatically configure wine. During configuration process it will ask you to install 'MONO package', then click on install button.
- Installing VirtualBox
sudo apt-get install virtualbox-ext-pack
Thats it.
Thanks...
Subscribe to:
Posts (Atom)




