Top 10 UNIX Command Line Mistakes


As the saying goes – A man must be big enough to admit his mistakes, smart enough to profit from them, and strong enough to correct them. In IT world too mistakes are commonly done by new comers in the field due to inexperience. The Unix world is no different from the rest, and system admins unknowingly tend to commit some avoidable errors in their early days in the beginning of their career. Here are a few mistakes which are made by new system admins or users while working at UNIX prompt.

This article explains the 10 most common Linux mistakes.

userdel Command

It deletes a user account and related files. The command should be as shown below –

$ sudo userdel foo

The above command deletes “foo” named user and related information on Linux Machine. So make sure and think twice while deleting user information.

Rebooted Solaris Box

In Linux, killall command, kill the processes named killall httpd. On Solaris, it kills all active processes. The command should be like this –

$ killall process-name

Destroyed named.conf

To append a new zone to /var/named/chroot/etc/named.conf file., but end up running –

$cd /var/named/chroot/etc/named.conf

Deleted Apache Document Root

To gain system space, new system admins will delete sym links form web server doc-root with rm -rf command on http directory. But when you delete symlinks, it will give symlinks error.

Accidentally Changed Host name and Triggered False Alarm

When system admins accidentally changes the current host name for one of their cluster node. Within minutes, you can get an alert message on both mobile and email.

Public Network Interface Shutdown

To shut down the VPN interface eth0, but ended up shutting down eth1 while it was logged in via SSH as shown below –

$ ifconfig eth1 down

Typo Mistakes

Most of the typo mistakes are corrected by vim text editor automatically. So, we strongly recommend the use of Vim text editor.

Fish Command Line

As we know Linux terminal is very lazy. It does not give auto suggestions and Glorious VGA Color for scripting, so there are so many possibilities to work with wrong commands. Fish is a smart and user-friendly command line shell for Linux operating system and distribution for personal computers and network servers. Some of most useful fish shell features are shown below –

  • Syntax Highlighting
  • Autosuggestion
  • Web Based configuration
  • Tab Completions
  • Auto loading Functions
  • Uses universal variables

Conclusion

Some of the tips, we are giving for new system admins and users as shown below –

  • Before doing server operation, user or system admin should take fully back of Linux.
  • Never use rsync with single backup directory. Create a snapshots using rsync or rsnapshots.
  • Use CVS to store configuration files.
  • Wait and read command line again before hitting the dam [Enter] key.
  • Use your well tested perl / shell scripts and open source configuration management software’s
  • Install Packages Quickly With GDebi.
  • Kill Processes Quickly With PKILL to reduce the load on system.

Congratulations! Now, you know “Top 10 UNIX Command Line Mistakes ”. We’ll learn more about these types of commands in our next Linux post. Keep reading!

karthikeya Boyini
karthikeya Boyini

I love programming (: That's all I know

Updated on: 17-Jan-2020

217 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements