Ubuntu12.04 命令学习与测试

本文通过一系列实际操作展示了Ubuntu12.04环境下常用Linux命令的应用,包括环境查看、软件安装位置查询、历史命令查看及软件搜索等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Ubuntu12.04 命令学习与测试

 

查看环境

root@ma-virtual-machine:/home/ma# cat /etc/lsb-release

DISTRIB_ID=Ubuntu

DISTRIB_RELEASE=12.04

DISTRIB_CODENAME=precise

DISTRIB_DESCRIPTION="Ubuntu 12.04.5 LTS"

 

root@ma-virtual-machine:/home/ma# uname -a

Linux ma-virtual-machine 3.2.0-29-generic-pae #46-Ubuntu SMP Fri Jul 27 17:25:43 UTC 2012 i686 i686 i386 GNU/Linux

 

root@ma-virtual-machine:/home/ma# uname -r

3.2.0-29-generic-pae

 

root@ma-virtual-machine:/home/ma# cat /etc/issue

Ubuntu 12.04.5 LTS \n \l

 

root@ma-virtual-machine:/home/ma# gcc --version

gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3

Copyright (C) 2011 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 

root@ma-virtual-machine:/home/ma# history  查看过去使用的命令

  208  uname -r

  209  cat /etc/issue

  210  ls /proc/

  211  netstat -h

  212  gcc --version

  213  history

 

root@ma-virtual-machine:/home/ma# man ifconfig 查看ifconfig 命令具体用法

 

查看软件安装位置 whereis

root@ma-virtual-machine:/home/ma# whereis apt-get  

apt-get: /usr/bin/apt-get /usr/bin/X11/apt-get /usr/share/man/man8/apt-get.8.gz

 

删除软件使用命令:sudo apt-get remove

 

搜索软件源是否有你想要的软件sudo apt-cache search xxx

root@ma-virtual-machine:/home/ma# sudo apt-cache search 7z

file-roller - archive manager for GNOME

p7zip-rar - non-free rar module for p7zip

libmlpcap-ocaml - binding of libpcap for OCaml

libmlpcap-ocaml-dev - binding of libpcap for OCaml

lzma-alone - Compression and decompression in the LZMA format - legacy utility

p7zip - 7z file archiver with high compression ratio

p7zip-full - 7z and 7za file archivers with high compression ratio

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值