Linux和Windows学习日记1

    xiaoxiao2026-05-13  11

    1. 安装xubuntu桌面及附带应用

    解析:

    (1)sudo apt-get update

    (2)sudo apt-get install xubuntu-desktop

    2. 显示软件包列表和状态标志

    解析:dpkg -l

     

    3. Windows 10运行Xshell 5缺少mfc110.dll和MSVCR110.dll文件

    解析:下载和Xshell相应位数版本的Visual C++ Redistributable for Visual Studio 2012 Update 4即可。需要说明的是,如果版本不匹配,那么没有效果。

     

    4. CentOS查看CPU型号

    解析:cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c 8  Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz

    5. Ubuntu安装SSH,并且开始root远程登陆

    解析:sudo apt-get install openssh-server;sudo service ssh start。编辑vim/etc/ssh/sshd_config,然后将PermitRootLogin without-password修改为PermitRootLogin yes。

     

    6. CentOS安装scp命令

    解析:yum install openssh-clients

     

    7. deb文件安装和卸载

    解析:

    (1)安装:sudo dpkg -i *.deb

    (2)卸载:sudo dpkg -r(-p) packagename

    选项参数,如下所示:

    (1) -r在系统中卸载软件,不删除配置文件。

    (2) -p在系统中卸载软件以及其配置文件。

     

    8. nohup command &相关命令

    解析:

    (1)通过nohup command &命令让服务在后台运行。在缺省情况下该作业的所有输出都被重定向到一个名为nohup.out的文件中。

    (2)我们可以使用jobs查看后台运行的服务。

    (3)并且可以使用fg %jobnumber将后台中的命令调至前台运行,bg%jobnumber将后台暂停的命令继续执行。

    (4)ctrl+z可以将一个在前台运行的命令放入后台,并且暂停运行。

     

    9. Linux中的so文件

    解析:Linux中的so文件是动态链接库,与Windows中的dll文件类似。

     

    10. -bash: /root/jdk1.7.0_09/bin/java: No such file or directory

    解析:环境变量在~/.bashrc中配置好了,并且也执行命令source ~/.bashrc,但是在终端输入java的时候报上述错误。主要原因是在Ubuntu 64 bit上面缺少一些32 bit的库,执行命令apt-get install libc6-i386安装即可。

     

    11. the public key is not available: NO_PUBKEY B70731143DD9F856

    解析:sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B70731143DD9F856

     

    12. whereis命令,which命令,locate命令,find命令 [4]

    解析:

    (1)whereis命令:通过数据库查看文件的位置,比如whereis passwd。

    (2)which命令:通过PATH环境变量查看可执行文件的位置,比如which passwd。

    (3)locate命令:通过数据库查看文件的位置,比如locate passwd。

    (4)find命令:通过搜索磁盘查询文件的名称,比如find / -name 'test'。

     

    13. 重启网络失败 [5]

    /etc/init.d/networking restart报错

    stop: Job failed while stopping

    start: Job is already running: networking

    解析:sudo service network-manager restart

    14. Ubuntu 14.10更新源 [6]

    解析:

    首先备份源(cp /etc/apt/sources.list /etc/apt/sources.list-bak),然后添加新的源头到sources.list文件(sudo vim /etc/apt/sources.list)。如下所示:

    deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu trusty main restricted universe multiverse deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu trusty-security main restricted universe multiverse deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu trusty-updates main restricted universe multiverse deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu trusty-backports main restricted universe multiverse deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu trusty-proposed main restricted universe multiverse deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu trusty main restricted universe multiverse deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu trusty-security main restricted universe multiverse deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu trusty-updates main restricted universe multiverse deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu trusty-backports main restricted universe multiverse deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu trusty-proposed main restricted universe

    最后,sudo apt-get update即可。

    15. Windows 7和VirtualBox之间共享文件夹

    解析:操作细节请参考文献[7],记住命令挂载命令sudo mount -t vboxsf  ubuntuShareFile  /home/shared即可。

    16. VNC Server操作 

    解析:

    (1)apt-get install vnc4server  

    (2)vncpasswd

    (3)vncserver :1  

    (4)vncserver -kill :1  

    (5)ps -ef|grep -i vnc

    (6)kill -9 XXX

    17. 安装Django

    解析:pip install Django==1.8.2

    18. 使用xubuntu桌面

    解析:

    vim /root/.vnc/xstartup sesion-manager & xfdesktop & xfce4-panel & xfce4-menu-plugin & xfsettingsd & xfconfd & xfwm4 &

    19. Ubuntu安装Matlab R2014a [8]

    解析:

    (1)替换install.jar。

    (2)替换libmwservices.so。

    20. MinGW 

    解析:MinGW提供了一套简单方便的Windows下的基于GCC 程序开发环境。MinGW收集了一系列免费的Windows使用的头文件和库文件;同时整合了GNU 的工具集,特别是GNU程序开发工具,比如gcc,g++,make等。MinGW是完全免费的自由软件,它在Windows平台上模拟了Linux下GCC的开发环境,为C++的跨平台开发提供了良好基础支持,为了在Windows下工作的程序员熟悉Linux下的C++工程组织提供了条件。

    21. MATLAB设置默认工作目录

    解析:MATLAB快捷方式 -> 属性 -> 起始位置 -> 默认目录。

    22. WPF和WinForm 

    解析:Winform可以看成是Win32,MFC的.NET版本,而WPF是新技术,基于DirectX引擎,支持GPU硬件加速。

    23. 查看Directx版本

    解析:Windows 10查看Directx版本:dxdiag。

    24. MEX文件  

    解析:MEX文件是一种可在Matlab环境中调用的C语言(或fortran)衍生程序,mex的编译结果实际上就是一个带输出函数mexFunction的dll文件。

    25. Excel 2013固定行和列

    解析:视图 -> 冻结窗口。

    参考文献:

    [1] Windows 7下硬盘安装Ubuntu 14.04双系统的方法:http://jingyan.baidu.com/article/8ebacdf022413e49f65cd5d5.html

    [2] Windows 7下通过easyBCD引导安装Ubuntu 14.04:http://jingyan.baidu.com/article/e4d08ffdace06e0fd2f60d39.html

    [3] 金山快盘:http://www.kuaipan.cn/d/linux

    [4] Linux命令中which、whereis、locate有什么区别?:http://zhidao.baidu.com/link?url=T8Gkf4uRkstHBXolT5UKbVrCtXC-EbP_pagPdBLnI_WgXbv7FTnJRRVCkeLp2C3GW_YYBkB_Y1u7rqLlwzj1da

    [5] Ubuntu网络管理:http://www.open-open.com/lib/view/open1447661875978.html

    [6] Ubuntu 14.10源推荐:https://segmentfault.com/a/1190000003970895?_ea=500425

    [7] 如何实现win7和VirtualBox中Ubuntu系统共享文件夹:http://www.cnblogs.com/liji275137657/p/3864816.html

    [8] Ubuntu下安装Matlab R2014a笔记:http://blog.sciencenet.cn/blog-562867-816239.html

    转载请注明原文地址: https://ju.6miu.com/read-1309623.html
    最新回复(0)