background preloader

Linux Networking

Facebook Twitter

Connect to a wireless network via command line. I know, the first thing you are asking is "Why would I want to have to connect to a wireless network from the command line?

Connect to a wireless network via command line

" To that question I can give you a simple answer...What if you want to create a script to run that will bring up your wireless network as soon as your desktop is loaded? You could get really complex and create a start up script to load a desktop based on what wireless access point you needed to join. That's one of the beauties of Linux, if you can dream it, you can do it. But I am getting too far ahead of myself. Let's get back to the basics shall we? Ifconfig: Enable your wireless device.iwlist: List the available wireless access points.iwconfig: Configure your wireless connection.dhclient: Get your IP address via dhcp. The first command you need to use is ifconfig. Ifconfig wlan0 up You won't see any feedback unless there is a problem. The next step is to scan for your wireless network to make sure it is available. Iwlist wlan0 scan dhclient wlan0 Make it a script #!

Linux Network Configuration. File: /etc/resolv.conf - host name resolver configuration file This configures Linux so that it knows which DNS server will be resolving domain names into IP addresses.

Linux Network Configuration

If using DHCP client, this will automatically be sent to you by the ISP and loaded into this file as part of the DHCP protocol. If using a static IP address, ask the ISP or check another machine on your network. Red Hat/Fedora GUI: /usr/sbin/system-config-network (select tab "DNS"). File: /etc/hosts - locally resolve node names to IP addresses Note when adding hosts to this file, place the fully qualified name first. (It helps sendmail identify your server correctly) i.e.: XXX.XXX.XXX.XXX superserver.yolinux.com superserver This informs Linux of local systems on the network which are not handled by the DNS server.

/etc/sysconfig/network Red Hat network configuration file used by the system during the boot process. The following GUI tools edit the system configuration files. Static IP address assignment: Links: Ch09 : Linux Users and Sudo. Before we proceed, it would be best to cover some basic user administration topics that will be very useful in later chapters.

Ch09 : Linux Users and Sudo

Adding Users One of the most important activities in administering a Linux box is the addition of users. Here you'll find some simple examples to provide a foundation for future chapters. Linux Home Networking - Tutorials and Forums.