Hi, this post is about Linux/UNIX Command Line Mistakes. Welcome.
userdel Command
This command will deletes a user account and related files.
$ sudo userdel sajid
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 <process id>. In 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
Sometime user forgot about symlink issue. To save disk space, they execute rm -rf on http directory to gain system space. 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.
hostname world.example.com
Public Network Interface Shutdown
I wanted to shutdown VPN interface eth0, but ended up shutting down eth1 while I was logged in via SSH:
$ 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.
Firewall Lockdown
I made changes to sshd_config and changed the ssh port number from 22
to 1022
, but failed to update firewall rules. After a quick kernel upgrade, I had rebooted the box. I had to call remote data center tech to reset firewall settings.
So enjoy this command line post.