Ubuntu

如何高效的用 Linux 命令行管理网络?

有些话、适合烂在心里 提交于 2021-01-27 18:20:33
作者 | JackTian 来源 | 公众号:杰哥的IT之旅(ID:Jake_Internet) 前言 在日常工作中,我们所经常使用的 Linux 服务器操作系统,无论是要查看网络设备的信息、管理网络接口、下载文件、调试网络问题还是查看网络的统计数据,都可以在终端下用命令来完成。 ifconfig / ip a 命令 ifconfig 与 ip a 是类似的,用于输出网络接口配置、调优等各种选项,可便捷的查看 IP 地址和其它网络接口的信息以及查看所有启用的网络接口的状态、名字或指定网络接口名字来显示一个接口的信息。 # ip a # ifconfig # ifconfig ens32 ifdown / ifup ifdown 和 ifup 跟命令 ifconfig down 和 ifconfig up 功能是一致的,主要用来给指定网络接口名来操作启用或禁用的状态,在 Ubuntu 上需要 root 权限可使用 sudo 来执行。 # sudo ifdown eth0 # sudo ifup eth0 ping ping 发送报文到指定的 IP 地址,可测试联通性,使用 -c 参数,可以指定发送报文包的个数。 执行 ping 命令将使用 ICMP 传输协议。 如能 ping 通将进行输出要求响应的信息,ping 不通时,将显示没有路由或拒绝等相关性的响应信息

Trying to install DOCKER GPG key recieving error: Curl: option '-' is unknown

空扰寡人 提交于 2021-01-27 18:04:30
问题 I'm trying to add the docker GPG key, and I'm unable to do so because it doesn't recognize that i'm trying to pipe the GPG key into the APT KEY I'm getting back the following error (see picture): curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 回答1: You seems to have a Keyboard mapping issue where the pipe | turns into a redirect symbol > . It seems more related to Digital Ocean and their Console itself where your droplet is hosted - by the look of the image in the

Trying to install DOCKER GPG key recieving error: Curl: option '-' is unknown

时光怂恿深爱的人放手 提交于 2021-01-27 18:00:01
问题 I'm trying to add the docker GPG key, and I'm unable to do so because it doesn't recognize that i'm trying to pipe the GPG key into the APT KEY I'm getting back the following error (see picture): curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 回答1: You seems to have a Keyboard mapping issue where the pipe | turns into a redirect symbol > . It seems more related to Digital Ocean and their Console itself where your droplet is hosted - by the look of the image in the

Allow Docker strategy in Openshift 3

旧时模样 提交于 2021-01-27 15:57:51
问题 I'm trying to understand the new OpenShift system and now we have push images to it. I know a little about Docker and I wanted to use it. I read in some places that we can chose Docker as a strategy. So basically I created an image based on httpd and a basic html file and tried to push it with the following command from the project folder: oc new-app . --strategy=docker I get this message on console: error: buildconfigs.build.openshift.io "openshift" is forbidden: build strategy Docker is not

Compiling MQL4 via command line through wine metaeditor.exe

霸气de小男生 提交于 2021-01-27 14:16:01
问题 I'm trying to get to a point where I can compile/syntax check via command line so I can avoid using metaeditor for code management. I'm using this command (also attempted with /s and /log): wine metaeditor.exe /compile:"MQL4/Experts/MACD Sample.mq4" which is from this MQL4 related question. I currently get this output and no files generated: fixme:advapi:RegisterTraceGuidsW (0x1800f935, 0x640360, {9b18bff9-915e-4cc1-9c3e-f4ac112cb36c}, 1, 0x180b1ba0, (null), (null), 0x640378): stub fixme

Linking OpenCV 4.1.0, include works, libs doesn't

只谈情不闲聊 提交于 2021-01-27 13:52:12
问题 After changing Ubuntu from 16.04 to 18.04 and OpenCV from 3.4.1 to 4.1.0 i can't compiled... anything Step by step: I downloaded source code from github, set those flags: cmake -D CMAKE_BUILD_TYPE=RELEASE -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules cmake -DENABLE_PRECOMPILED_HEADERS=OFF -DBUILD_opencv_cudacodec=OFF -D OPENCV_GENERATE_PKGCONFIG=ON -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_CUDA=ON -D WITH_TBB=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -D WITH_QT

Persist environment variable for a Rails app on Digital Ocean

左心房为你撑大大i 提交于 2021-01-27 12:37:55
问题 How can I persist environment variables for my Rails app hosted on Digital Ocean? Locally I run a bash script with commands like, export SERVICE_USERNAME='somekey' . But when I try to manually run export SERVICE_USERNAME='somekey' , while ssh-ing onto the Ubuntu server, they only last for the session... which is not helpful for my app. How can I persist environment variables on Digital Ocean? Is there a simple way? 回答1: You can either set your environment variables to the user (in the ~/

Persist environment variable for a Rails app on Digital Ocean

我只是一个虾纸丫 提交于 2021-01-27 12:34:47
问题 How can I persist environment variables for my Rails app hosted on Digital Ocean? Locally I run a bash script with commands like, export SERVICE_USERNAME='somekey' . But when I try to manually run export SERVICE_USERNAME='somekey' , while ssh-ing onto the Ubuntu server, they only last for the session... which is not helpful for my app. How can I persist environment variables on Digital Ocean? Is there a simple way? 回答1: You can either set your environment variables to the user (in the ~/

gnutls_handshake() failed: Handshake failed GIT

雨燕双飞 提交于 2021-01-27 10:24:53
问题 Everything was working fine but suddenly I am getting the error: fatal: unable to access 'https://username@bitbucket.org/name/repo_name.git/': gnutls_handshake() failed: Handshake failed I am getting this on my computer as well as an EC2 instance. When I tried on another computer then it is working fine there. I have tried many solutions from Stackoverflow and from other forums. but nothing worked! On the computer, os is Linux mint 17 and on EC2 instance, Ubuntu 14.04.6 LTS. What can be the

gnutls_handshake() failed: Handshake failed GIT

老子叫甜甜 提交于 2021-01-27 10:24:40
问题 Everything was working fine but suddenly I am getting the error: fatal: unable to access 'https://username@bitbucket.org/name/repo_name.git/': gnutls_handshake() failed: Handshake failed I am getting this on my computer as well as an EC2 instance. When I tried on another computer then it is working fine there. I have tried many solutions from Stackoverflow and from other forums. but nothing worked! On the computer, os is Linux mint 17 and on EC2 instance, Ubuntu 14.04.6 LTS. What can be the