学习笔记之Linux / Shell

All contents are moved to haoran119/linux (github.com).


shell(计算机壳层)_百度百科

  • http://baike.baidu.com/subview/849/15831672.htm

Shell (computing) - Wikipedia, the free encyclopedia

  • http://en.wikipedia.org/wiki/Shell_(computing)
iSeries QSHELL - Wikipedia
  • http://en.wikipedia.org/wiki/ISeries_QSHELL
  • According to IBM, QSHELL is a “UNIX-like” interface built over OS/400. The commands you issue point to programs in a “QSHELL” library. To use QSHELL, key STRQSH or QSH on an iSeries command line.
  • PASE is a “real” UNIX—it is actually AIX. It looks similar to QSHELL, but doesn’t have some of the limitations built into QSHELL. To use PASE, CALL QP2TERM.
AIX_百度百科 
  • http://baike.baidu.com/view/349664.htm
  • AIX(Advanced Interactive eXecutive)是IBM基于AT&T Unix System V开发的一套类UNIX操作系统,运行在IBM专有的Power系列芯片设计的小型机硬件系统之上。

面试总结之Linux/Shell - 浩然119 - 博客园

学习笔记之Linux开发(C语言) - 浩然119 - 博客园

介绍 Linux 文件系统

Linux桌面进化史

命令行的艺术

Unix 激荡 50 年:驱动 Android、iOS 的操作系统是如何从失败开始的?

进程调度,一个调度器的自白

10个不得不知的Linux常识

你应该了解的Linux知识

Linux下你还知道这些特殊文件?

Ubuntu 的十年回顾


LINUX COMMAND

Unix/Linux Command Reference

【ZZ】Linux常用指令 - 浩然119 - 博客园

Linux常用命令全称 - 程序员大咖

  • https://mp.weixin.qq.com/s/AMnlM75hAMdrSCURZ4QarQ
  • https://www.cnblogs.com/wangcp-2014/p/6539035.html

176条DevOps人员常用的linux命令速查表 - 程序员大咖

  • https://mp.weixin.qq.com/s/iQBmEzsGxAx4FJq0SBH6Gg

97条 Linux 常用命令总结 - 机器学习算法与Python学习

  • https://mp.weixin.qq.com/s/RK_bqt5ihi3jAn9-i1qKtg
  • https://zhuanlan.zhihu.com/p/36093355

图解 Linux 常用命令

如何查看Linux系统的状态信息?

解放你的双手,一个命令帮你减负 - Linux学习

  • https://mp.weixin.qq.com/s/EA3MbENrq8jfj0bD40ITNw

如何用 Linux 技巧大大提高工作效率? - CSDN

  • https://mp.weixin.qq.com/s/wZ7tqB8EDEduQE-2gtUdFA

工作中常用到的Linux命令

Linux最常用命令

Linux上,最常用的一批命令解析(10年精选)

Linux 实用指令大全

从命令行同时移动多种文件类型的小技巧

Linux 中删除目录的多种方法

软件测试工程师的 Linux 十大场景命令使用

一个录制并回放Linux终端会话的命令

3 种在Linux命令行查看图像的方法

为何killall有时找不到你的进程?killall是干什么的?

Linux下如何拆分大的日志文件?

几个命令了解ELF文件的“秘密”

为什么执行自己的程序要在前面加./

Linux里面常用的查看文本小技巧

Linux生产环境上,最常用的一套“Sed“技巧

sed命令,后台开发必知命令 (qq.com)

常用的 Linux 命令和技巧!

10个高效Linux技巧及Vim命令对比


BASH

Linux Bash编程详细语法总结

『一网打尽』 Bash 常用命令


VIM

vim三种模式下的小技巧 - Linux学习

谁说 Vim 不好用?送你一个五彩斑斓的编辑器!

Coding效率提升,15张 Vim 速查表奉上!

8个技巧让Vim菜鸟变专家

Vim高手,从来不用鼠标

10款好用的Vim插件,你知道几个?

30个Vim常用命令


SHELL

学习笔记之Shell脚本的输出重定向 - 浩然119 - 博客园

学习笔记之Linux Shell脚本教程:30分钟玩转Shell脚本编程 - 浩然119 - 博客园

编写可靠Linux shell脚本的八个建议

Linux Shell的18条常用命令整理 - Linux学习

  • https://mp.weixin.qq.com/s/mNSXpKzMpMcP3V6Rf6Nzcg

10 个实战与面试【常用 Shell 脚本】编写

