SUSE Linux Commands

Source: Internet
Author: User
Tags echo command file diff ftp connection locale disk usage file permissions

1. Modify the VFTPD configuration file vi/etc/vsftpd. conf #listen =yes vi/etc/xinetd.d/vsftpd will "D Isable=yes "To Disable=no" enables the VSFTPD service process to be started automatically when an FTP connection request is received after the XINETD service starts

2. Mkdir-p/srv/ftp/linux-10 Create folder-P if the folder does not exist automatically created

3. Chown-r Ftp:ftp/srv/ftp/linux-10 Specify the owner of the LINUX-10 directory and its subdirectories as FTP users and FTP groups

4. Chmod-r 755/srv/ftp/linux-10 Specify access rights to the LINUX-10 directory and its subdirectories

5. Mount/dev/hdc/srv/ftp/linux-10/disk1 to mount the contents of the device into the Disk1

Umount/srv/ftp/linux-10/disk1 unload files that are mounted in Disk1

6./etc/init.d/xinetd Start FTP Service

7. DF command

function: Check the disk space consumption of the file system. You can use this command to get information about how much space the hard disk is taking up, and how much space is left.

Syntax: DF [Options]

Description: The DF command displays the use of all file systems for I nodes and disk blocks.

The various options for this command have the following meanings:

-a displays disk usage for all file systems, including 0 blocks of file systems, such as the/proc file system.

-k is displayed in bytes.

-I displays the I node information, not the disk block.

-T displays disk space usage for each of the specified types of file systems.

-x lists disk space usage that is not a specified type of file system (as opposed to the T option).

-T displays the file system type.

8. Free command

The function of the free command is to view the current system memory usage, which shows the remaining and used physical and swapped memory in the system, as well as shared memory and buffers used by the core.

The general format of the command is: the options in the free [-B |-k |-m] command have the following meanings:

-B is displayed in bytes.

-k is displayed in bytes.

-M is displayed in megabytes.

9. The Sync command Sync command is to force the data in memory to be written back to the hard drive to avoid data loss

Shutdown command

The shutdown command can safely shut down or restart the Linux system, prompting a warning message to all logged-in users on the system before the system shuts down. The command also allows the user to specify a time parameter, which can be either an exact time or a time period from now on. The exact time format is hh:mm, which represents hours and minutes, and the time period is represented by "+" and minutes. After the system executes the command, data synchronization is done automatically.

The general format of the command is: shutdown [options] [TIME] [warning] the meaning of each option in the command is:

-K does not really shut down, but only sends a warning message to all users.

-Restart immediately after R shutdown.

-H does not restart after shutting down the machine.

-F Fast shutdown, skip fsck when restarting.

-N Fast shutdown without the INIT program.

-C cancels a shutdown that is already running.

In particular, this command can only be used by super users.

One. Date command

The function of the date command is to display and set the system date and time.

Cal Command

The function of the CAL command is to display a calendar for the month of the year.

The general format of the command is: Cal [Options] [month [year]] the meaning of each option in the command is:

-J shows that each day of a given month is the days of the year (from January 1).

-y shows the calendar for the whole year.

echo command

The function of the echo command is to display a piece of text on the display, which generally acts as a hint.

The general format of the command is: Echo [-n] String

where option n means the output text is not wrapped, the string can be quoted, or it can be unquoted. When you output a quoted string with the Echo command, the string is output as it is, and when you output an unquoted string with the echo command, each word in the string is output as a string, separated by a space between the strings.

14. Install Linux system INSTALL=FTP://IP (server IP address) from FTP/linux-10/disk1 HOSTIP=IP (new system IP)/24 gateway=192.168.0.1 (Gateway)

Chkconfig--level 235 NTP on using System startup, automatically start NTP service

/ETC/INIT.D/NTP Restart start NTP service

. Route add-net 224.0.0.0 netmask 240.0.0.0 Dev eth0 Configure Linux Multicast routing add this route entry

NETSTAT-NR View the routing table

Netstat-an|less View the status of a service port

/ETC/INIT.D/NOVELL-TOMCAT4 Restart reboot tomcat (after installing the plug-in in Imanage)

chmod 777 FileName Modify file permissions

Ndsconfig RM Delete an ED instance

23. Exact synchronization time first stop the NTP service rcxntpd stop and then execute the ntpdate command (multiple executions shorten the difference) finally start rcxntpd

Linux Change MAC Address: 1.> temporary change: # ifdown eth0 # ifconfig eth0 hw ether 0029340830249 (MAC address) # Ifup eth0

2.> permanent: (for SuSE does not work) # vi/etc/rc.d/rc.local Ifdown eth0 ifconfig eth0 hw ether 002934083024 (MAC address) IFUP eth0 # Service Network restart (SuSE 9:rcnetwork restart)

3.> Add a new network card: A. VM--add Nic B. Press ' <-' at startup to determine the relevant default configuration C. Create a new Nic file in/etc/sysconfig/network-s/D. Configure a new NIC file

Linux Change MAC Address:

1.1 redhat:a. $ cd/etc/sysconfig/network-s B. Edit file "Ifcfg-eth0", change-to-your real MAC address (use "IFC    Onfig-a "To display real MAC address." C. $/etc/init.d/network Start (to restart network.)

1.2 suse:a. $ cd/etc/sysconfig/network B. $ mv Ifcfg-eth-id-00:0c:29:ba:b2:ad ifcfg-eth0 C. $ vi/ifcfg-eth0    D. $ add lladdr= ' real MAC address ' E. $ to YaST inside configure static IP (use "ifconfig-a" to display real MAC address.) F. $ reboot (restart system)

2. Modify the Redhat locale:

cd/etc/sysconfig/

Edit the i18n file to specify the locale you want

3. Modify SuSE hostname: Edit/etc/hostname

26. Add Reverse proxy name 192.168.10.in-addr-arpa

SuSE configures FTP service A.  Vi/etc/vsftpd.conf B.  Comment The Listen=yes out C.  VI/ETC/XINETD.D/VSFTPD d.  Change Disable=yes to Disable=no E. /ETC/INIT.D/XINETD Start FTP Service (SUSE9 only need to execute c,d,e suse10)

28. Finding files Find path-name (-size,-type) file

29. Find character grep parameter (-l display match line number,-I ignores case,-r recursive lookup) ' str ' fielist

30. Compare file diff parameter (-W ignores space,-I ignores case) file file

31.kill

1. The action Kill command is used to abort a process.

2. Format kill [-S signal |-P] [-a] pid ... kill-l [signal]

3. Parameter-S: Specifies the signal to be sent. -P: Analog send signal. -L: Specifies a list of names for the signal. PID: The ID number of the process to abort. Signal: Indicates a signal.

4. The description process is a very important concept in Linux systems. Linux is a multitasking operating system that often runs multiple processes at the same time. We don't care how these processes are distributed or how the kernel manages the allocation of time slices, and the concern is how to control these processes so that they can serve the user well.

The Linux operating system consists of three different types of processes, each of which has its own characteristics and attributes. An interactive process is a process that is initiated by a shell. The interactive process can be run either in the foreground or in the background. The batch process and terminal are not linked, and are a sequence of processes. A process that is started when the Linux system starts and runs in the background when the process is monitored (also called the System daemon). For example, HTTPD is the well-known Apache server monitoring process.

The KILL command works by sending a system operation signal to the kernel of the Linux system and the process identification number of a program, and then the system kernel can operate on the processes specified by the process identification number. For example, in the top command, we see that the system runs many processes, and sometimes it needs to use kill to abort some processes to improve system resources. When explaining the installation and landing commands, it was mentioned that the function of multiple virtual consoles is to switch to another virtual Console to shut down the program when a program error causes the system to deadlock. The command that is used at this point is kill, because Kill is a direct call to most shell internal commands.

5. Application example (1) Force abort (frequent use kill) a process with the identification number 324: #kill-9 324

(2) Unlocking a Linux system deadlock in Linux Sometimes this happens: A program crashes and is in a deadlock state. You do not have to restart your computer at this time, just abort (or shut down) the problematic program. When Kill is in the X-window interface, the main program (except for the crashing program) normally starts. At this point, open a terminal, where the problematic program is aborted. For example, if the Mozilla browser program has a deadlock situation, you can use the KILL command to abort all programs that contain the Mozolla browser. First use the top command to investigate the PID of the program, and then use the KILL command to stop the program: #kill-sigkill xxx where xxx is the process identification number that contains the program with the Mozolla browser.

(3) Using commands to reclaim memory we know that memory is very important to the system, and reclaiming memory can improve system resources. The KILL command can be used in a timely manner to abort some "deviant" programs or for a long time without corresponding programs. For example, using the top command to discover a useless (Zombie) process, you can use the following command: #kill-9 xxx where xxx is a useless process identification number.

Then use the following command: #free you will see an increase in available memory capacity at this time.

(4) Killall Command Linux also provides a killall command that can directly use the name of the process rather than the process identification number, for example: # killall-hup inetd

32.rm Delete command     rm-r Delete directory, regardless of whether there are files in the directory     rm-rf forced deletion, no prompt     33.ln command &nbs p;  ln-s source file (absolute path)       target file       (soft connect)    34. View native Open Ports

1. Netstat view ports and connections netstat lists the currently connected service names Netstat-a lists the currently connected and listening service names Netstat-an lists the port numbers that are currently connected and listening (with the Command function, just do not explain the port number corresponding to the service name) Netstat-ap on the basis of the above command lists the connected PID (process number), with this PID, you can use Kill to kill the connection such as: A connection pid=111, If you want to kick out, use KILL-9 111.    Ok!    Netstat-rn Output route table 2, Nmap nmap 127.0.0.1 View native open ports, scan all ports nmap-p 1024 65535 127.0.0.1 scan specified port range NMAP-PT 192.168.1.1-111 Scan a range of computers

35. Interactively Manage Identity Manager objects Dxcmd-host 192.168.37.133-port 524 36. Ps-a the process of producing and seeing

Ssh-x (IP address) remote connection to another system

Pkill firefox-bin (process name) kills process 39 with process name. . /opt/novell/edirectory/bin/ndspath setting environment Variables for ED

SUSE Linux Commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.