ToDoList
(此部分内容不定时整理至OverView–ComputerOverview中)
软连接和硬链接
硬链接持有文件本身、软连接持有文件引用
Linux下的链接很多书都会讲到,一般来说,我们可以通过ln <source> <destination>
来建立硬链接,通过 ln -s <source> <destination>
来建立软链接(其中的s即是symbolic,也就是‘符号链接’,软链接的别名。
Windows中创建硬链接的命令时mklink /H ,在创建后的图标也和原文件的图标一样,在属性中也无法看出其中的链接关系。唯一的方法就是通过fsutil hardlink list 来查看一个文件包含了多少硬链接
Refs:1.linux下的链接文件2. Inode Definition3.Window中的四种链接方式4.某乎回答
(此部分内容不定时整理至文内对应章节中)
ls -li
需要知道PID号,可以通过top命令获取
图床:阿里百川
中国惠多网
操作系统概述
操作系统一般分为
Linux OS
Linux常用命令
linux目录结构–小哥整理的很棒?,参考之
linux中几个简单命令
如何记住linux命令
一.信息查看
1. 查看当前发行版可以使用的shell: cat /etc/shells
查看正在使用的shell
查看正在使用的shell版本:bash -version或者echo BASH_VERSION–
BASH_VERSION是本地定义的shell变量,可用set查看全部本地定义的shell变量切换shell最简单:输入shellName即可切换
2.linux查看本机ip地址:ifconfig -a
@w=500
3.linux使用命令:man+command查看某一个命令的使用方式; 查看后按“q”退出
4.linux使用which命令查看可执行文件位置,对应windows中为where
**5.linux查看某个某个进程属于哪个程序:**ps列出|grep筛选
which processes are running and who own the process?
ServicesVSprocess
6.查看linux系统版本信息
uname -a
显示电脑以及操作系统的相关信息
cat /proc/version
正在运行的内核版本。 proc - process information pseudo-filesystem pseudo-filesystemSystem call
cat/etc/issue
发行版本信息
lsb_release -a
print all the distribution-specific information
7.chkconfig -list: updates and queries runlevel information for system services
chkconfig配置工具chkconfig --list 可以列出sysV和xinet服务在各个runlevel的默认启动状态
hostname – set or print name of current host system
check running services on linux
8.linux查看文件信息的三个命令
9.查看linux服务器当前时间和启动时间
# date
--查看linux当前时间
# last reboot
—查看privious boot time 一般列出之前五次
10.linux列出可安装的软件包:listing packages
常用:# yum list java\*
–列出名字内包含java的安装包
11.linux ps -ef|grep processName
12. linux设置和查看环境变量
二.服务器搭建
1.linux中使用python -m SimpleHttpServer命令实现目录共享:==》
- Serve current directory tree at http://hostname:8000
各种Linux发行版通常都内置了Python,故使用此方法非常方便。在其它OS(比如Windows)此方法也有效,但是要麻烦一些,必须先搭建Python环境。参考:python搭建静态服务器如果你安装的是phthon3那么命令就不是python -m SimpleHTTPServer而是要改成python -m http.server,效果是一样的。
三.linux下载文件
How to download a file from server using SSH?
三.待整理
5.echo 命令:linux echo commandWhy is there a /bin/echo and why would I want to use it?
6.linux中变量命令规范naming conventions for variables in shell:Environment variables or shell variables that are introduced by the operating system or shell startup scripts etc. are usually all in CAPITALS.To prevent your own variables from conflicting with these variables, it is a good practice to use lower case.(conflicting evidence:冲突证据)
Eg:/bin/echo'the value of $PATH is’$PATH
path是环境变量,必须大写Reference Artical&google’s shell style guide