`
poyunri
  • 浏览: 29406 次
文章分类
社区版块
存档分类
最新评论

ubuntu安装使用问题

 
阅读更多
1.开机后怎么进入图形界面?
答:开启Ubuntu后最先进入的是控制台,先用户登录,<wbr>然后输入 startx 回车,进入图形界面。</wbr>

2.从图形界面进入控制台
答:从左侧工具栏中的dash home 中搜索 终端(Terminal),打开终端,即可进入控制台。
快捷键 ctrl + alt + t

3.ubuntu 的关机、重启、注销命令?
答:shutdown -help 查看shutdown命令如何使用
shutdown -h now 现在立即关机
shutdown -r now 现在立即重启
shutdown -h +3 三分钟后关机
shutdown -r +3 三分钟后重启
shutdown -r 20:12 在20:12时将重启

4.终端命令
1.执行完命令后(若没有转到后台),可以使用 CTRL + C 来终止命令
2.kill 程序编码
当命令在后台执行时,系统会返回一个程序编码,如:在使用 shutdown -r 20:12 系统返回系统编码:1894
我们可以使用 kill 1894 来终止重启命令
3. ps aux | grep 1894 可以查询到该程序编号对应的命令是 shutdown -r 20:12

5. 注销系统
logout

6.设置新的软件更新源
进入控制台,输入命令:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup (备份当前的软件源)
sudo gedit /etc/apt/sources.list (修改 sources.list 中源的列表)

在sources.list 选择一个合适的源,替换之前的源

sudo apt-get update (执行软件源的更新)

7.设置更新源时出现如下错误
(gedit:26742): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-<wbr>used.xbel', but failed: 没有那个文件或目录<br><br> 解决方案:在终端行命令:sudo mkdir -p /root/.local/share<br> 具体原因未知,似乎和root权限有关。<br><br><p>8<span style="font-size:16px">.</span><em><span style="font-size:16px">ubuntu</span></em><span style="font-size:16px">终端中出现(</span><em><span style="font-size:16px">无法获得锁</span></em><span style="font-size:16px">/</span><em><span style="font-size:16px">var</span></em><span style="font-size:16px">/</span><em><span style="font-size:16px">lib</span></em><span style="font-size:16px">/</span><em><span style="font-size:16px">dpkg</span></em><span style="font-size:16px">/</span><em><span style="font-size:16px">lock</span></em><span style="font-size:16px"></span><em><span style="font-size:16px">-</span></em><span style="font-size:16px"></span><em><span style="font-size:16px">open</span></em><span style="font-size:16px">(11 资源临时不可用)</span><br></p> <p><span style="font-size:16px">解决方案:</span><span style="color:rgb(0,0,255); font-size:16px"><span style="font-size:16px">强制解锁,命令</span></span></p> <div><span style="color:rgb(0,0,255); font-size:16px"><span style="font-size:16px"> 1.sudo rm /var/cache/apt/archives/lock</span></span></div> <div> <p style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:14px"><span style="color:rgb(0,0,255); font-size:16px"><span style="font-size:16px">sudo rm /var/lib/dpkg/lock</span></span></p> <p style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:14px"> 2.sudo rm /var/lib/apt/lists/lock</p> <p style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:14px"><span style="color:rgb(0,0,255); font-size:16px"><span style="font-size:16px"><span style="color:rgb(0,0,0)">9.ubuntu 安装软件</span></span></span></p> <p style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:14px"><span style="color:rgb(0,0,255); font-size:16px"><span style="font-size:16px"> sudo apt-get install +软件名</span></span></p> <p style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:14px">10.无法删除文件或文件夹</p> <p style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:14px">sudo nautilus //取得root权限</p> <p style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:14px"></p> <p style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:14px">11.改变tomcat 端口</p> <p style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:14px">tomcat7.0.5的端口(一般tomcat7.<wbr>0.5的端口默认为8080),如果发生冲突,<wbr>则可以在以下文件修改。</wbr></wbr></p> <p style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:14px">tomcat7/conf/server.xml 文件里的:</p> <pre style="white-space:pre-wrap; color:rgb(34,34,34)"><ol> <li style="margin-left:15px">&lt;Connectorport="9090"protoco<wbr>l="HTTP/1.1" </wbr> </li> <li style="margin-left:15px">connectionTimeout="<wbr>20000" </wbr> </li> <li style="margin-left:15px">redirectPort="8443"<wbr>/&gt; </wbr> </li> </ol></pre> <p style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:14px">12.在eclipse中安装tomcat服务器,报错" Cannot create a server using the selected type ".</p> <div style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:14px"> <p style="padding-top:5px; padding-bottom:0px; line-height:1.5; margin-top:0px; margin-bottom:0px"> 原因:以前安装的tomcat目录改变</p> <p style="padding-top:5px; padding-bottom:0px; line-height:1.5; margin-top:0px; margin-bottom:0px"> 解决方法:Window-&gt;preferences-&gt;<wbr>Server-&gt;Runtime Environment,<wbr>改变tomcat的目录为你安装的目录,然后保存,<wbr>这样就可以建立Tomcat server了。</wbr></wbr></wbr></p> <p style="padding-top:5px; padding-bottom:0px; line-height:1.5; margin-top:0px; margin-bottom:0px"> 还有另一种方式:<br> 在当前工作区中如下路径:/.metadata/.<wbr>plugins/org.eclipse.core.<wbr>runtime/.settings,<wbr>记住不是eclispe程序的路径。</wbr></wbr></wbr></p> <p style="padding-top:5px; padding-bottom:0px; line-height:1.5; margin-top:0px; margin-bottom:0px"> 把其下org.eclipse.wst.server.<wbr>core.prefs和 org.eclipse.jst.server.tomcat.<wbr>core.prefs这两个文件去掉</wbr></wbr></p> <p style="padding-top:5px; padding-bottom:0px; line-height:1.5; margin-top:0px; margin-bottom:0px"> 后重启eclipse即可。</p> <br> 13. eclipse 和 tomcat 的配置问题<br><a href="http://yangq.iteye.com/blog/595534" target="_blank" style="color:rgb(17,85,204)">http://yangq.iteye.com/blog/<wbr>595534</wbr></a><br><br> 14.banshee 里的音乐名乱码问题<br> 安装 Mutagen<br><pre style="white-space:pre-wrap">sudo apt-get install python-mutagen 对当前文件夹及子文件夹的音乐标题进行转码 加上 –remove-v1 参数,转换后删除 ID3v1 标签。 mid3iconv -e gbk --remove-v1 *.mp3 15.如何使用conky来美化界面 <a href="http://hi.baidu.com/feisit/blog/item/b17dceef1c9cd0f8ce1b3eba.html" target="_blank" style="color:rgb(17,85,204)">http://hi.baidu.com/feisit/<wbr>blog/item/<wbr>b17dceef1c9cd0f8ce1b3eba.html</wbr></wbr></a></pre> 16.如何在ubuntu下编写 C 程序?<br> 在命令行下输入:<br> vi name 其中name为你要创建的.c文件的名字,以.c作为后缀结尾,<wbr>回车<br> 然后按 i 键,在屏幕下面会出现:---INSERT--- ,这时候就可以直接输入你的程序了,输入完成后,<wbr>切换到英文状态,按<br> Esc键,再输入 :wq 回车( 其中 w 是write 的简写,就是保存的意思, q 是quit 的简写,就是推出vi 的意思。)就回到命令行下,用ls查看当前目录下,<wbr>会发现自己刚才写的程序,再用命令 gcc name 编译,(其中name 就是你刚才写的程序的全名),这时候如果你的程序没有错误,<wbr>就直接回到命令行,如果有错误,就出现错误信息。修改后再 gcc ,直到没有错误为止,在用 ls 命令看,目录下多了一个名为 a.out 的文件,是绿色的,这时用命令 ./a.out 就能直接看到结果了,注意:在 / 前有一个点 .<br><br> 如果你想要编译成自己想要的文件名,就用命令 gcc name1 name2 其中name1 是你想要的文件名,name2 是原文件名,比如:<br><br> gcc new luntan.c 就是将 luntan.c 编译成名为 new 的文件,再用<br><br> ./new 就能看到结果了.<br><br> OK!!这么简单,我说的已经够明确了.你要是还不懂,<wbr>还可以发帖再问.(如果你发现用 gcc 不行,可能是系统没有自带gcc编译工具,但是大部分Linux 系统带的都有这个工具。<br><br> 17.终端安装软件过程中,出现软件包设置,怎么点确定?<br> 用Tab键,光标会移动到确定,然后回车!<br></wbr></wbr></wbr></wbr></wbr> </div> <br> </div> </wbr>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics