There is some notes while I am learning Ubuntu Operate System!

(Ask Ubuntu)

1-- Hard link : ln command have different parm. Hard link means that the two files is connect together for backup the original files.If you edit any of the two files , it will be sync immedietely. If you delete the original file. It will make all files used. If you delete the copy file , it will keep the context of the original file. This command can not link the directory but single file.  ln A.txt B.txt

2-- Symbolic link: This is different from the hard link. This command can link the directory. This one is more usefull than Hard link.  ln  -s A.txt B.txt

3-- cat : cat is a command which can read the .txt .py .c etc without opening the origin files. Used like this: cat filename.suffix  zcat is another command which can read the zip files : zcat filename.zip.

4-- du -sb;df -i : read the Memory and disk used and the information of the device.

5-- ln : The explaination have already said in the point 1 and the point 2.

6-- fdisk : fdisk /dev/sda1 check the information of this device. The memory,sector,node and so on.

7--df : df /  command is for checking all device.df -i more information about all the device.

8-- while there is a question about that : sudo apt-get update . Then there is two errors say:”Could not get lock /var/lib/dpkg/lock” .And “Unable to lock administration directory(/var/lib/dpkg),is anther process using it?”.

That two error’s information tell us that we need to find out that whether there is anther process is using the dpkg. So we need to type anther command into the Terminal like that: sudo lsof /var/lib/dpkg/lock. Then it return some information like that :

COMMAND   PID     USER     FD     TYPE   DEVICE   SIZE/OFF    NODE         NAME

unattend       9241     root      5uW     REG        8,1                0           699848  /var/lib/dpkg/lock

So, We need to kill the process like this :sudo kill -9 9214 .(The fromat: sudo kill -9 <PID>).

After these steps ,I can run the system normally. Congratulations!

9--when I moving the Ubuntu Terminal. It receive a command(Ctrl + C) to shutdown the process running in the  Terminal. So need to solve this problem like this : Shutdown the processing running in your Original system(Our Ubuntu is install in the Vmware as a Vitrual Machine), The named of the process is YouDao Dictionary!

10--Error:Unable to find the remote helper for https:When I was upload the C files into the remote repository, it show like this error. After finding the answer, It said that the path named /usr/lib/git-core is not in the System’s PATH. So what we need to do is to set the path to include the git-core path so that we can use the command of git: PATH=$PATH:/usr/lib/git-core.

11-- When I try to change my authority to be a root, It turn out to be that Authourity failure. So I am going to find the reason. At last it told me That I have not set the root’password before.We are asked to set a new password for root. We set the password for root used this command: sudo passwd root   .After running this command, it asks you to input the password of user now time, then you need to enter the password for root.

12-- When I am using git to manage my code.

There is some steps for you to do this(This for you to update your code to the github.com!).

    Step1 : Go to the the file directory which you want to manage the code use the command ‘cd’. After yo u get into the directory, you need to use the first git command: git init  -→this command make the directory to be a local repository. The later steps is based on this directory.

Step2 : You need to know the status of the directory, using this git command to get the status: git status. After you using this command. There show the status of the directory. Then you need to add these  new    files into the commit like this: git add filename.

Step3 : When you finished to add the new files into the commit. Now you can commit those files into the local repository. The command like this: get commit -m filename. After this step, you can check the status of the directory like this:git status to insure that there is no files is new needed to be update.

Step4 : There is two different positions. If you have not connect this local repository to the remote repository located in the service  machine of the git.com. You need to do like this : git remote add origin https://github.com/user name/repository’s name,git . After this o peration, the local repository will link with the remote repository located in the service of github,com. Notice: We must insure that there have already make a repository in your github account of github.com. If you have already link your file s to the local repository with the repository in github.com, You just skip this step and read the next step.

 Step5 :After all those operations, The last step you need to do is :git push -u origin master .

There is some steps for you do this(This is for you to clone the files from the github.com).

   Step1 : You don’t need to add a new directory in your local computer. You just need to  type this in your Terminal : git clone https://github.com/githubusername/local-repository-name.git

13-- mkfs : The long form is : Make your file system

14-- badblocks : This command is for you to check whither there are some break sectors in the memory device. It takes more time.

