Linux Study Notes (mainly ubuntu)

Source: Internet
Author: User

Linux was used in the second half of last year. Since then, I have been using ubuntu operating systems. I bought this book "laruence's Linux private house dish" and watched the Linux video from Teacher Han shunping. I also downloaded an ubuntu operating system and installed it on my laptop, and remove Windows 7 from your computer. In this way, you can start to learn about Linux. Take the time to sort out your study notes for future reference.

Operating System: Ubuntu 12.04LTS 64-bit
Bytes ---------------------------------------------------------------------------------------------------------
Add or delete a user
# Useradd user name # userdel User Name
# The passwd user name will delete the xiaoming user,
# (Set the password here) but the directory of xiaoming user is not deleted.
# (Confirm Password) # uesrdel-r user name
It is found that there is no xiaoming user directory in/home, and the user and user directories are deleted.
After you log on with the xiaoming user, the command line only has the symbol $ | pipeline command
And the Tab key cannot be supplemented with the command> and> is redirection. The former overwrites the command, and the latter appends the command (re-empty rows)
Bytes ---------------------------------------------------------------------------------------------------------
Change the file owner, create a folder, and delete a folder
Chown user name file name mkdir folder name rmdir folder name (only empty ones can be deleted)
Change the file group to create a file and delete the file
The name of the chgrp group. The name of the touch file. The name of the rm file (cannot be a folder)
Create a symbolic connection and display the environment configuration file to change the initial directory for User Login
Ln-s to whom to create where cat/etc/profile usermod-d Directory Name User Name
Check the system environment variable copy file to change the user's group
Where is the file to be copied by env cp? usermod-g Group Name User Name
View information about all groups add users and specify groups
Cat/etc/group groupadd group name useradd-g group Name User Name
Create a symbolic connection to view information of all users and view partition information
Ln-s source (actual) Target cat/etc/passwd fdisk-l (no computer response)
Copy a folder, delete a folder, and find the content in the file.
Cp-r: copy the path of the rm-rf Folder whose name is grep-n "123"
View command history
Find path-data history searched in the query mode (show all )! 6 (execute a command numbered 6)
Find/home-name lijun history number (display a few recent numbers )! Ls (I forgot)
Bytes ---------------------------------------------------------------------------------------------------------
View the partition in which a directory is located, r: 4 x: 1 w: 2. view the environment configuration file.
You can directly install cat/etc/profile in the df directory full path. bin and. run files.
The installation of .tar.gz adduser cannot be added to the user. The number 1 in front of ls-l indicates the number of files.
Tar-zxvf file name .tar.gz useradd: you can add a full number and run the command in the background.
Bytes ---------------------------------------------------------------------------------------------------------
Hard drive: Basic partition (logical partition, no more points) and extended partition, the sum of the two cannot be greater than 4
Basic partitions can be used directly. Extended partitions can be used only after they are split (logical partitions)
Primary partition: generally refers to the partition where the system is located. Generally, there is only one partition, and two of them are dual systems.
Sda1:
Sd: represents the type of hard disk. hd is an IDE hard disk.
A: disk number
1: partitions (1-4 is the primary partition or extended partition, and 5 is the logical partition)
Bytes ---------------------------------------------------------------------------------------------------------
Modify the installation of shell. binfile to enter the graphical interface
Chsh-s New shell Name (requires restart)./file name. bin startx
JDK configuration (modify the content in/etc/profile and find that the content in my computer does not exist ):
JAVA_HOME =/home/folder name
PATH = $ PATH:/home/folder name/bin ($ do not destroy the original PATH and append it again)
CLASSPATH =.:/home/folder name/jre/lib/rt. jar
Export JAVA_HOME PATH CLASSPATH
If no configuration appears, JAVA compilation commands can only be run in its bin directory.
Bytes ---------------------------------------------------------------------------------------------------------
In the video, we found that/boot was mounted with an item, and then uninstalled it. Then, we showed that it was mounted to the new text directory,
Finally, uninstall it (I found that the boot content is different from that on my computer)
Mount/dev/1sda/text
Umount/text
After the image file in the virtual machine is mounted, the command is process: the program is in progress and has an independent address space.
Mount/mnt/cdrom thread: created by a process. It cannot exist independently and has no independent address space.
Mount the optical drive: mount/mnt/cdrom
Uninstall: umount device name
Bytes ---------------------------------------------------------------------------------------------------------
TCP/IP layer-7 Route tracing (found that my system does not have this command) view ip
Application Layer, physical layer, presentation layer, and Session Layer tracert target ip ipconfig (windows)
Transmission Layer, network layer, and data link layer test network speed ping target ip address (ping 127.0.0.1 is self-tested) ifconfig (linux)
Bytes ---------------------------------------------------------------------------------------------------------
Upgrading the rpm software for installing the rpm Software
Rpm-ivh software name: rpm-U software name: rpm-e Software name (dependency exists during unloading. It seems that the parameter-nodeps can be added)
I = install query all software check whether a software is installed
V = verbose prompt rpm-qa rpm-q mysql (it seems you can also directly rpm-qa mysql)
H = the hash progress bar is installed with linux in the Virtual Machine. When it is integrated with windows, the two ip addresses must be in the same subnet.
I can't use the setup command on my computer. It seems to be something to set up the network.
Ifconfig ech0 192.168.44.22: Set the NIC. It is temporarily valid and cannot be restarted.
Bytes ---------------------------------------------------------------------------------------------------------
Check whether a file is installed to view the version information of the compiler. Change the File Permission.
Which mysql (see if there is any mysql, it seems to be found under PATH) gcc -- version or gcc-v chmod 777 File
Run the task scheduling command to terminate the task scheduling.
$ Crontab-e $ crontab-r $ crontab-l
Time Format: minute Hour Date calendar week
Command can be the full path of a sh File
View process kill process view process top
Ps-a: displays the kill process Number of all processes on the current terminal. d: The time when the system updates the process.
Ps-x background processes force killing process u: monitor specific users
Ps-u displays process information in user format kill-9 process number K: kill a specific process
Bytes ---------------------------------------------------------------------------------------------------------

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.