Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Unix Change Static IP

Posted on November 5, 2015December 29, 2015 By David Kittell

It is best to do this on the machine itself and not remotely as you will lose connection.

sudo cp /etc/network/interfaces /etc/network/interfaces.`date +"%m-%d-%Y_%I-%M-%S"`
sudo sed -i 's|address 192.168.1.16|address 10.1.1.16|' /etc/network/interfaces
sudo sed -i 's|netmask 255.255.255.0|netmask 255.255.0.0|' /etc/network/interfaces
sudo sed -i 's|gateway 192.168.1.1|gateway 10.1.1.1|' /etc/network/interfaces
sudo service resolvconf restart
sudo /etc/init.d/networking restart
sudo reboot
Originally Posted on November 5, 2015
Last Updated on December 29, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code UNIX Shell Scripts

Post navigation

Previous post
Next post

Related Posts

RemoveSpecialCharacters

Posted on February 21, 2013October 26, 2015

public static string RemoveSpecialCharacters(string str) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < str.Length; i++) { if ((str[i] >= ‘0’ && str[i] <= ‘9’) || (str[i] >= ‘A’ && str[i] <= ‘z’ || (str[i] == ‘.’ || str[i] == ‘_’))) sb.Append(str[i]); } return sb.ToString(); }…

Read More

PowerShell – Install Ubuntu WSL (Linux On Windows)

Posted on August 25, 2020August 17, 2024

If you have issues like I have had with the Windows Store this will help you to get Ubuntu WSL on Windows. NOTE: You may need to reboot your computer after the first line. Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux #Install-WindowsFeature -Name Microsoft-Windows-Subsystem-Linux Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1604 -OutFile ~/Downloads/ubuntu-1604.zip New-Item -Path c:\ubuntu-1604 -ItemType…

Read More

Pageview – Quick Report

Posted on October 14, 2013October 26, 2015

SELECT ( SELECT [projectname] FROM [tblRIMicroSite_Forms] WHERE CHARINDEX([tblRIMicroSite_Forms].[url], pv.[url]) > 0 ) AS Project ,dbo.fnFormatDate([datetime], ‘MM-DD-YYYY HH:NN AMPM’, NULL) AS [DateTime] ,[ipaddress] AS ‘IP Address’ ,[ipint] AS ‘IP Int’ ,[IPLocation] AS ‘IP Location’ ,[mobile] AS ‘Mobile’ ,( CASE WHEN ( SELECT url FROM [tblRIMicroSite_Forms] WHERE CHARINDEX([tblRIMicroSite_Forms].[url], pv.[url]) > 0 )…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes