Linux Basic Networking Commands
Hi Friends Check Basic & Networking Linux Commands,
USFULL COMMANDS:
1. history|head -n 100 [ For no of showing commands]
2. history [ History commands ]
3. mail [ Check mails ]
4. hostname [ Check hostname ]
5. ifconfig [ Check network configuration ] {In Root Previlage}
6. setup [ Setting network (IP) ]
7. service start/stop/restart/status [Strat/stop/restart the services]
8. ping [ Check network connection between 2 computers ]
9. iptables[ Regarding firewall ]
10. init 0 [ Shutdown ]
11. init 6 [ Restart ]
12. useradd < name > [ Create user account ]
13. passwd < user name > [ Set password for user ]
14. chkconfig [ updates and queries runlevel information for system services ]
15. chkconfig service_name on [ keep service continuesly on ]
16. cd < directory name > [ Change directory ]
17. ls -l [ list directory contents ]
18. cat < File name > [ Show file contents ]
19. mkdir < directory name > [ Create directory ]
20. touch < file name > [ Create file ]
21. vi < file name > [ Edit the file ]
22. rm < file name > [ Remove the file ]
23. clear [ Clean/Clear the desktop/shell ]
24. more < about name > [ Viewing more thing about that ]
25. man [ Meaning of the Concept ]
26. logout [ Logout from user account ]
27. shutdown [ Shutdown system ]
28. login [ Loging as user ]
29. cd .. [ Go to one step back (back directory) ]
30. su -l < user name > [ Switch user with password]
31. pwd [ Shows present working directoy ]
32. cp < Source file name > [ Copy the file ]
33. mv < Source file name > [ Move the files or directory ]
34. df [ Disk space ]
35. hostname [ Check system name ]
36. last [ Show listing of last logged in users ]
37. less [ Check for last some sentence of the file ]
38. crontab -eu < user name >[ Scheduling the job ]
39. date < dd/mm/yy > [ Check date ]
40. exit [ Exit from contents ]
41. whereis [ Locate the binary, source, and manual page files for a command ]
42. who [ Show who is logged on ]
43. echo [ display a line of text ]
44. which [ shows the full path of (shell) commands ]
45. dig [ DNS lookup utility ]
46. bc [ Calculator ]
47. mesg n [ control write access to your terminal ]
48. diff [ Difference between 2 files ]
49. grep < cat /etc/services|grep i ftp > [ Check for word ]
50. ps [ Check system proccess ]
51. du < file name > [ Check file uses space ]
52. chown [ Change file owner and group ]
53. chmod < -R > < u+rwx,g+rwx,o+rwx > < file name > [ Set the permission for file ]
(drw-r----- [file/directory permissions has show on)
(l --> Link, d --> Directory, p --> Pipe, c --> character device, b --> Block device)
(Permissions in NOs Read=4, Write=2, Executable=1)
54. tail < file name > [ It will show files last ten sentence ]
55. printenv < file name > [ print all or part of environment ]
56. tty [ Check for which terminal connected to which user ]
57. stty [ Change and print terminal line settings ]
58. rmdir < Directory name > [ Remove the directory ]
59. top [ Check system Process ]
60. mount < file name > [ Mount the file, file system ]
61. cal [ Display the calender ]
62. wc < file name > [ Word, Line, Carrector will count ]
63. route [ Show/manipulate the IP routing table ]
64. users [ It will show current user path ]
65. printf [ format and print data ]
66. uname [ Check OS version ]
67. cmp < file name 1 > < file name 2 > [ compare two files]
68. comm < file name 1 > < file name 2 > [ compare two sorted files line by line ]
69. netconfig < at root user only > [ Setup network configuration ]
70. alias < c=clear >[ Setup alias ]
71. vi /root/.bashrc [ This is for perment setting alias ] {In root previlage}
72. tar -cvf < file name.tar > [ Backup ]
73. fdisk -l [ Check for partitions ]
74. history -c [Clear full history commands]
75. startx [GUI mode]
76. init tab [Set the Run Level for GUI-5 & for Command Mode-3]
77. useradd -g [Add User to Group]
78. groupadd [create group]
79. groupmod [change group name]
80. rm -rf [Delete user home directory from /home directory]
81. userdel -r [this cmd will delete user with users home directory from /home]
82. rm -rf [removing main directory with sub directory at a time]
83. smbpasswd [Create Samba user, normal user should be create before sbm user]
84. smbpasswd -x [Delete only Smb user]
85. df -h [check partitions, mounted partitions]
86. cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd (Recover /etc/samba smbpasswd file)
86. vi /root/.bashrc (setup for perment alias)
87. crontab -e 15 15 * * * /sbin/shutdown -h now [Setup cronjob for shutdown]
88. crontab -e 12 12 * * * /sbin/shutdown -r now [Setup cronjob for reboot]
89. # /etc/init.d/iptables start/restart/stop/status [Start the iptables file /etc/sysconfig/iptables]
90. rpm -i [Install rpm package]
91. [find Installed rpm package]
92. rpm -e |grep [Uninstall rpm package]
93. ls -ltr -filename* [find files in directory]
94. ps -aef [Check all running process IDs]
95. ps -aef |grep [Check Particular Process ID]
96. find |grep [Find word in file]
97. Command | grep [find word in command exp: ifconfig want to find 00:19:D1:13:A6:EE MAC then we can use]
98. cat etcservice [All Port No, available]
99. system-config-network
100. du -hs [Check directory/folder size]
101. netstat -l [less will show currently listening servers]
102. mount 192.168.1.11:/home/sandeep/[server share directory] /home/sandeep/[client directory] [NFS share/mount directorys]
103. umount 192.168.1.11:/home/sandeep/[server share directory] /home/sandeep/[client directory] [NFS share/unmount directorys]
104. uname -a [Check Linux Machine name as well as OS version 32/64 bit]
105 rpcinfo -p [check running port No]
106 cat /var/lib/dhcpd/dhcpd.leases [Check connected clients to DHCP server]
107. service --status-all [Check all Running services]
108. free [Check RAM Size : free -k/m/g]
109. cat /proc/meminfo [Check Memory Size]
110. cat /proc/cpuinfo [Check Processor Details]
111. /usr/share/squid/errors/English [Modify all Squid Error/Warning notice]
112. ssh -l [Access remotely computer via command mode]
113. locate [Find File in whole system]
114. setenforce 0 [Disabling SELinux]
115. setenforce 1 [Enabling SELinux]
116. testparm -s [Check Error with Samba Server]
117. netstat -a [Check server/service Process running or not Ex: netstat -a | grep ftp]
118. rpm -ivh httpd-2.2.3-22.el5.i386.rpm apr-1.2.7-11.i386.rpm apr-util-1.2.7-7.el5.i386.rpm postgresql-libs-8.1.11-1.el5_1.1.i386.rpm [HTTPD CONFIGURATION]
119. Killing Particular session TTY
ps -ft [Session ID/No] Exp ps -ft pts/1
kill -9 PID of session
120. htpasswd /etc/squid/squid_password sandeep [add HTTP user/password for squid]
121. mount -o remount,rw /etc [In single user mode edit FSTAB file with write permission]
122. parted [It will view all primary and extended-logical drives] Next give print command to view..
123. getenforce [check selinux disable or enabled
124. iptables -L
USFULL COMMANDS:
1. history|head -n 100 [ For no of showing commands]
2. history [ History commands ]
3. mail [ Check mails ]
4. hostname [ Check hostname ]
5. ifconfig [ Check network configuration ] {In Root Previlage}
6. setup [ Setting network (IP) ]
7. service
8. ping
9. iptables
10. init 0 [ Shutdown ]
11. init 6 [ Restart ]
12. useradd < name > [ Create user account ]
13. passwd < user name > [ Set password for user ]
14. chkconfig [ updates and queries runlevel information for system services ]
15. chkconfig service_name on [ keep service continuesly on ]
16. cd < directory name > [ Change directory ]
17. ls -l [ list directory contents ]
18. cat < File name > [ Show file contents ]
19. mkdir < directory name > [ Create directory ]
20. touch < file name > [ Create file ]
21. vi < file name > [ Edit the file ]
22. rm < file name > [ Remove the file ]
23. clear [ Clean/Clear the desktop/shell ]
24. more < about name > [ Viewing more thing about that ]
25. man [ Meaning of the Concept ]
26. logout [ Logout from user account ]
27. shutdown [ Shutdown system ]
28. login [ Loging as user ]
29. cd .. [ Go to one step back (back directory) ]
30. su -l < user name > [ Switch user with password]
31. pwd [ Shows present working directoy ]
32. cp < Source file name > [ Copy the file ]
33. mv < Source file name > [ Move the files or directory ]
34. df [ Disk space ]
35. hostname [ Check system name ]
36. last [ Show listing of last logged in users ]
37. less [ Check for last some sentence of the file ]
38. crontab -eu < user name >[ Scheduling the job ]
39. date < dd/mm/yy > [ Check date ]
40. exit [ Exit from contents ]
41. whereis [ Locate the binary, source, and manual page files for a command ]
42. who [ Show who is logged on ]
43. echo [ display a line of text ]
44. which [ shows the full path of (shell) commands ]
45. dig [ DNS lookup utility ]
46. bc [ Calculator ]
47. mesg n [ control write access to your terminal ]
48. diff [ Difference between 2 files ]
49. grep < cat /etc/services|grep i ftp > [ Check for word ]
50. ps [ Check system proccess ]
51. du < file name > [ Check file uses space ]
52. chown [ Change file owner and group ]
53. chmod < -R > < u+rwx,g+rwx,o+rwx > < file name > [ Set the permission for file ]
(drw-r----- [file/directory permissions has show on)
(l --> Link, d --> Directory, p --> Pipe, c --> character device, b --> Block device)
(Permissions in NOs Read=4, Write=2, Executable=1)
54. tail < file name > [ It will show files last ten sentence ]
55. printenv < file name > [ print all or part of environment ]
56. tty [ Check for which terminal connected to which user ]
57. stty [ Change and print terminal line settings ]
58. rmdir < Directory name > [ Remove the directory ]
59. top [ Check system Process ]
60. mount < file name > [ Mount the file, file system ]
61. cal [ Display the calender ]
62. wc < file name > [ Word, Line, Carrector will count ]
63. route [ Show/manipulate the IP routing table ]
64. users [ It will show current user path ]
65. printf [ format and print data ]
66. uname [ Check OS version ]
67. cmp < file name 1 > < file name 2 > [ compare two files]
68. comm < file name 1 > < file name 2 > [ compare two sorted files line by line ]
69. netconfig < at root user only > [ Setup network configuration ]
70. alias < c=clear >[ Setup alias ]
71. vi /root/.bashrc [ This is for perment setting alias ] {In root previlage}
72. tar -cvf < file name.tar > [ Backup ]
73. fdisk -l [ Check for partitions ]
74. history -c [Clear full history commands]
75. startx [GUI mode]
76. init tab [Set the Run Level for GUI-5 & for Command Mode-3]
77. useradd -g [Add User to Group]
78. groupadd [create group]
79. groupmod [change group name]
80. rm -rf [Delete user home directory from /home directory]
81. userdel -r [this cmd will delete user with users home directory from /home]
82. rm -rf [removing main directory with sub directory at a time]
83. smbpasswd [Create Samba user, normal user should be create before sbm user]
84. smbpasswd -x [Delete only Smb user]
85. df -h [check partitions, mounted partitions]
86. cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd (Recover /etc/samba smbpasswd file)
86. vi /root/.bashrc (setup for perment alias)
87. crontab -e 15 15 * * * /sbin/shutdown -h now [Setup cronjob for shutdown]
88. crontab -e 12 12 * * * /sbin/shutdown -r now [Setup cronjob for reboot]
89. # /etc/init.d/iptables start/restart/stop/status [Start the iptables file /etc/sysconfig/iptables]
90. rpm -i [Install rpm package]
91. [find Installed rpm package]
92. rpm -e |grep [Uninstall rpm package]
93. ls -ltr -filename* [find files in directory]
94. ps -aef [Check all running process IDs]
95. ps -aef |grep
96. find |grep [Find word in file]
97. Command | grep [find word in command exp: ifconfig want to find 00:19:D1:13:A6:EE MAC then we can use]
98. cat etcservice [All Port No, available]
99. system-config-network
100. du -hs [Check directory/folder size]
101. netstat -l [less will show currently listening servers]
102. mount 192.168.1.11:/home/sandeep/[server share directory] /home/sandeep/[client directory] [NFS share/mount directorys]
103. umount 192.168.1.11:/home/sandeep/[server share directory] /home/sandeep/[client directory] [NFS share/unmount directorys]
104. uname -a [Check Linux Machine name as well as OS version 32/64 bit]
105 rpcinfo -p [check running port No]
106 cat /var/lib/dhcpd/dhcpd.leases [Check connected clients to DHCP server]
107. service --status-all [Check all Running services]
108. free [Check RAM Size : free -k/m/g]
109. cat /proc/meminfo [Check Memory Size]
110. cat /proc/cpuinfo [Check Processor Details]
111. /usr/share/squid/errors/English [Modify all Squid Error/Warning notice]
112. ssh -l
113. locate
114. setenforce 0 [Disabling SELinux]
115. setenforce 1 [Enabling SELinux]
116. testparm -s [Check Error with Samba Server]
117. netstat -a [Check server/service Process running or not Ex: netstat -a | grep ftp]
118. rpm -ivh httpd-2.2.3-22.el5.i386.rpm apr-1.2.7-11.i386.rpm apr-util-1.2.7-7.el5.i386.rpm postgresql-libs-8.1.11-1.el5_1.1.i386.rpm [HTTPD CONFIGURATION]
119. Killing Particular session TTY
ps -ft [Session ID/No] Exp ps -ft pts/1
kill -9 PID of session
120. htpasswd /etc/squid/squid_password sandeep [add HTTP user/password for squid]
121. mount -o remount,rw /etc [In single user mode edit FSTAB file with write permission]
122. parted [It will view all primary and extended-logical drives] Next give print command to view..
123. getenforce [check selinux disable or enabled
124. iptables -L
125. cat /var/log/messages | grep DHCPACK [Check all Client connected DHCP server]
126. scp vnc-4_1_3-x86_linux.rpm root@172.16.4.205:/tmp/ [Copy to Remote System]
127. HISTTIMEFORMAT="%d/%m/%y %T " [Check History with time and date]
Thanks and Regards,
Sandeep CC
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.