随笔分类 - linux
摘要:[miaojiang@localhost ~]$ sudo ls /root We trust you have received the usual lecture from the local System Administrator. It usually boils down to thes
阅读全文
摘要:[root@localhost ~]# su miaojiang [miaojiang@localhost root]$ env | egrep "USER|MAIL|PWD|LOGNAME" USER=miaojiang MAIL=/var/spool/mail/root PWD=/root LO
阅读全文
摘要:[root@localhost ~]# whoami root [root@localhost ~]# w 21:22:19 up 20 min, 3 users, load average: 0.00, 0.01, 0.01 USER TTY FROM LOGIN@ IDLE JCPU PCPU
阅读全文
摘要:[root@localhost ~]# ls -l /home/ total 0 drwx . 2 liuxin liuxin 62 Jan 8 22:16 liuxin drwx . 2 miaojiang miaojiang 62 Jan 8 22:31 miaojiang [root@loca
阅读全文
摘要:[root@localhost demo]# cat demo1.txt 1 2 3 4 5 6 7 8 9 10 11 [root@localhost demo]# xargs < demo1.txt 1 2 3 4 5 6 7 8 9 10 11 [root@localhost demo]# x
阅读全文
摘要:[root@localhost ~]# find /demo -maxdepth 1 -name "*.txt" /demo/aaa.txt /demo/bbb.txt /demo/c.txt /demo/alex.txt /demo/sort.txt /demo/sort1.txt /demo/i
阅读全文
摘要:[root@localhost demo]# w 08:59:43 up 11 min, 1 user, load average: 0.00, 0.01, 0.01 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root pts/0 192.168.0.105
阅读全文
摘要:[root@localhost demo]# cat luffy.txt 10.0.0.1 10.0.0.1 10.0.0.51 10.0.0.51 10.0.0.1 10.0.0.1 10.0.0.51 10.0.0.31 10.0.0.51 10.0.0.12 10.0.0.5 10.0.0.5
阅读全文
摘要:[root@localhost demo]# cat luffy.txt 10.0.0.1 10.0.0.1 10.0.0.51 10.0.0.51 10.0.0.1 10.0.0.1 10.0.0.51 10.0.0.31 10.0.0.51 10.0.0.12 10.0.0.5 10.0.0.5
阅读全文
摘要:[root@localhost demo]# cat alex.txt my name is alex. he love linux. he like eat apple. [root@localhost demo]# cut -c 4 alex.txt #截取每行的第4个字符 n l l [roo
阅读全文
摘要:[root@localhost ~]# man cp #enter向下,q退出 [root@localhost ~]# echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin [root@localhost ~]#
阅读全文
摘要:[root@localhost demo]# rm a.txt #删除普通文件 rm: remove regular empty file ‘a.txt’? n [root@localhost demo]# rm a.txt b.txt #一次性删除多个文件 rm: remove regular e
阅读全文
摘要:[root@localhost demo]# ls aaa a.txt [root@localhost demo]# mv ./a.txt ./aaa #移动文件到另一个文件夹 [root@localhost demo]# ls aaa a.txt [root@localhost demo]# ls
阅读全文
摘要:[root@localhost demo]# cp 1.txt ./aaa/ #复制放入其他文件夹,保留源文件名 [root@localhost demo]# ls aaa/ 1.txt [root@localhost demo]# cp 1.txt ./aaa/2.txt #复制文件放入其他文件夹
阅读全文
摘要:[root@localhost bbb]# touch 1.txt #创建文件 [root@localhost bbb]# ll total 0 -rw-r--r--. 1 root root 0 Dec 29 22:58 1.txt [root@localhost bbb]# touch {2.t
阅读全文
摘要:[root@localhost demo]# mkdir demo1 #创建文件夹 [root@localhost demo]# mkdir {aaa,bbb,ccc,ddd} #同时创建多个同级目录的文件夹 [root@localhost demo]# ll total 0 drwxr-xr-x.
阅读全文
摘要:[root@localhost /]# cd /etc #更改目录 [root@localhost etc]# cd .. #上一级目录 [root@localhost /]# cd - #上一次的工作目录 /etc [root@localhost etc]# cd ~ #当前登录的用户家目录 [r
阅读全文
摘要:[root@localhost ~]# cat /etc/resolv.conf # Generated by NetworkManager nameserver 8.8.8.8 [root@localhost ~]# hostname localhost.localdomain [root@loc
阅读全文
摘要:步骤1: 关闭防火墙 关闭selinux,0表示临时关闭 永久关闭selinux,需要重启机器才能生效 步骤2: 查看本地yum源是不是好着的 步骤3: 软件三部曲 查看talnet相关的软件包 检查是否安装xinetd服务 同时安装talnet服务端和xinetd两个软件包 确认是否安装成功 查看
阅读全文