15-- mount : mount commad is important. If you want to operate some devices, it firstly should be mount on. Mount -l command means to show all the devices have been mount on. Mount /dev/sda1 means to mount on the device you want to mount, once mount on, you can use it.before you eject the devices , you should firstly umount the divice like this : umount /dev/sda1 . Then you can eject the device. For example(You want to operate your flash device):

   Step1 : df -i show all the device been connect to the operation system.

   Step2 : mkdir /media/flash To make a directory to operate the flash device with this file.

   Step3 : mount /dev/devicename /media/flash To mount the device on the system’s file.

   Step4 : Do what you want to do on the flash directory in order to operate the flash device.

16-- umount : umount /dev/sdb1

17-- rm -rf : rm -rf file’directory. This command can directly delete the whole file directory.

18-- cp -r : cp -r /Original directory /Destination directoryCopy the whole directory.

19-- dumpe2fs :

20-- e2label : e2lable /dev/sab1 MM1994UESTCChange the device name.

21-- hdparm : hdparm /dev/sda1To show the parameters of device connect to the operate Sys.

22-- Some file’s suffix inform us the compress type of the file:

*.Z  compressed by compress App

*.gz  compressed by gzip App

*.bz2  compressed by bzip2 APP

*.tar  Have not been compressed, Open with tar App

*.tar.gz  packed by tar App, also been compressed by gzip App

*.tar.bz2  Packed by tar App, also been compressed by bzip2 APP

The Compress Command:

gzip :

bzip2 :

gunzip :

tar -jcv -ffilename.tar.bz2 filename

tar -jxv -ffilename.tar.bz2  -C filename

tar -zcv -ffilename.tar.gz filename

tar -zxv -ffilename.tar.gz  -C filename

The package Command:

tar : tar -c -ffiledirectoryname.tar  original filename

23--mv : Acommad that can also change the filename. Mv A.txt B.txt

This command also can be used as moving the file into another place.

24-- alias : To rename the command with another name. EG: alias lm=’ls -al’ means that to use the lm name to respect the command ls -al.

25--declare -i number=$RANDOM*10/32768; echo $number

26-- history :

27-- vim -r .filename.swpThis command can help you to recovery the file that have not been saved before which suddenly be killed without saved.

28-- To install the MySQL on your Ubuntu Operation System.

Step1 :sudo apt-get install mysql-server

Step2 : apt-get install my-client

Step3 : sudo apt-get install libmysqlclient-dev

After those steps , Let us check whether the Mysql-server been installed on our Ubuntu’system

Command:sudo netstat -tap | grep mysql

If ubuntu’s terminal shows that your mysql’socket is in listening means that the mysql-server has been installed successfully.

29-- How to remove some App That we don’t want to use!

Step1 : sudo apt-get remove mysql-server mysql-client mysql-common

Step2 : sudo apt-get autoremove

Step3 : sudo apt-get autoclean

If you are trying to reinstall the mysql server ,and there is some problems,please redo the three steps above and then execute the follow command as this :

Step4 : sudo apt-get remove - -purge mysql-\*

Step5 : sudo apt-get install  - -reinstall mysql-common    (The most important command!)

Step6 : sudo apt-get install mysql-server mysql-client

30-- How to stop/start the mysql-server under ubuntu?

sudo service mysql start(Notice:In order to prevent the system have already open the service for you while you continue try this start command , sudo service mysql restartis better!Also,you can use this command to find out while the mysql service is running:service mysql status)

sudo service mysql stop

sudo apt-get install ksnapshot

