The Console Commands
Have you ever wondered what is the equivalent to ipconfig /renew /release in Ubuntu Linux? I collected all the information I thought about related to Ubuntu Network in this Knol. If you have any other questions or suggestions, please, let me know.
So, to start, here is the common question.
1) How can I start restart my network?
Well, in Ubuntu you can bring the network down and up using these commands
ifup, ifdown you will need to supply the network interface you trying to restart so,
Restart Network Interface #0 | Restart Network Interface #1 |
ifdown eth0 ifup eth0 | ifdown eth1 ifup eth1 |
Also, you can use one of the following commands to start. stop, or restart the networksudo /etc/init.d/networking start
sudo /etc/init.d/networking stop
sudo /etc/init.d/networking restart
How would you know what is the ethx number for your Network Interface? you can type
sudo /etc/init.d/networking stop
sudo /etc/init.d/networking restart
How would you know what is the ethx number for your Network Interface? you can type
ip addr show OR
sudo ifconfig -a
sudo ifconfig -a
this command will display all your network interfaces with their information. Usually you will have lo and eth0 or eth1. The lo is your loopback interface and always has the IP Address 127.0.0.1 and a MAC address of 00:00:00:00:00:00
There is also ifconfig which will give you more information on your network and still will sort the information by Network interface lo and eth0. If you are not interrested in lo network interface as I do most of the time, you can type ifconfig eth0 so you do not have to see the other interfacce information.
2) The next question is, how can I configure my network to use a proxy?
Well, Ubuntu looks for a file in /etc/apt with the name apt.conf so you need to create this file if it does not exist. and if it does, you can edit it with root access using the program nano, which is a very nice simple editor.
you will need to enter the following line
Acquire::gttp::proxy "http://xyz.xyz.zyx:portnumber"; |
for example this is a link to proxy with URL, http://www.google.com and uses port number 3456.
Acquire::gttp::proxy "http://www.google.com:3456"; |
3) How to connect/map a network share on my Ubuntu session?
This done by using the command smbclient. Make sure smbclient is installed on your system first. All you need to do is type smbclient and if you get an error not found, then just install it.
sudo apt-get install smbclient
Then you can type smbclient //server/name/share -U username
You will be prompt for a your password on this server and a prompt like this
smb: \>
Now you can start typing your commands or Type ? for command list.
There is also, sudo mount -t cifs that will give you the option to map to a network share.
More to be added,
References:
No comments:
Post a Comment