Quoting Thomas Pircher‘s website (cc-by-sa):
ifconfig vs ip
The command /bin/ip
has been around for some time now. But people continue using the older command /sbin/ifconfig
. Let’s be clear: ifconfig
will not quickly go away, but its newer version, ip
, is more powerful and will eventually replace it.
The man page of ip
may look intimidating at first, but once you get familiar with the command syntax, it is an easy read. This page will not introduce the new features of ip. It rather features a side-by-side comparison if ifconfig
and ip
to get a quick overview of the command syntax.
Show network devices and configuration
ifconfig
ip addr show
ip link show
Enable a network interface
ifconfig eth0 up
ip link set eth0 up
A network interface is disabled in a similar way:
ifconfig eth0 down
ip link set eth0 down
Related Posts:
- How to get TX/RX bytes without ifconfig?
- ssh: Could not resolve hostname [hostname]: nodename nor servname provided, or not known
- Setting the hostname: FQDN or short name?
- How to forcibly close a socket in TIME_WAIT?
- What is this IP address: 169.254.169.254?
- How to determine the hostname from an IP address in a Windows network?
- SSHFS mount that survives disconnect
- How to check the physical status of an ethernet port in Linux?
- Testing UDP port connectivity
- What’s a .sh file?
- How do I grep recursively?
- Why do you need to put #!/bin/bash at the beginning of a script file?
- error: ‘Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)’ — Missing /var/run/mysqld/mysqld.sock
- No space left on device
- “E: Unable to locate package python-pip” on Ubuntu 18.04 [duplicate]
- -bash: syntax error near unexpected token `newline’ for display command
- How do I use grep to search the current directory for all files having the a string “hello” yet display only .h and .cc files?
- SSH using python script
- Changing the resolution of a VNC session in linux
- Building HelloWorld C++ Program in Linux with ncurses
- How does “cat << EOF" work in bash?
- tar removing leading ‘/’ from member names
- X11 forwarding request failed on channel 0
- What is difference between arm64 and armhf?
- Opening a .tar.gz file with a single command
- How to make and apply SVN patch?
- Diff command along with Grep gives “Binary file (standard input) matches”
- How to download a file from server using SSH?
- connect to host localhost port 22: Connection refused
- Implementing shell in C and need help handling input/output redirection
- How to count lines in a document?
- What does `set -x` do?
- Can you Run Xcode in Linux?
- Post request with Wget?
- How to get the process ID to kill a nohup process?
- Writing a simple shell in C using fork/execvp
- Implementation of multiple pipes in C
- chmod: changing permissions of ‘my_script.sh’: Operation not permitted
- Using ls to list directories and their total sizes
- tar: add all files and directories in current directory INCLUDING .svn and so on
- What does set -e mean in a bash script?
- Is there an alternative sleep function in C to milliseconds?
- Gedit command not working in kali linux terminal
- Syntax error near unexpected token ‘then’
- Curl : connection refused
- make -j 8 g++: internal compiler error: Killed (program cc1plus)
- Bash export command
- How to edit gitignore file
- Pipe to/from the clipboard in a Bash script
- what does -zxvf mean in tar -zxvf filename?
- Retrieve last 100 lines logs
- Linux Bash: Move multiple different files into same directory
- Configuring Apache for localhost
- how to search for a directory from the terminal in ubuntu
- Android – Command not found
- How to use dos2unix?
- EC2 ssh Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
- How to add a default include path for GCC in Linux?
- What does ‘bash -c’ do?
- How do I know the script file name in a Bash script?
- WordPress can’t find temporary folder, but folder it’s looking at has correct permissions
- How to configure both webserver and appserver for WordPress CMS?
- How to remove all plugins, posts, pages, and inactive themes in one line with wp-cli? WordPress bloatware removal
- Communcation with wordrpess and linux server [closed]
- Anyone else experiencing high rates of Linux server crashes during a leap second day?
- Can I nohup/screen an already-started process?
- df in linux not showing correct free space after file removal
- In my /etc/hosts/ file on Linux/OSX, how do I do a wildcard subdomain?
- Shell command to monitor changes in a file
- When does /tmp get cleared?
- Difference in sites-available vs sites-enabled vs conf.d directories (Nginx)?
- Is it possible to detach a process from its terminal? (Or, “I should have used screen!”) [duplicate]
- Disk full, du tells different. How to further investigate?
- Filename length limits on linux?
- best way to clear all iptables rules
- How can I port forward with iptables?
- Why do we use a OS Base Image with Docker if containers have no Guest OS?
- How can I rename a Unix user?
- How to re-order windows, change the scroll shortcut, and modify the status bar contents in GNU Screen?
- How to make Windows 7 USB flash install media from Linux?
- How to install/change locale on Debian?
- What limits the maximum number of connections on a Linux server?
- How to prevent a user from login in, but allow “su – user” in Linux?
- I have a keypair. How do I determine the key length?
- How to do the port forwarding from one ip to another ip in same network?
- How to disable everything in crontab -l?
- df says disk is full, but it is not
- Why drop caches in Linux?
- What is the maximum port number?
- Linux – Is there a way to prevent/protect a file from being deleted even by root?
- swap partition vs file for performance?
- How to sort ps output by process start time?
- Is there a proper way to clear logs?
- Best way to disable swap in Linux
- protocol version mismatch — is your shell clean?
- How to remove invalid characters from filenames?
- How do I join two named pipes into single input stream in linux
- How can I zip/compress a symlink?
- How should an IT department choose a standard Linux distribution?
- How to find the physical volume(s) that hold a logical volume in LVM