Ubuntu进阶学习,指令迅速查询,Bug迅速查询(Ctrl+F)的更多相关文章

  1. MYSQL进阶学习笔记十:MySQL慢查询!(视频序号:进阶_23-24)

    知识点十一:MySQL 慢查询的应用(23) 一.慢查询定义 MySQL记录下查询超过指定时间的语句,我们将超过指定时间的SQL语句查询称为慢查询. 查看时间限制 show variables lik ...

  2. Ubuntu+Fedora进阶学习,指令迅速查询,Bug迅速查询(Ctrl+F)

    There is some notes while I am learning Ubuntu Operate System! (Ask Ubuntu & Fedora) 1-- Hard li ...

  3. Mybatis进阶学习笔记——关系查询——一对一查询

    用户和订单的需求 通过查询订单,查询用户,就是一对一查询 (1)自定义JavaBean(常用,推荐使用) <select id="queryOrderUser" result ...

  4. J2EE进阶(十七)Hibernate中常用的HQL查询方法(getHibernateTemplate())

    J2EE进阶(十七)Hibernate中常用的HQL查询方法(getHibernateTemplate())   当我们使用Hibernate进行数据的CRUD操作时,利用模版进行操作不失为一种方法. ...

  5. ROS进阶学习笔记(11)- Turtlebot Navigation and SLAM - ROSMapModify - ROS地图修改

    ROS进阶学习笔记(11)- Turtlebot Navigation and SLAM - 2 - MapModify地图修改 We can use gmapping model to genera ...

  6. Hibernate进阶学习4

    Hibernate进阶学习4 深入学习hibernate的查询语句 测试HQL查询 package com.hibernate.test; import com.hibernate.domain.Cu ...

  7. Mybatis基础进阶学习2

    Mybatis基础进阶学习2 1.测试基本结构 2.三个POJO package com.pojo; import java.io.Serializable; import java.util.Dat ...

  8. Oracle SQL优化进阶学习

    引言 对于下面的Oracle分页如何优化该段语句: SELECT * FROM (SELECT A.*, ROWNUM RN FROM (SELECT * FROM task_log order by ...

  9. PHP程序员进阶学习书籍参考指南

    PHP程序员进阶学习书籍参考指南 @heiyeluren lastmodify: 2016/2/18     [初阶](基础知识及入门)   01. <PHP与MySQL程序设计(第4版)> ...

随机推荐

  1. 推荐使用C++ 11

    如果你的代码工作正常并且表现良好,你可能会想知道为什么还要使用C++ 11.当然了,使用用最新的技术感觉很好,但是事实上它是否值得呢? 在我看来,答案毫无疑问是肯定的.我在下面给出了9个理由,它们分为 ...

  2. 以Self Host的方式来寄宿Web API

    Common类及实体定义.Web API的定义请参见我的上一篇文章:以Web Host的方式来寄宿Web API. 一.以Self Host寄宿需要新建一个Console控制台项目(SelfHost) ...

  3. 「C语言」C输出hello world!系统发生了什么?

    本篇文章全部摘抄自学长博客供以后学习: http://efraim.me/2015/12/05/tech-linux-2015-12-05/ 排版因与博客园编辑器不同而稍作修改. 输出hello wo ...

  4. [C#]多线程下载

    发现电脑里以前编写的下载程序... 做个记录,那时做的挺匆忙的,没用委托,通过公开出窗体来修改下载进度,做的比较乱... ==!! 程序具体功能(流程): 1.检测系统托盘图标内的进程名是否符合要求 ...

  5. artTemplate 介绍

    artTemplate 是新一代 javascript 模板引擎,它采用预编译方式让性能有了质的飞跃,并且充分利用 javascript 引擎特性,使得其性能无论在前端还是后端都有极其出色的表现. 编 ...

  6. ASP.NET获取请求的url信息汇总

    ASP.NET获取请求的url信息汇总 最近做项目需要处理一个用代码获取当前网站的域名或ip信息的问题,于是尝试了ASP.NET中各种获取url信息的方法,在此总结一下: 在Global.asax文件 ...

  7. 解决C#导出excel异常来自 HRESULT:0x800A03EC的方法 .

    解决C#导出excel异常来自 HRESULT:0x800A03EC的方法 .   xlBook.SaveAs(FilePath,Microsoft.Office.Interop.Excel.XlFi ...

  8. Atitit.图片木马的原理与防范 attilax 总结

    Atitit.图片木马的原理与防范 attilax 总结 1.1. 像图片的木马桌面程序1 1.2. Web 服务端图片木马1 1.3. 利用了Windows的漏洞1 1.4. 这些漏洞不止Windo ...

  9. 配置SharePoint使用ADFS

    1. 如果网站应用程序没有使用声明式验证 $wpp = Get-SPWebApplication <URL> $wpp.UseClaimsAuthentication = 1 $wpp.U ...

  10. 扩展SharePoint链接字段

    默认SharePoint中的链接字段有很多限制,例如 输入文字的时候只能录入255个字符 链接显示的是文字 点击链接后只能在当前页面打开链接 - - - - - - -- - - - - - -   ...