Linux Shell 基础 -- 总结几种括号、引号的用法

一份Linux shell“圣经”收好

Linux Shell 时间运算以及时间差计算方法!


常用命令

Linux 命令大全 | 菜鸟教程

bash - enter bash command line from virtual environment (e.g. conda)

bg - Runs jobs in the background

cat 文件名 输出文件内容到基本输出(屏幕 or 加>fileName 到另一个文件)
cb 格式化源代码
cd 进入目录
chmod //change mode,改变文件的权限
clear - clear the terminal screen
cp copy
date 当前的时间和日期
diff 比较文件的差异
echo 显示指定文本
echo $abc 在变量赋值之后,只需在变量前面加一个$去引用.
find - Linux find命令用来在指定目录下查找文件。
grep - search text

hostname

  • FunctionGet or set hostname or DNS domain name
  • Syntaxhostname [-v] [-a] [--alias] [-d] [--domain] [-f] [--fqdn] [-A] [--all-fqdns] [-i] [--ip-address] [-I] [--all-ip-addresses] [--long] [-s] [--short] [-y] [--yp] [--nis]

htop -u my_username

ldd

less

  • https://en.wikipedia.org/wiki/Less_(Unix)
  • less is a terminal pagerprogram on UnixWindows, and Unix-like systems used to view (but not change) the contents of a text file one screen at a time. It is similar to more, but has the extended capability of allowing both forward and backward navigation through the file. Unlike most Unix text editors/viewers, less does not need to read the entire file before starting, resulting in faster load times with large files.
lint 语法检查程序
ln
locate - find files
ls dir
  • ls -l my_link.txt
    • verify the symlink
man help
mkdir 创建目录
more 显示文件
more type
mv 改文件名 /移动文件
passwd 更改密码
ps 查看当前进程状况
pushd and popd
pwd 显示目录路径命令
rm -rf 删除非空文件夹
rmdir 删除目录
sudo
  • https://www.howtogeek.com/447906/how-to-control-sudo-access-on-linux/#:~:text=%20How%20to%20Control%20sudo,file.%20It%20is...%20More
  • The sudo command lets you run commands on Linux as though you were someone else, such as rootsudo also lets you control who can access root's capabilities, with granularity. Give users full access or let them use a small subset of commands.
  • Originally, it was called “superuser do”, because you could do things as the superuser. Its scope has been widened now, and you can use sudo to execute a command as though you were any user. It has been renamed to reflect that new functionality. It is now called “substitute user do.”
  • To use sudo to run a command as another user, we need to use the -u (user) option. Here, we’re going run the whoami command as the user mary. If you use the sudo command without the -u option, you’ll run the command as root.
    • $ sudo -u mary whoami
  • You can use the sudo command to log in as another user without knowing their password. You’ll be prompted for your own password. We need to use the -i (login) option.
    • $ sudo -i -u mary
top
who 你的用户名和终端类型
定义变量 name=abc? (bash/pdksh) || set name = abc (tcsh)

What's localhost ?
How to extract .tar.gz Files ?

How to fix Address already in use ?

  • c - Bind failed: Address already in use - Stack Overflow
  • https://stackoverflow.com/questions/15198834/bind-failed-address-already-in-use
  • Use netstat -tulpn to display the processes
  • Use netstat -pnlt | grep ':1' to find which process use the port 1
  • kill -9 <pid> This will terminate the process

How to view the contents of tar.gz file without extracting it ?

How to hide and view hidden files / directories ?

How to view system environment variables ?

  • $ env

How to add and view path environment variable ?

  • $ export PATH=~/folder/:${PATH}
  • $ echo $PATH

How to add and use alias ?

  • $ alias test=~/bin/test
  • $ test

How to find and kill process ?

How to kill a CLOSE_WAIT socket connection ?

  • linux - How do I remove a CLOSE_WAIT socket connection - Stack Overflow
  • $ netstat -an --tcp --program
    • Active Internet connections (servers and established)
    • Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    • tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN -
    • tcp 11 0 127.0.0.1:15540 127.0.0.1:51974 CLOSE_WAIT -
  • $ ss --tcp state CLOSE-WAIT --kill
    • Recv-Q Send-Q Local Address:Port Peer Address:Port

How to reverse-i-search back to search commands in history ?

  • Ctrl + r

How to check memory usage ?

How to check disk usage ?

What's .bashrc ?

posted on 2015-02-28 16:25  浩然119  阅读(1265)  评论(0编辑  收藏  举报