Linux Box 5: software installation and file structure

ubuntu software installation

1 APP Store Installation

2 using the package management tools apt mounted (installed automatically download configuration + +)

ding@ding-ubuntu:~$ sudo apt-get install git

Commonly used apt-get command:

apt-get update
    在修改/etc/apt/sources.list或/etc/apt/preferences之后运行该命令
    此外,您需要定期运行这一命令以确保您的软件包列表是最新的
apt-get install packagename
    安装一个新软件包
apt-get remove packagename
    卸载一个已安装的软件包(保留配置文档)
apt-get remove --purge packagename
    卸载一个已安装的软件包(删除配置文档)
apt-get autoremove packagename
    删除包及其依赖的软件包
apt-get autoremove --purge packagname
    删除包及其依赖的软件包 + 配置文件,比上面的要删除的彻底一点
dpkg --force-all --purge packagename
    有些软件很难卸载,而且还阻止了别的软件的应用,就能够用这个,但是有点冒险。
apt-get autoclean
    apt会把已装或已卸的软件都备份在硬盘上,假如需要空间,这个命令删除您已卸载掉的软件的备份。
apt-get clean
    这个命令会把安装的软件的备份也删除,但是这样不会影响软件的使用。
apt-get upgrade
    可以使用这条命令更新软件包选项很有用
apt-get dist-upgrade
    将系统升级到新版本

3 Use the deb package installation

sudo dpkg -i deb_package_name.deb

In windows, we installed the .exe file, Ubuntu ,. there is a .deb deb files can also double-click to install.

4 download their own program source code to compile and install

ding@ding-ubuntu:~$ make
ding@ding-ubuntu:~$ make install

Installed in the program source code package, there is usually readme file, you will be prompted on how to compile and install.

 

File system structure

First, the root directory /

Under linux / is the root directory! All catalog produced by the root

Two, ubuntu file system structure

/ bin to store binary executable file. And stm32 Similarly, bin file is an executable file . In fact, some of the commands that can be used in single-user mode;

/ Boot storage Ubuntu kernel and the boot files such vmlinuz-xxx gurb boot loader, Boot intended to start (computer);

/ Cdrom disc file. If you insert a CD-ROM, CD-ROM file open here;

/ Dev storage device drivers;

/ Etc store some system configuration files, such as user ID and password file, start address a variety of services;

/ Home system default user's home folder. When creating a user with ubuntu, each user has a home folder, located in the / home directory; if we create a user_temp user, under / home also has a user_temp folder;

/ Lib repository file

/ Media pluggable device is placed in this directory, such as SD card, U-disk, or is mounted to the directory

mount point (/ mnt users can use the vmware shared folders ), if you want to mount some additional equipment, it can be mounted to here;

ding@ding-ubuntu:/mnt/hgfs/Share$ pwd
/mnt/hgfs/Share    // 共享文件夹

/opt       可选的文件和程序存放目录,给第三方软件(网易云音乐)放置的目录;

/proc    虚拟文件系统,数据放置到内存中(不是Flash),存放系统运行信息;

// 查看/prroc/cpuonfo  CPU信息

ding@ding-ubuntu:/mnt/hgfs/Share$ cat /proc/cpuinfo 
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 142
model name	: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
stepping	: 10
microcode	: 0x9a
cpu MHz		: 1992.000
cache size	: 8192 KB
physical id	: 0
siblings	: 4
core id		: 0
cpu cores	: 4
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 22
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single pti ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid mpx rdseed adx smap clflushopt xsaveopt xsavec xsaves arat flush_l1d arch_capabilities
bugs		: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips	: 3984.00
clflush size	: 64
cache_alignment	: 64
address sizes	: 43 bits physical, 48 bits virtual
power management:

/root      root用户目录,也就是系统管理员目录;

/sbin      和/bin类似,也是存放一些二进制可执行文件。sbin下面的一般是系统开机过程中所需要的命令;

/srv        service缩写,服务相关目录。比如网络服务;

/sys        记录内核信息,虚拟文件系统;

/tmp      临时目录;

/usr        usr不是user的缩写,而是UNIX Software Resource的缩写,存放于系统用户有关的文件,会占用很大的存储空间!

ding@ding-ubuntu:/$ du -sh /usr/
4.0G	/usr/    // /usr文件夹占用4G的空间

/var        存放一些变化的文件,比如日志文件;

 

发布了184 篇原创文章 · 获赞 100 · 访问量 7万+

Guess you like

Origin blog.csdn.net/dingyc_ee/article/details/104172086