User Tools

Site Tools


products:ict:linux:changed_commands

As technology evolves, some older Linux commands have been deprecated or replaced by more modern and efficient alternatives. Here are a few examples:

1. Old Command: `ifconfig`

  1. Replacement: `ip`
  2. Reason: `ifconfig` has been deprecated in many Linux distributions in favor of the more versatile `ip` command.
 ```bash
 # Old command
 ifconfig
 # Replacement
 ip addr show
 ```

2. Old Command: `route`

  1. Replacement: `ip route`
  2. Reason: `ip route` is more feature-rich and is now the preferred command for displaying and modifying the kernel routing table.
 ```bash
 # Old command
 route -n
 # Replacement
 ip route show
 ```

3. Old Command: `service`

  1. Replacement: `systemctl`
  2. Reason: `service` is still available in many systems, but `systemctl` is more powerful and widely used for managing services.
 ```bash
 # Old command
 service serviceName start
 # Replacement
 systemctl start serviceName
 ```

4. Old Command: `chkconfig`

  1. Replacement: `systemctl` (for most distributions)
  2. Reason: `chkconfig` was used for system initialization, but `systemctl` provides a more unified interface for service management.
 ```bash
 # Old command
 chkconfig serviceName on
 # Replacement
 systemctl enable serviceName
 ```

5. Old Command: `fdisk`

  1. Replacement: `parted` or `gdisk` for GPT
  2. Reason: `fdisk` is still widely used, but `parted` and `gdisk` provide better support for modern disk partitioning schemes.
 ```bash
 # Old command
 fdisk /dev/sdX
 # Replacement with parted
 parted /dev/sdX
 # Replacement with gdisk
 gdisk /dev/sdX
 ```

6. Old Command: `ps` with `aux`

  1. Replacement: `ps` with `-ef`
  2. Reason: The `aux` option is BSD-style and is not supported on all systems. The `-ef` option is more portable.
 ```bash
 # Old command
 ps aux
 # Replacement
 ps -ef
 ```

7. Old Command: `lsmod`

  1. Replacement: `lsmod` is still widely used
  2. Reason: While `lsmod` is still commonly used, newer tools like `modprobe` and `journalctl` are often used in conjunction with it.
 ```bash
 # Old command
 lsmod
 # Replacement (for additional functionality)
 modprobe moduleName
 journalctl -k | grep moduleName
 ```

Always refer to the documentation for your specific Linux distribution, as there might be variations in command availability and behavior. Additionally, some commands may still be in use even if there are more modern alternatives, depending on the specific requirements and constraints of a system.

products/ict/linux/changed_commands.txt · Last modified: 2023/11/28 23:15 by wikiadmin