Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-17-2012, 09:54 PM   #1
LQ Newbie
Registered: Oct 2012
Posts: 1

Rep: Reputation: Disabled
Need to write a basic script that will change my ip address and subnet

I need help creating a script in fedora to change the ip address and subnet to whatever the user specifies.

I also need to know how to create an alias for the history command.
Old 10-17-2012, 11:27 PM   #2
Senior Member
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
I am not much familier with Fedora, but I guess basic commands will work there..
1# For script, could you explain it little more? Why a user will need to change IP or subnet?

2# For alias, you can create it using alias command as follow:
# alias <command>=<alias-command>
# alias history='h'
To verify it, use alias cmd to check all alias:
# alias
Or you can apend this command in your profile file (i.e. .login or .bashrc etc) to make it permanant. i.e.
# echo "alias history='h'" >> $HOME/.bashrc

Last edited by shivaa; 10-19-2012 at 01:02 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Write shell script to change PATH pppaaarrrkkk Linux - Newbie 3 07-17-2012 12:06 PM
Change IP address of servers from a script Winanjaya Linux - Networking 8 06-09-2012 01:57 PM
How to write a script to change web log files? tomwgf Linux - Desktop 6 02-07-2007 10:38 AM
Help - Tring to write basic currency Converter as a bash script Simon_Penney_2003 Linux - Newbie 29 01-26-2007 10:45 AM
Change IP address via script ricky_ds Red Hat 2 01-04-2005 11:34 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:27 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration