- 1. Working directories
- 2. 电子书搜索引擎
- 3. Analysis of HSV
- 4. SARS-CoV-2 Variant Classifications and Definitions
- 5. Biden’s Speech to Congress: Full Transcript - The New York Times
- 6. Full transcript of Joe Biden’s inauguration speech - BBC News
- 7. Termux
- 7.1. 简介
- 7.2. 基本操作
- 7.3. 常用快捷键
- 7.4. 基本命令
- 7.5. 目录环境结构
- 7.6. 更换国内源
- 7.7. 安装基本工具
- 7.8. Termux优化
- 7.9. 管理员身份
- 7.10. 信息安全
- 7.11. Python环境部署
- 7.12. nodejs
- 7.13. MariaDB(MySQL)安装
- 7.14. tmux
- 7.15. php
- 7.16. nginx
- 7.17. nginx解析PHP
- 7.18. 搭建WordPress
- 7.19. 搭建hexo博客
- 7.20. termux ssh 连接电脑
- 7.21. 电脑ssh连接Termux
- 7.22. 使用Aria2打造自己的下载工具
- 7.23. 多功能文件分享
- 7.24. Termux-api
- 7.25. 一些无聊的尝试
- 7.26. 其他没有写到的内容
- 7.27. 总结
- 8. Termux 高级终端安装使用配置教程 | 国光
- 8.1. 版权声明
- 8.2. 学习资源
- 8.3. Termux 简介
- 8.4. 基本操作
- 8.5. 基础知识
- 8.6. 进阶配置
- 8.7. 开发环境
- 8.8. 网站搭建
- 8.9. 系统安装
- 8.10. 极客行为
- 8.11. 信息安全
- 8.12. 官方插件
- 8.12.1. Termux:API
- 8.12.1.1. 准备工作
- 8.12.1.2. 获取设备信息相关
- 8.12.1.3. 调用设置设备相关
- 8.12.1.3.1. 调整屏幕亮度
- 8.12.1.3.2. 拍摄照片
- 8.12.1.3.3. 获取与设置剪贴板
- 8.12.1.3.4. 调用系统下载器
- 8.12.1.3.5. 调用指纹传感器
- 8.12.1.3.6. 调用红外发射
- 8.12.1.3.7. 调用手机定位
- 8.12.1.3.8. 播放媒体文件
- 8.12.1.3.9. 调用麦克风
- 8.12.1.3.10. 显示系统通知
- 8.12.1.3.11. 拨打电话
- 8.12.1.3.12. 临时窗口通知
- 8.12.1.3.13. 开关闪光灯
- 8.12.1.3.14. 调用 tts 语音引擎
- 8.12.1.3.15. 震动手机
- 8.12.1.3.16. 更换手机壁纸
- 8.12.1.3.17. 开启关闭 WiFi
- 8.12.1.4. 交互对话框部件
- 8.12.2. Termux:Boot
- 8.12.3. Termux:Float
- 8.12.4. Termux:Styling
- 8.12.5. Termux:Widget
- 8.12.1. Termux:API
- 8.13. 无聊专区
- 8.14. 文章总结
Working directories
1 | graph TD; |
1 | npm i hexo-filter-mermaid-diagrams-v |
1 | mkdir HIV Blog lHT_Media BigData |
- hexo mermaid 使用 - Google Search
- 在hexo上使用mermaid流程图 | coding.F10 - Coding的琐碎日志
- Markdown的时序图、流程图、和甘特图+Hexo的相关配置 - 云+社区 - 腾讯云, very good instruction of mermaid syntax
- Hexo中手动加上对于graphviz和mermaid的支持 | 退思园
- hexo 支持流程图 - mermaid | Jun
- Hexo–第二弹 - 简书
- 3-hexo支持mermaid图表 | 叶落阁
- Hexo中插入mermaid diagrams | Yu’s Notes
- hexo-filter-mermaid-diagrams-v - npm
- mslxl/hexo-mermaid-diagrams: Hexo plugin for rendering mermaid diagrams by puppeteer.
- webappdevelp/hexo-filter-mermaid-diagrams: mermaid diagrams for hexo
- litten/hexo-theme-yilia: 一个简洁优雅的hexo主题 A simple and elegant theme for hexo.
- Documentation | Hexo
eBook download
- Others/小书屋2019及未归类/2019.4/2019.4.22/国防论(精制) - qaq - OneManager
- 《沙丘系列科幻小说(单本分册,共6本,英文版)》 [美]弗兰克·赫伯特|pdf678网|PDF,azw3,TXT,mobi,epub格式Kindle电子书百度云网盘资源免费下载
电子书搜索引擎
鸠摩搜书 Kindle 资源搜索引擎
BOOKZZ/Library Genesis 英语教材/原版书搜索引擎
The National Academies Press 英语学术资源,价格高昂
Gutenberg:www.gutenberg.org 古腾堡项目,Kindle/pdf 古籍名著 HathiTrust :www.hathitrust.org 数字图书馆 Kindle伴侣:www.kindlefere.com 免费资源,付费资源(The Economists,The Atlantic,Times) Free eBooks For Your Kindle or Other eReader QumranShop 电子书搜索引擎目录
Analysis of HSV
1 | graph TD |
1 | {% mermaid %} |
1 | cd /media/ht/ht_5T/Database/Virus/Herpesvirus/HSV/20210501 |
Extract sequences longer than 100K
- HSV-1_LNG.fas, 318 sequences totally. 310 unique sequences after removing duplicated ones
- HSV-2_LNG.fas, 330 sequences totally
SARS-CoV-2 Variant Classifications and Definitions
- SARS-CoV-2 Variant Classifications and Definitions - Google Search
- Tracking SARS-CoV-2 Spike mutations
- The effects of virus variants on COVID-19 vaccines
- Download as PDF - Wikipedia
- SARS-CoV-2 variants
- WHO | SARS-CoV-2 Variants
- COVID research updates: One vaccine dose can nearly halve transmission risk
- SARS-CoV-2 Variants of Concern | CDC
- About Variants of the Virus that Causes COVID-19 | CDC
- 让人担忧的SARS-CoV-2变种 | CDC
Biden’s Speech to Congress: Full Transcript - The New York Times
Biden’s Speech to Congress: Full Transcript
President Biden unveiled a major proposal to invest in education and families, describing it as “a blue-collar blueprint to build America.”
President Biden delivered an address to a joint session of Congress at the Capitol on Wednesday night.
President Biden delivered an address to a joint session of Congress at the Capitol on Wednesday night.Credit…Doug Mills/The New York Times
April 29, 2021
President Biden delivered an address to a joint session of Congress on Wednesday. Because of the pandemic, Mr. Biden spoke to a socially distanced audience of less than 200 lawmakers and officials, a small fraction of the packed audience that typically attends such an address.
The following is a transcript of his remarks.
PRESIDENT BIDEN:
Thank you. Thank you, thank you, thank you. It’s good to be back. As Mitch and Chuck will understand, it’s good to be almost home, down the hall. Anyway, thank you all.
Madam Speaker, Madam Vice President. No president has ever said those words from this podium. No president has ever said those words. And it’s about time. The first lady, I’m her husband. Second gentleman. Chief justice. Members of the United States Congress and the cabinet, distinguished guests. My fellow Americans.
While the setting tonight is familiar, this gathering is just a little bit different. A reminder of the extraordinary times we’re in. Throughout our history, presidents have come to this chamber to speak to Congress, to the nation and to the world. To declare war, to celebrate peace, to announce new plans and possibilities.
Tonight, I come to talk about crisis and opportunity. About rebuilding the nation, revitalizing our democracy, and winning the future for America. I stand here tonight one day shy of the 100th day of my administration. A hundred days since I took the oath of office, lifted my hand off our family Bible and inherited a nation — we all did — that was in crisis. The worst pandemic in a century. The worst economic crisis since the Great Depression. The worst attack on our democracy since the Civil War. Now, after just 100 days, I can report to the nation, America is on the move again. Turning peril into possibility, crisis into opportunity, setbacks to strength.
We all know life can knock us down. But in America, we never, ever, ever stay down. Americans always get up. Today, that’s what we’re doing. America is rising anew. Choosing hope over fear, truth over lies and light over darkness. After 100 days of rescue and renewal, America is ready for a takeoff, in my view. We’re working again, dreaming again, discovering again and leading the world again. We have shown each other and the world that there’s no quit in America. None.
One hundred days ago, America’s house was on fire. We had to act. Thanks to the extraordinary leadership of Speaker Pelosi, Majority Leader Schumer and the overwhelming support of the American people — Democrats, Independents and Republicans — we did act. Together, we passed the American Rescue Plan, one of the most consequential rescue packages in American history. We’re already seeing the results.
We’re already seeing the results. After I promised we would get 100 million Covid-19 vaccine shots into people’s arms in 100 days, we will have provided over 220 million Covid shots in those hundred days, thanks to all the help of all of you. We’re marshaling with your help, everyone’s help, we’re marshaling every federal resource. We’ve gotten vaccinations to nearly 40,000 pharmacies and over 700 community health centers where the poorest of the poor can be reached. We’re setting up community vaccination sites, developing mobile units to get to hard-to-reach communities. Today, 90 percent of Americans now live within five miles of a vaccination site. Everyone over the age of 16, everyone, is now eligible to get vaccinated right now, right away. Go get vaccinated, America. Go and get the vaccination. They’re available. You’re eligible now.
When I was sworn in on Jan. 20, less than 1 percent of the seniors in America were fully vaccinated against Covid-19. One hundred days later, 70 percent of seniors in America over 65 are protected, fully protected. Senior deaths from Covid-19 are down 80 percent since January, down 80 percent, because of all of you.
And more than half of all the adults in America have gotten at least one shot. The mass vaccination center in Glendale, Ariz., I asked the nurse, I said, “What’s it like?” She looked at me, she said, “It’s like every shot is giving a dose of hope” was her phrase, a dose of hope.
A dose of hope for an educator in Florida, who has a child suffering from an autoimmune disease, wrote to me, said she’s worried — that she was worried about bringing the virus home. She said she then got vaccinated at a large site, in her car. She said she sat in her car when she got vaccinated and just cried, cried out of joy, and cried out of relief.
Parents seeing the smiles on the kids’ faces, for those who are able to go back to school because the teachers and the school bus drivers and the cafeteria workers have been vaccinated. Grandparents, hugging their children and grandchildren, instead of pressing hands against the window to say goodbye. It means everything. Those things mean everything.
You know, there’s still — you all know it, you know it better than any group of Americans — there’s still more work to do to beat this virus. We can’t let our guard down. But tonight, I can say, because of you, the American people, our progress these past 100 days against one of the worst pandemics in history has been one of the greatest logistical achievements, logistical achievements this country has ever seen. What else have we done in those first 100 days?
We kept our commitment, Democrats and Republicans, of sending $1,400 rescue checks to 85 percent of American households. We’ve already sent more than 160 million checks out the door. It’s making a difference. You all know it when you go home. For many people, it’s making all the difference in the world.
A single mom in Texas who wrote me, she said she couldn’t work. She said the relief check put food on the table and saved her and her son from eviction from their apartment. A grandmother in Virginia who told me she immediately took her granddaughter to the eye doctor, something she said she put off for months because she didn’t have the money. One of the defining images, at least from my perspective, in this crisis has been cars lined up, cars lined up for miles. And not people just barely able to start those cars. Nice cars, lined up for miles, waiting for a box of food to be put in their trunk.
I don’t know about you, but I didn’t ever think I would see that in America. And all of this is through no fault of their own. No fault of their own, these people are in this position. That’s why the rescue plan is delivering food and nutrition assistance to millions of Americans facing hunger. And hunger is down sharply already.
We’re also providing rental assistance — you all know this, but the American people, I want to make sure they understand. Keeping people from being evicted from their homes. Providing loans to small businesses that reopen and keep their employees on the job. During these hundred days, an additional 800,000 Americans enrolled in the Affordable Care Act when I established a special sign-up period to do that — 800,000 in that period. We’re making one of the largest one-time-ever investments, ever, in improving health care for veterans. Critical investments to address the opioid crisis. And maybe most importantly, thanks to the American Rescue Plan, we’re on track to cut child poverty in America in half this year.
And in the process, while this is all going on, the economy created more than 1,300,000 new jobs in 100 days. More jobs in the first — more jobs in the first 100 days than any president on record. The International Monetary Fund — the International Monetary Fund is now estimating our economy will grow at a rate of more than 6 percent this year. That will be the fastest pace of economic growth in this country in nearly four decades. America’s moving, moving forward. But we can’t stop now.
We’re in competition with China and other countries to win the 21st century. We’re at a great inflection point in history. We have to do more than just build back better — than just build back, we have to build back better. We have to compete more strenuously than we have. Throughout our history, if you think about it, public investment in infrastructure has literally transformed America, our attitudes as well as our opportunities. The transcontinental railroad, interstate highways, united two oceans and brought a totally new age of progress to the United States of America.
Universal public schools and college aid opened wide the doors of opportunity. Scientific breakthroughs took us to the moon. Now we’re on Mars, discovering vaccines, gave us the internet and so much more. These are investments we made together as one country. And investments that only the government was in a position to make. Time and again, they propel us into the future. That’s why I propose the American Jobs Plan, a once-in-a-generation investment in America itself. This is the largest jobs plan since World War II.
It creates jobs to upgrade our transportation infrastructure. Jobs modernizing our roads, bridges, highways. Jobs building ports and airports, rail corridors, transit lines. It’s clean water. And today, up to 10 million homes in America and more than 400,000 schools and child care centers have pipes with lead in them, including drinking water, a clear and present danger to our children’s health. The American Jobs Plan creates jobs replacing 100 percent of the nation’s lead pipes and service lines so every American can drink clean water.
In the process it will create thousands and thousands of good-paying jobs. It creates jobs connecting every American with high-speed internet, including 35 percent of the rural America that still doesn’t have it. This is going to help our kids and our businesses succeed in the 21st century economy. And I’m asking the vice president to lead this effort, if she would, because I know it will get done.
It creates jobs, building a modern power grid. Our grids are vulnerable to storms, hacks, catastrophic failures — with tragic results, as we saw in Texas and elsewhere during the winter storms. The American Jobs Plan will create jobs that lay thousands of miles of transmission lines needed to build a resilient and fully clean grid. We can do that.
Look, the American Jobs Plan will help millions of people get back to their jobs and back to their careers. Two million women have dropped out of the work force during this pandemic. Two million. And too often, because they couldn’t get the care they needed to care for their child or care for an elderly parent who needs help; 800,000 families are on the Medicare waiting list right now to get home care for their aging parent or loved one with disability. If you think it’s not important, check out in your own district, Democrat or Republican. Democrat or Republican voters.
Their great concern, almost as much as the children, is taking care of an elderly loved one who can’t be left alone. Medicaid contemplated it, but this plan is going to help those families and create jobs for our caregivers with better wages and better benefits, continuing a cycle of growth.
For too long we’ve failed to use the most important word when it comes to meeting the climate crisis: Jobs. Jobs. Jobs. For me, when I think climate change, I think jobs. The American Jobs Plan will put engineers and construction workers to work building more energy efficient buildings and homes. Electrical workers, I.B.E.W. members, installing 500,000 charging stations along our highways so we can own the electric car market. Farmers, farmers planting cover crops so they can reduce the carbon dioxide in the air and get paid for doing it.
Look, think about it. There is simply no reason why the blades for wind turbines can’t be built in Pittsburgh instead of Beijing. No reason. None. No reason. So folks, there’s no reason why Americans — American workers can’t lead the world in the production of electric vehicles and batteries. There is no reason. We have the capacity. They’re best-trained people in the world. The American Jobs Plan is going to create millions of good-paying jobs, jobs Americans can raise a family on. As my dad would then say, with a little breathing room. And all the investments in the American Jobs Plan will be guided by one principle: Buy American. Buy American.
And I might note parenthetically, that does not violate any trade agreement. It’s been the law since the ’30s, buy American. American tax dollars are going to be used to buy American products, made in America, to create American jobs. That’s the way it’s supposed to be, and it will be in this administration. And I made it clear to all my cabinet people, their ability to give exemptions has been strenuously limited. It will be American products.
Now, I know some of you at home are wondering whether these jobs are for you. So many of you, so many of the folks I grew up with, feel left behind, forgotten, in an economy that’s so rapidly changing — it’s frightening. I want to speak directly to you, because if you think about it, that’s what people are most worried about. Can I fit in?
Independent experts estimate the American Jobs Plan will add millions of jobs and trillions of dollars to economic growth in the years to come. It is an eight-year program. These are good-paying jobs that can’t be outsourced. Nearly 90 percent of the infrastructure jobs created in the American Jobs Plan do not require a college degree. Seventy-five percent don’t require an associate’s degree. The American Jobs Plan is a blue-collar blueprint to build America. That’s what it is.
And I recognize something I’ve always said, in this chamber and the other, good guys and women on Wall Street. But Wall Street didn’t build this country. The middle class built the country. And unions built the middle class. So that’s why I’m calling on Congress to pass the Protect the Right to Organize Act, the PRO Act, and send it to my desk so we can support the right to unionize.
And by the way, while you’re thinking about sending things to my desk, let’s raise the minimum wage to $15. No one, no one working 40 hours a week, no one working 40 hours a week should live below the poverty line. We need to ensure greater equity and opportunity for women. And while we’re doing this, let’s get the Paycheck Fairness Act to my desk as well. Equal pay. It’s been much too long. And if you wonder whether it’s been too long, look behind me.
And finally, the American Jobs Plan will be the biggest increase in nondefense research and development on record. We’ll see more technological change — and some of you know more about this than I do — we’ll see more technological change this the next 10 years than we saw in the last 50. That’s how rapidly artificial intelligence, and so much more, is changing. And we’re falling behind the competition with the rest of the world.
Decades ago, we used to invest 2 percent of our gross domestic product in America, 2 percent of our gross domestic product in research and development. Today, Mr. Secretary, that’s less than 1 percent. China and other countries are closing in fast. We have to develop and dominate the products and technologies of the future. Advanced batteries, biotechnology, computer chips, clean energy.
The secretary of defense can tell you — and those of you who work in national security issues know, the defense department has an agency called DARPA, the Defense Advanced Research Projects Agency. The people who set up before I came here — and that’s been a long time ago — to develop breakthroughs that enhance our national security. That’s their only job. And it’s a semi-separate agency, it’s under the Defense Department. It’s led to everything from the discovery of the internet to GPS and so much more. It’s enhanced our security.
The National Institutes of Health, the N.I.H, I believe, should create a similar advanced research projects agency for health. And that would — here’s what it would do: It would have a singular purpose, to develop breakthroughs to prevent, detect and treat diseases like Alzheimer’s, diabetes and cancer. I’ll still never forget when we passed the cancer proposal in the last year as vice president, almost $9 million going to N.I.H. You’ll excuse the point of personal privilege. I’ll never forget you standing, Mitch, and saying, name it after my deceased son. It meant a lot.
But so many of us have deceased sons, daughters and relatives who died of cancer. I can think of no more worthy investment. I know of nothing that is more bipartisan. So let’s end cancer as we know it. It’s within our power. It’s within our power to do it.
Investments in jobs and infrastructure like the ones we’re talking about, have often had bipartisan support in the past. Vice President Harris and I meet regularly in the Oval Office with Democrats and Republicans to discuss the jobs plan. And I applaud a group of Republican senators who just put forward their own proposal. So let’s get to work. I wanted to lay out, before the Congress, my plan, before we go to into the deep discussions.
I would like to meet with those who have ideas that are different, that they think are better. I welcome those ideas. But the rest of the world is not waiting for us. I just want to be clear, from my perspective, doing nothing is not an option. Look, we can’t be so busy competing with one another that we forget the competition that we have with the rest of the world to win the 21st century.
Secretary Blinken can tell you, I spent a lot of time with President Xi — traveled over 17,000 miles with him, spent over 24 hours in private discussions with him. When he called congratulate, we had a two-hour discussion. He’s deadly earnest on becoming the most significant, consequential nation in the world. He and others, autocrats, think that democracy can’t compete in the 21st century with autocracies, because it takes too long to get consensus.
To win that competition for the future, in my view, we also need to make a once-in-a-generation investment in our families and our children. That’s why I introduced the American Families Plan tonight, which addresses four of the biggest challenges facing American families and, in turn, America. First is access to good education. This nation made 12 years of public education universal in the last century. It made us the best-educated, best-prepared nation in the world. It’s, I believe, the overwhelming reason that propelled us to where we got in the 20th century.
But the world’s caught up, or catching up. They’re not waiting. I would say parenthetically, if we were sitting down and put a bipartisan committee together and said, OK, we’re going to decide what we do in terms of government providing for free education, I wonder whether we’d think, as we did in the 20th century, that 12 years is enough in the 21st century. I doubt it. Twelve years is no longer enough today, to compete with the rest of the world in the 21st century. That’s why my American Families Plan guarantees four additional years of public education for every person in America, starting as early as we can.
The great universities in this country have conducted studies over the last 10 years. It shows that adding two years of universal, high-quality preschool for every 3-year-old and 4-year-old, no matter what background they come from, puts them in the position of being able to compete all the way through 12 years and increases exponentially their prospect of graduating and going on beyond graduation.
Research shows, when a young child goes to school — not day care — they’re far more likely to graduate from high school and go to college or something after high school. When you add two years of free community college on top of that, you begin to change the dynamic. We can do that. And we’ll increase Pell Grants and invest in historical Black colleges and universities, tribal colleges, minority serving institutions. The reason is, they don’t have the endowments.
But their students are just as capable of learning about cybersecurity, just as capable of learning about metallurgy — all the things that are going on that provide those jobs of the future. Jill is a community college professor who teaches today as first lady. She’s long said — if I heard it once, I’ve heard it a thousand times. “Joe, any country that out-educates us is going to outcompete us.” She’ll be deeply involved in leading this effort. Thank you, Jill.
Second thing we need, American Families Plan will provide access to quality, affordable child care. It will guarantee — what I’m proposing in legislation, it will guarantee that low- to middle-income families will pay no more than 7 percent of their income for high-quality care for children up to the age of 5. The most hard-pressed working families won’t have to spend a dime.
Third, the American Families Plan will finally provide up to 12 weeks of medical leave, paid medical leave. We’re one of the few industrial countries in the world — no one should have to choose between a job and a paycheck or taking care of themselves or their loved ones, or their parent or spouse or child.
And fourth, the American Family Plan puts directly into the pockets of millions of Americans. In March, we expanded a tax credit for every child in a family, up to $3,000 per child if they’re under 6 years of age — excuse me, under, over 6 years of age — and $3,600 for children over 6 years of age. With two parents, two kids, that’s $7,200 in their pockets they’re getting to help taking care of your family.
And that will help more than 65 million children and help cut child care poverty in half. We can afford it. We did that in the last piece of legislation we passed. Let’s extend that child care tax credit at least through the end of 2025. The American Rescue Plan lowered health care premiums for nine million Americans who buy their coverage under the Affordable Care Act. I know that’s really popular on this side of the aisle. But let’s make that provision permanent so their premiums don’t go back up.
In addition to my families plan, I’m going to work with Congress to address this year other critical priorities for American families. The Affordable Care Act has been a lifeline for millions of Americans, protecting people with pre-existing conditions, protecting women’s health. The pandemic has demonstrated how badly, how badly it’s needed. Let’s lower deductibles for working families in the Affordable Care Act and let’s lower prescription drug costs.
We know how to do this. The last president had that as an objective. We all know how outrageously expensive drugs are in America. In fact, we pay the highest prescription drug prices of anywhere in the world right here in America. Nearly three times, for the same drug nearly three times what other countries pay. We have to change that. And we can. Let’s do what we talked about for all the years I was down here in this body, in Congress. Let’s give Medicare the power to save hundreds of billions of dollars by negotiating lower drug prescription prices.
By the way, it won’t just — it won’t just help people on Medicare. It will lower prescription drug costs for everyone. And the money we save, which is billions of dollars, can go to strengthen the Affordable Care Act and expand Medicare coverage benefits without costing taxpayers an additional penny. It’s within our power to do it. Let’s do it now. We talked about it long enough, Democrats and Republicans. Let’s get it done this year.
This is all about a simple premise: Health care should be a right, not a privilege, in America. So how do we pay for my jobs and family plan? I made it clear, we can do it without increasing the deficit. Let’s start with what I will not do. I will not impose any tax increase on people making less than $400,000. But it’s time for corporate America and the wealthiest 1 percent of Americans to just begin to pay their fair share. Just their fair share.
Sometimes I have arguments with my friends in the Democratic Party. I think you should be able to become a billionaire or a millionaire. But pay your fair share. Recent studies show that 55 of the nation’s biggest corporations paid zero federal tax last year. Those 55 corporations made in excess of $40 billion in profit. A lot of companies also evade taxes through tax havens in Switzerland and Bermuda and the Cayman Islands. And they benefit from tax loopholes and deductions for offshoring jobs and shifting profits overseas. It’s not right.
We’re going to reform corporate taxes so they pay their fair share and help pay for the public investments their businesses will benefit from as well. We’re going to reward work, not just wealth. We take the top tax bracket for the wealthiest 1 percent of Americans, those making over $400,000 or more, back up to where it was when George W. Bush was president, when he started, 39.6 percent. That’s where it was when George W. was president.
We’re going to get rid of the loopholes that allow Americans to make more than $1 million a year and pay a lower tax rate on their capital gains than Americans who receive a paycheck. We’re only going to affect three-tenths of 1 percent of all Americans by that action. Three-tenths of 1 percent. The I.R.S. is going to crack down on millionaires and billionaires who cheat on their taxes. It’s estimated to be billions of dollars by think tanks left, right and center.
I’m not looking to punish anybody. But I will not add a tax burden, additional tax burden on the middle class of this country. They’re already paying enough. I believe what I propose is fair, fiscally responsible, and it raises revenue to pay for the plans I propose and will create millions of jobs that will grow the economy and enhance our financial standing in the country. And here some would say they don’t want to raise taxes on the wealthiest 1 percent, or corporate America. Ask them, whose taxes do you want to raise? Instead, whose are you going to cut?
Look, the big tax cut of 2017. Remember, it was supposed to pay for itself — that was how it was sold — and generate vast economic growth. Instead, it added $2 trillion to the deficit. It was a huge windfall for corporate America and those at the very top. Instead of using the tax saving to raise wages and invest in research and development, it poured billions of dollars into the pockets of C.E.O.s. In fact the pay gap between C.E.O.s and their workers is now among the largest in history. According to one study, C.E.O.s make 320 times what the average worker in a corporation makes. It used to be below 100.
The pandemic has only made things worse. Twenty million Americans lost their job in the pandemic, working- and middle-class Americans. At the same time, roughly 650 billionaires in America saw their net worth increase by more than $1 trillion, in the same exact period. Let me say it again. 650 people increased their wealth by more than $1 trillion during this pandemic and they’re now worth more than $4 trillion. My fellow Americans, trickle-down, trickle-down economics has never worked. It’s time to grow the economy from the bottom and the middle out.
You know, there’s a broad consensus of economists left, right and center, and they agree what I’m proposing will create millions of jobs and generate historic economic growth. These are among the highest-value investments we can make as a nation. I’ve often said our greatest strength is the power of our example, not just the example of our power. My conversations with world leaders — and I’ve spoken to 38, 40 of them now — I’ve made it known, I’ve made it known, that America is back.
You know what they say? The comment I hear most of all from them? They say: “We see America’s back, but for how long? But for how long?” My fellow Americans, we have to show not just that we’re back, but that we’re back to stay, and that we aren’t going to go alone. We’re going to do it by leading with our allies. No one nation can deal with all the crises of our time, from terrorism to nuclear proliferation, mass migration, cybersecurity, climate change, as well as what we’re experiencing now, pandemics.
There’s no wall high enough to keep any virus out. And our own vaccine supply, as it grows to meet our needs — and we’re meeting them — will become an arsenal for vaccines for other countries, just as America was the arsenal for democracy for the world. And in consequence, influenced the world. Every American will have access before that occurs, every American will have access to be fully covered by Covid-19 from the vaccines we have.
Look, the climate crisis is not our fight alone. It’s a global fight. The United States accounts, as all of you know, for less than 15 percent of carbon emissions. The rest of the world accounts for 85 percent. That’s why I kept my commitment to rejoin the Paris Accord, because if we do everything perfectly, it’s not going to matter. I kept my commitment to convene a climate summit right here in America with all the major economies of the world: China, Russia, India, European Union. I said I would do it in my first hundred days.
I want to be very blunt about it. I had — my intent was to make sure that the world could see that there was a consensus, that we are at an inflection point in history. The consensus is, if we act to save the planet, we can create millions of jobs and economic growth and opportunity to raise the standard of living of almost everyone around the world. If you’ve watched any of it — and you were all busy, I’m sure you didn’t have much time — that’s what virtually every nation said, even the ones who aren’t doing their fair share.
The investments I propose tonight also advance a foreign policy, in my view, that benefits the middle class. That means making sure that every nation plays by the same rules in the global economy, including China. In my discussions with President Xi, I told him we welcome the competition. We’re not looking for conflict.
But I made absolutely clear that we’ll defend America’s interests across the board. America will stand up to unfair trade practices that undercut workers and American industries like subsidies from state to state-owned operations and enterprises and the theft of American technology and intellectual property. I also told President Xi that we’ll maintain a strong relationship in the Indo-Pacific, just as we do for NATO and Europe. Not to start a conflict, but to prevent one.
I told him what I said to many world leaders, that America will not back away from our commitments, our commitments to human rights and our fundamental freedom and our alliances. I pointed out to him, no responsible American president could remain silent when basic human rights are being so blatantly violated. An American president has to represent the essence of what our country stands for.
America is an idea, the most unique idea in history. We are created, all of us equal. It is who we are. And we cannot walk away from that principle and in fact say we are dealing with the American idea. With regards to Russia, I know it concerns some of you. I made it clear to Putin that we are not going to seek — excuse me — escalation but their actions will have consequences if they turned out to be true. And they turned out to be true. So I responded directly and proportionally to Russia’s interference to our elections and the cyberattacks on our government and our business.
They did both of these things, and I told them we would respond, and we have. We’ll also cooperate when it is our mutual interest. We did it when we extended the New Start Treaty on nuclear arms and we are working on climate change. But he understands, we will respond. On Iran and North Korea, nuclear programs present serious threats to American security and the security of the world. We’re going to be working closely with our allies to address the threats posed by both of these countries through diplomacy as well as stern deterrence.
And American leadership meaning ending the forever war in Afghanistan. We have — we have, without hyperbole, the greatest fighting force in the history of the world. I am the first president in 40 years who knows what it means to have a son serving in a war zone. Today we have service members serving in the same war zone as their parents did. We have service members in Afghanistan who were not yet born on 9/11. The war in Afghanistan, as we remember the debates here, were never meant to be multigenerational undertakings of nation building.
We want Afghanistan to get terrorists, the terrorists who attacked us on 9/11. And we said we would follow Osama bin Laden to the gates of hell to do it. And if you’ve been to the Upper Kunar Valley, you’ve kind of seen the gates of hell. And we delivered justice to bin Laden. We degraded the terrorist threat in Afghanistan. And after 20 years of value — valor and sacrifice, it is time to bring those troops home.
Look, even as we do, we’ll maintain over the horizon the capacity to suppress future threats to the homeland. Make no mistake, in 20 years, terrorists — terrorism has been metastasized. The threat evolved way beyond Afghanistan. Those in the intelligence committees, the foreign relations committee, defense committees, you know well we have to remain vigilant against the threats to the United States wherever they come from. Al Qaeda and ISIS are in Yemen, Syria, Somalia, other places in Africa and the Middle East and beyond.
And we won’t ignore what our intelligence agents have determined to be the most lethal terrorist threat to our homeland today: White supremacy is terrorism. We are not going to ignore that either. My fellow Americans, look, we have to come together to heal the soul of this nation. It was nearly a year ago before her father’s funeral when I spoke to Gianna Floyd, George Floyd’s young daughter.
She’s a little tyke, so I was kneeling down to talk to her, so I can look at her in the eye. She looked at me, she said, “My daddy changed the world.” Well, after the conviction of George Floyd’s murderer, we can see how right she was — if, if we have the courage to act as a Congress. We have all seen the knee of injustice on the neck of Black Americans. Now is our opportunity to make some real progress.
The vast majority, men and women wearing the uniform and a badge, serve our communities and they serve them honorably. I know them, I know they want — I know they want to help meet this moment as well. My fellow Americans, we have to come together to rebuild trust between law enforcement and the people they serve, to root out systematic racism in our criminal justice system and enact police reform in George Floyd’s name that passed the House already.
I know Republicans have their own ideas and are engaged in productive discussions with Democrats in the Senate. We need to work together to find a consensus. But let’s get it done next month, by the first anniversary of George Floyd’s death. The country supports this reform and Congress should act. We have the giant opportunity to bend the arc of the moral universe toward justice, real justice.
And with the plans outlined tonight, we have a real chance to root out systematic racism that plagues America and American lives in other ways. A chance to deliver real equity: good jobs, good schools, affordable housing, clean air, clean water, the ability to generate wealth and pass it down to generations because you have an access to purchase a house. Real opportunities in the lives of more Americans — Black, white, Latino, Asian-Americans, Native Americans.
Look, I also want to thank the United States Senate for voting 94-1 to pass Covid-19 Hate Crimes Act to protect Asian-Americans and Pacific Islanders. You acted decisively. You can see on television the viciousness of the hate crimes we’ve have seen over the past year and for too long. I urge the House to do the same and send that legislation to my desk, which I will glad, anxiously sign.
I also hope that Congress will get to my desk the Equality Act, to protect L.G.B.T.Q. Americans. To all transgender Americans watching at home, especially young people, who are so brave, I want you to know, your president has your back. Another thing, let’s reauthorize the Violence Against Women Act, which has been law for 27 years. Twenty-seven years ago, I wrote it.
It will close — the act that has to be authorized now — will close the boyfriend loophole to keep guns out of the hands of abusers. The court order said this is an abuser, you can’t own a gun. It’s to close that loophole that exists. You know it is estimated that 50 women are shot and killed by an intimate partner every month in America, 50 a month. Let’s pass it and save some lives.
Now I need not tell anyone this, but gun violence is becoming an epidemic in America. The flag at the White House was still flying at half-mast for the eight victims of the mass shooting in Georgia when 10 more lives were taken in a mass shooting in Colorado. And in the weekend between those two events, 250 other Americans were shot dead in the streets of America. 250 shot dead. I know how hard it is to make progress in this issue. In the ’90s we passed universal background checks, a ban on assault weapons and high-capacity magazines that hold 100 rounds that can be fired off in seconds. We beat the N.R.A. Mass shootings and gun violence declined, check out the report, over 10 years.
But in the early 2000s, the law expired. We have seen daily bloodshed since then. I’m not saying that if the law had continued, we wouldn’t have seen bloodshed. More than two weeks ago in the Rose Garden, surrounded by some of the bravest people I know, the survivors and families who lost loved ones to gun violence, I laid out several of the Department of Justice actions that being taken to impact this epidemic. One of them is banning so-called ghost guns.
These are homemade guns built from a kit including directions how to finish the firearm. The parts have no serial numbers. So they show up at crime scenes and they can’t be traced. The buyers of those ghost kits are not required to pass any background checks. Anyone, from a criminal or terrorist, could buy this kit and within 30 minutes have a weapon that’s lethal. But no more. And I will do everything in my power to protect the American people from this epidemic of gun violence, but it’s time for Congress to act as well.
Look. I don’t want to be become confrontational. We need more Senate Republicans to join the overall majority of Senate Democrat colleagues and close the loopholes required in background check purchases of guns. We need a ban on assault weapons and high-capacity magazines. And don’t tell me it can’t be done. We did it before and it worked. Talk to most responsible hunters and gun owners. They’ll tell you there’s no possible justification for having 100 rounds in a weapon. You think they’re wearing Kevlar vests?
These kinds of reasonable reforms have overwhelming support from the American people, including many gun owners. The country supports reform, and Congress should act. This shouldn’t be a red or blue issue. And no amendment to the Constitution is absolute. You can’t yell fire in a crowded theater. From the very beginning, there were certain guns, weapons that could not be owned by Americans. Certain people could not own those weapons, ever. We’re not changing the Constitution. We’re being reasonable. I think this is not a Democrat or Republican issue, I think it’s a Republican issue.
And here’s what else we can do. Immigration has always been essential to America. Let’s end our exhausting war over immigration. For more than 30 years, politicians have talked about immigration reform and we’ve done nothing about it. It’s time to fix it. On Day 1 of my presidency, I kept my commitment and sent a comprehensive immigration bill to the United States Congress.
If you believe we need a secure border, pass it, because it has a lot of money for high-tech border security. If you believe in a pathway to citizenship, pass it. There’s over 11 million undocumented folks, the vast majority here overstayed visas. Pass it. We can actually — if you actually want to solve the problem, I have sent a bill to you, take a close look at it.
We also have to get at the root of the problem of why people are fleeing particularly to our southern border from Guatemala, Honduras, El Salvador. The violence. The corruption. The gangs. The political instability. Hunger. Hurricanes. Earthquakes. Natural disasters.
When I was president, my president — when I was vice president, the president asked me to focus on providing help needed to address the root causes of migration. And it helped keep people in their own countries instead of being forced to leave. And the plan was working, but the last administration decided it was not worth it. I’m restoring the program and asked Vice President Harris to lead our diplomatic effort to take care of this. I have absolute confidence she will get the job done.
Now look, if you don’t like my plan, let’s at least pass what we all agree on. Congress needs to pass legislation this year to finally secure protection for Dreamers, the young people who have only known America as their home. And, permanent protection for immigrants who are here on temporary protective status who came from countries beset by man-made and natural-made violence and disaster. As well as a pathway to citizenship for farmworkers who put food on our tables.
Look, immigrants have done so much for America during this pandemic and throughout our history. The country supports immigration reform. We should act. Let’s argue over it. Let’s debate over it. But let’s act.
And if we are to truly restore the soul of America, we need to protect the sacred right to vote. Most people — more people voted in the last presidential election than any time in American history, in the middle of the worst pandemic ever. That should be celebrated. Instead, it’s being attacked. Congress should pass H.R. 1 and the John Lewis Voting Rights Act and send them to my desk right away. The country supports it. And Congress should act now.
Look, in conclusion, as we gather here tonight, the images of a violent mob assaulting this Capitol — desecrating our democracy — remain vivid in all our minds. Lives were put at risk, many of your lives. Lives were lost. Extraordinary courage was summoned. The insurrection was an existential crisis, a test of whether our democracy could survive. And it did.
But the struggle is far from over. The question of whether our democracy will long endure is both ancient and urgent, as old as our republic, still vital today? Can our democracy deliver on its promise that all of us — created equal in the image of God — have a chance to lead lives of dignity, respect and possibility? Can our democracy deliver on the most pressing needs of our people? Can our democracy overcome the lies, anger, hate and fears that have pulled us apart?
America’s adversaries, the autocrats of the world, are betting we can’t. And I promise you, they’re betting we can’t. They believe we are too full of anger and division and rage. They look at the images of the mob that assaulted this Capitol as proof that the sun is setting on American democracy. But they are wrong. You know it, I know it. But we have to prove them wrong. We have to prove democracy still works, that our government still works, and we can deliver for our people.
In our first 100 days together, we have acted to restore the people’s faith in our democracy to deliver. We’re vaccinating the nation, creating hundreds of thousands of jobs. We’re delivering real results, people, they can see it, feel in their own lives. Opening doors of opportunity. Guaranteeing some more fairness and justice. That’s the essence of America. That’s democracy in action.
Our Constitution opens to the words, as trite as it sounds, “We the people.” It’s time we remembered that “We the people” are the government. You and I. Not some force in a distant capital. Not some powerful force that we have no control over. It’s us. It’s “We the people.”
In another era when our democracy was tested, Franklin Roosevelt reminded us, in America, we do our part. We all do our part. That’s all I’m asking. That we do our part, all of us. If we do that, we’ll meet the central challenge of the age by proving that democracy is durable and strong. Autocrats will not win the future. We will. America will. And the future belongs to America.
As I stand here tonight before you in a new and vital hour of life in democracy of our nation, and I can say with absolute confidence: I have never been more confident or optimistic about America. Not because I am president. Because of what’s happening with the American people. We’ve stared into the abyss of insurrection and autocracy, pandemic and pain, and “We the people” did not flinch.
At the very moment our adversaries were certain we would pull apart and fail, we came together. We united, with light and hope, we summoned a new strength, new resolve to position us to win the competition of the 21st century. On our way forward to a union, more perfect, more prosperous and more just, as one people, one nation and one America.
Folks — as I’ve told every world leader I’ve met with over the years — it’s never, ever, ever been a good bet to bet against America and it still isn’t. We are the United States of America. There is not a single thing — nothing, nothing beyond our capacity. We can do whatever we set our mind to if we do it together. So let’s begin to get together.
God bless you all, and may God protect our troops. Thank you for your patience.
President Biden unveiled a major proposal to invest in education and families, describing it as “a blue-collar blueprint to build America.”
President Biden delivered an address to a joint session of Congress at the Capitol on Wednesday night.Credit…Doug Mills/The New York Times
April 29, 2021
President Biden delivered an address to a joint session of Congress on Wednesday. Because of the pandemic, Mr. Biden spoke to a socially distanced audience of less than 200 lawmakers and officials, a small fraction of the packed audience that typically attends such an address.
The following is a transcript of his remarks.
PRESIDENT BIDEN: Thank you. Thank you, thank you, thank you. It’s good to be back. As Mitch and Chuck will understand, it’s good to be almost home, down the hall. Anyway, thank you all.
Madam Speaker, Madam Vice President. No president has ever said those words from this podium. No president has ever said those words. And it’s about time. The first lady, I’m her husband. Second gentleman. Chief justice. Members of the United States Congress and the cabinet, distinguished guests. My fellow Americans.
While the setting tonight is familiar, this gathering is just a little bit different. A reminder of the extraordinary times we’re in. Throughout our history, presidents have come to this chamber to speak to Congress, to the nation and to the world. To declare war, to celebrate peace, to announce new plans and possibilities.
Tonight, I come to talk about crisis and opportunity. About rebuilding the nation, revitalizing our democracy, and winning the future for America. I stand here tonight one day shy of the 100th day of my administration. A hundred days since I took the oath of office, lifted my hand off our family Bible and inherited a nation — we all did — that was in crisis. The worst pandemic in a century. The worst economic crisis since the Great Depression. The worst attack on our democracy since the Civil War. Now, after just 100 days, I can report to the nation, America is on the move again. Turning peril into possibility, crisis into opportunity, setbacks to strength.
- Thanks for reading The Times.
We all know life can knock us down. But in America, we never, ever, ever stay down. Americans always get up. Today, that’s what we’re doing. America is rising anew. Choosing hope over fear, truth over lies and light over darkness. After 100 days of rescue and renewal, America is ready for a takeoff, in my view. We’re working again, dreaming again, discovering again and leading the world again. We have shown each other and the world that there’s no quit in America. None.
One hundred days ago, America’s house was on fire. We had to act. Thanks to the extraordinary leadership of Speaker Pelosi, Majority Leader Schumer and the overwhelming support of the American people — Democrats, Independents and Republicans — we did act. Together, we passed the American Rescue Plan, one of the most consequential rescue packages in American history. We’re already seeing the results.
We’re already seeing the results. After I promised we would get 100 million Covid-19 vaccine shots into people’s arms in 100 days, we will have provided over 220 million Covid shots in those hundred days, thanks to all the help of all of you. We’re marshaling with your help, everyone’s help, we’re marshaling every federal resource. We’ve gotten vaccinations to nearly 40,000 pharmacies and over 700 community health centers where the poorest of the poor can be reached. We’re setting up community vaccination sites, developing mobile units to get to hard-to-reach communities. Today, 90 percent of Americans now live within five miles of a vaccination site. Everyone over the age of 16, everyone, is now eligible to get vaccinated right now, right away. Go get vaccinated, America. Go and get the vaccination. They’re available. You’re eligible now.
When I was sworn in on Jan. 20, less than 1 percent of the seniors in America were fully vaccinated against Covid-19. One hundred days later, 70 percent of seniors in America over 65 are protected, fully protected. Senior deaths from Covid-19 are down 80 percent since January, down 80 percent, because of all of you.
Editors’ Picks
[
‘While I Was Away, My Boss Had Flowers Delivered to My Apartment’
[
They Wanted a ‘Blank Slate’ One-Bedroom for Less Than $1 Million. Which Option Would You Choose?
[
After Covid Upended a Dying Woman’s Rome Dream, Her Twin Stepped In
Continue reading the main story
And more than half of all the adults in America have gotten at least one shot. The mass vaccination center in Glendale, Ariz., I asked the nurse, I said, “What’s it like?” She looked at me, she said, “It’s like every shot is giving a dose of hope” was her phrase, a dose of hope.
A dose of hope for an educator in Florida, who has a child suffering from an autoimmune disease, wrote to me, said she’s worried — that she was worried about bringing the virus home. She said she then got vaccinated at a large site, in her car. She said she sat in her car when she got vaccinated and just cried, cried out of joy, and cried out of relief.
Parents seeing the smiles on the kids’ faces, for those who are able to go back to school because the teachers and the school bus drivers and the cafeteria workers have been vaccinated. Grandparents, hugging their children and grandchildren, instead of pressing hands against the window to say goodbye. It means everything. Those things mean everything.
You know, there’s still — you all know it, you know it better than any group of Americans — there’s still more work to do to beat this virus. We can’t let our guard down. But tonight, I can say, because of you, the American people, our progress these past 100 days against one of the worst pandemics in history has been one of the greatest logistical achievements, logistical achievements this country has ever seen. What else have we done in those first 100 days?
We kept our commitment, Democrats and Republicans, of sending $1,400 rescue checks to 85 percent of American households. We’ve already sent more than 160 million checks out the door. It’s making a difference. You all know it when you go home. For many people, it’s making all the difference in the world.
A single mom in Texas who wrote me, she said she couldn’t work. She said the relief check put food on the table and saved her and her son from eviction from their apartment. A grandmother in Virginia who told me she immediately took her granddaughter to the eye doctor, something she said she put off for months because she didn’t have the money. One of the defining images, at least from my perspective, in this crisis has been cars lined up, cars lined up for miles. And not people just barely able to start those cars. Nice cars, lined up for miles, waiting for a box of food to be put in their trunk.
I don’t know about you, but I didn’t ever think I would see that in America. And all of this is through no fault of their own. No fault of their own, these people are in this position. That’s why the rescue plan is delivering food and nutrition assistance to millions of Americans facing hunger. And hunger is down sharply already.
We’re also providing rental assistance — you all know this, but the American people, I want to make sure they understand. Keeping people from being evicted from their homes. Providing loans to small businesses that reopen and keep their employees on the job. During these hundred days, an additional 800,000 Americans enrolled in the Affordable Care Act when I established a special sign-up period to do that — 800,000 in that period. We’re making one of the largest one-time-ever investments, ever, in improving health care for veterans. Critical investments to address the opioid crisis. And maybe most importantly, thanks to the American Rescue Plan, we’re on track to cut child poverty in America in half this year.
And in the process, while this is all going on, the economy created more than 1,300,000 new jobs in 100 days. More jobs in the first — more jobs in the first 100 days than any president on record. The International Monetary Fund — the International Monetary Fund is now estimating our economy will grow at a rate of more than 6 percent this year. That will be the fastest pace of economic growth in this country in nearly four decades. America’s moving, moving forward. But we can’t stop now.
We’re in competition with China and other countries to win the 21st century. We’re at a great inflection point in history. We have to do more than just build back better — than just build back, we have to build back better. We have to compete more strenuously than we have. Throughout our history, if you think about it, public investment in infrastructure has literally transformed America, our attitudes as well as our opportunities. The transcontinental railroad, interstate highways, united two oceans and brought a totally new age of progress to the United States of America.
Universal public schools and college aid opened wide the doors of opportunity. Scientific breakthroughs took us to the moon. Now we’re on Mars, discovering vaccines, gave us the internet and so much more. These are investments we made together as one country. And investments that only the government was in a position to make. Time and again, they propel us into the future. That’s why I propose the American Jobs Plan, a once-in-a-generation investment in America itself. This is the largest jobs plan since World War II.
It creates jobs to upgrade our transportation infrastructure. Jobs modernizing our roads, bridges, highways. Jobs building ports and airports, rail corridors, transit lines. It’s clean water. And today, up to 10 million homes in America and more than 400,000 schools and child care centers have pipes with lead in them, including drinking water, a clear and present danger to our children’s health. The American Jobs Plan creates jobs replacing 100 percent of the nation’s lead pipes and service lines so every American can drink clean water.
Keep up with the new Washington — get live updates on politics.
In the process it will create thousands and thousands of good-paying jobs. It creates jobs connecting every American with high-speed internet, including 35 percent of the rural America that still doesn’t have it. This is going to help our kids and our businesses succeed in the 21st century economy. And I’m asking the vice president to lead this effort, if she would, because I know it will get done.
It creates jobs, building a modern power grid. Our grids are vulnerable to storms, hacks, catastrophic failures — with tragic results, as we saw in Texas and elsewhere during the winter storms. The American Jobs Plan will create jobs that lay thousands of miles of transmission lines needed to build a resilient and fully clean grid. We can do that.
Look, the American Jobs Plan will help millions of people get back to their jobs and back to their careers. Two million women have dropped out of the work force during this pandemic. Two million. And too often, because they couldn’t get the care they needed to care for their child or care for an elderly parent who needs help; 800,000 families are on the Medicare waiting list right now to get home care for their aging parent or loved one with disability. If you think it’s not important, check out in your own district, Democrat or Republican. Democrat or Republican voters.
Their great concern, almost as much as the children, is taking care of an elderly loved one who can’t be left alone. Medicaid contemplated it, but this plan is going to help those families and create jobs for our caregivers with better wages and better benefits, continuing a cycle of growth.
For too long we’ve failed to use the most important word when it comes to meeting the climate crisis: Jobs. Jobs. Jobs. For me, when I think climate change, I think jobs. The American Jobs Plan will put engineers and construction workers to work building more energy efficient buildings and homes. Electrical workers, I.B.E.W. members, installing 500,000 charging stations along our highways so we can own the electric car market. Farmers, farmers planting cover crops so they can reduce the carbon dioxide in the air and get paid for doing it.
Look, think about it. There is simply no reason why the blades for wind turbines can’t be built in Pittsburgh instead of Beijing. No reason. None. No reason. So folks, there’s no reason why Americans — American workers can’t lead the world in the production of electric vehicles and batteries. There is no reason. We have the capacity. They’re best-trained people in the world. The American Jobs Plan is going to create millions of good-paying jobs, jobs Americans can raise a family on. As my dad would then say, with a little breathing room. And all the investments in the American Jobs Plan will be guided by one principle: Buy American. Buy American.
And I might note parenthetically, that does not violate any trade agreement. It’s been the law since the ’30s, buy American. American tax dollars are going to be used to buy American products, made in America, to create American jobs. That’s the way it’s supposed to be, and it will be in this administration. And I made it clear to all my cabinet people, their ability to give exemptions has been strenuously limited. It will be American products.
Now, I know some of you at home are wondering whether these jobs are for you. So many of you, so many of the folks I grew up with, feel left behind, forgotten, in an economy that’s so rapidly changing — it’s frightening. I want to speak directly to you, because if you think about it, that’s what people are most worried about. Can I fit in?
Independent experts estimate the American Jobs Plan will add millions of jobs and trillions of dollars to economic growth in the years to come. It is an eight-year program. These are good-paying jobs that can’t be outsourced. Nearly 90 percent of the infrastructure jobs created in the American Jobs Plan do not require a college degree. Seventy-five percent don’t require an associate’s degree. The American Jobs Plan is a blue-collar blueprint to build America. That’s what it is.
And I recognize something I’ve always said, in this chamber and the other, good guys and women on Wall Street. But Wall Street didn’t build this country. The middle class built the country. And unions built the middle class. So that’s why I’m calling on Congress to pass the Protect the Right to Organize Act, the PRO Act, and send it to my desk so we can support the right to unionize.
And by the way, while you’re thinking about sending things to my desk, let’s raise the minimum wage to $15. No one, no one working 40 hours a week, no one working 40 hours a week should live below the poverty line. We need to ensure greater equity and opportunity for women. And while we’re doing this, let’s get the Paycheck Fairness Act to my desk as well. Equal pay. It’s been much too long. And if you wonder whether it’s been too long, look behind me.
And finally, the American Jobs Plan will be the biggest increase in nondefense research and development on record. We’ll see more technological change — and some of you know more about this than I do — we’ll see more technological change this the next 10 years than we saw in the last 50. That’s how rapidly artificial intelligence, and so much more, is changing. And we’re falling behind the competition with the rest of the world.
Decades ago, we used to invest 2 percent of our gross domestic product in America, 2 percent of our gross domestic product in research and development. Today, Mr. Secretary, that’s less than 1 percent. China and other countries are closing in fast. We have to develop and dominate the products and technologies of the future. Advanced batteries, biotechnology, computer chips, clean energy.
The secretary of defense can tell you — and those of you who work in national security issues know, the defense department has an agency called DARPA, the Defense Advanced Research Projects Agency. The people who set up before I came here — and that’s been a long time ago — to develop breakthroughs that enhance our national security. That’s their only job. And it’s a semi-separate agency, it’s under the Defense Department. It’s led to everything from the discovery of the internet to GPS and so much more. It’s enhanced our security.
The National Institutes of Health, the N.I.H, I believe, should create a similar advanced research projects agency for health. And that would — here’s what it would do: It would have a singular purpose, to develop breakthroughs to prevent, detect and treat diseases like Alzheimer’s, diabetes and cancer. I’ll still never forget when we passed the cancer proposal in the last year as vice president, almost $9 million going to N.I.H. You’ll excuse the point of personal privilege. I’ll never forget you standing, Mitch, and saying, name it after my deceased son. It meant a lot.
But so many of us have deceased sons, daughters and relatives who died of cancer. I can think of no more worthy investment. I know of nothing that is more bipartisan. So let’s end cancer as we know it. It’s within our power. It’s within our power to do it.
Investments in jobs and infrastructure like the ones we’re talking about, have often had bipartisan support in the past. Vice President Harris and I meet regularly in the Oval Office with Democrats and Republicans to discuss the jobs plan. And I applaud a group of Republican senators who just put forward their own proposal. So let’s get to work. I wanted to lay out, before the Congress, my plan, before we go to into the deep discussions.
I would like to meet with those who have ideas that are different, that they think are better. I welcome those ideas. But the rest of the world is not waiting for us. I just want to be clear, from my perspective, doing nothing is not an option. Look, we can’t be so busy competing with one another that we forget the competition that we have with the rest of the world to win the 21st century.
Secretary Blinken can tell you, I spent a lot of time with President Xi — traveled over 17,000 miles with him, spent over 24 hours in private discussions with him. When he called congratulate, we had a two-hour discussion. He’s deadly earnest on becoming the most significant, consequential nation in the world. He and others, autocrats, think that democracy can’t compete in the 21st century with autocracies, because it takes too long to get consensus.
To win that competition for the future, in my view, we also need to make a once-in-a-generation investment in our families and our children. That’s why I introduced the American Families Plan tonight, which addresses four of the biggest challenges facing American families and, in turn, America. First is access to good education. This nation made 12 years of public education universal in the last century. It made us the best-educated, best-prepared nation in the world. It’s, I believe, the overwhelming reason that propelled us to where we got in the 20th century.
The New Washington
Latest Updates
Updated
April 30, 2021, 8:24 p.m. ETApril 30, 2021
April 30, 2021
- Manchin says he won’t support a D.C. statehood bill.
- The T.S.A. extends its mask mandate on U.S. transportation through mid-September.
- McConnell and other Republicans criticize as ‘divisive’ a Biden rule promoting teaching about systemic racism.
Is this helpful?
But the world’s caught up, or catching up. They’re not waiting. I would say parenthetically, if we were sitting down and put a bipartisan committee together and said, OK, we’re going to decide what we do in terms of government providing for free education, I wonder whether we’d think, as we did in the 20th century, that 12 years is enough in the 21st century. I doubt it. Twelve years is no longer enough today, to compete with the rest of the world in the 21st century. That’s why my American Families Plan guarantees four additional years of public education for every person in America, starting as early as we can.
The great universities in this country have conducted studies over the last 10 years. It shows that adding two years of universal, high-quality preschool for every 3-year-old and 4-year-old, no matter what background they come from, puts them in the position of being able to compete all the way through 12 years and increases exponentially their prospect of graduating and going on beyond graduation.
Research shows, when a young child goes to school — not day care — they’re far more likely to graduate from high school and go to college or something after high school. When you add two years of free community college on top of that, you begin to change the dynamic. We can do that. And we’ll increase Pell Grants and invest in historical Black colleges and universities, tribal colleges, minority serving institutions. The reason is, they don’t have the endowments.
But their students are just as capable of learning about cybersecurity, just as capable of learning about metallurgy — all the things that are going on that provide those jobs of the future. Jill is a community college professor who teaches today as first lady. She’s long said — if I heard it once, I’ve heard it a thousand times. “Joe, any country that out-educates us is going to outcompete us.” She’ll be deeply involved in leading this effort. Thank you, Jill.
Second thing we need, American Families Plan will provide access to quality, affordable child care. It will guarantee — what I’m proposing in legislation, it will guarantee that low- to middle-income families will pay no more than 7 percent of their income for high-quality care for children up to the age of 5. The most hard-pressed working families won’t have to spend a dime.
Third, the American Families Plan will finally provide up to 12 weeks of medical leave, paid medical leave. We’re one of the few industrial countries in the world — no one should have to choose between a job and a paycheck or taking care of themselves or their loved ones, or their parent or spouse or child.
And fourth, the American Family Plan puts directly into the pockets of millions of Americans. In March, we expanded a tax credit for every child in a family, up to $3,000 per child if they’re under 6 years of age — excuse me, under, over 6 years of age — and $3,600 for children over 6 years of age. With two parents, two kids, that’s $7,200 in their pockets they’re getting to help taking care of your family.
And that will help more than 65 million children and help cut child care poverty in half. We can afford it. We did that in the last piece of legislation we passed. Let’s extend that child care tax credit at least through the end of 2025. The American Rescue Plan lowered health care premiums for nine million Americans who buy their coverage under the Affordable Care Act. I know that’s really popular on this side of the aisle. But let’s make that provision permanent so their premiums don’t go back up.
In addition to my families plan, I’m going to work with Congress to address this year other critical priorities for American families. The Affordable Care Act has been a lifeline for millions of Americans, protecting people with pre-existing conditions, protecting women’s health. The pandemic has demonstrated how badly, how badly it’s needed. Let’s lower deductibles for working families in the Affordable Care Act and let’s lower prescription drug costs.
We know how to do this. The last president had that as an objective. We all know how outrageously expensive drugs are in America. In fact, we pay the highest prescription drug prices of anywhere in the world right here in America. Nearly three times, for the same drug nearly three times what other countries pay. We have to change that. And we can. Let’s do what we talked about for all the years I was down here in this body, in Congress. Let’s give Medicare the power to save hundreds of billions of dollars by negotiating lower drug prescription prices.
Continue reading the main story
By the way, it won’t just — it won’t just help people on Medicare. It will lower prescription drug costs for everyone. And the money we save, which is billions of dollars, can go to strengthen the Affordable Care Act and expand Medicare coverage benefits without costing taxpayers an additional penny. It’s within our power to do it. Let’s do it now. We talked about it long enough, Democrats and Republicans. Let’s get it done this year.
This is all about a simple premise: Health care should be a right, not a privilege, in America. So how do we pay for my jobs and family plan? I made it clear, we can do it without increasing the deficit. Let’s start with what I will not do. I will not impose any tax increase on people making less than $400,000. But it’s time for corporate America and the wealthiest 1 percent of Americans to just begin to pay their fair share. Just their fair share.
Sometimes I have arguments with my friends in the Democratic Party. I think you should be able to become a billionaire or a millionaire. But pay your fair share. Recent studies show that 55 of the nation’s biggest corporations paid zero federal tax last year. Those 55 corporations made in excess of $40 billion in profit. A lot of companies also evade taxes through tax havens in Switzerland and Bermuda and the Cayman Islands. And they benefit from tax loopholes and deductions for offshoring jobs and shifting profits overseas. It’s not right.
We’re going to reform corporate taxes so they pay their fair share and help pay for the public investments their businesses will benefit from as well. We’re going to reward work, not just wealth. We take the top tax bracket for the wealthiest 1 percent of Americans, those making over $400,000 or more, back up to where it was when George W. Bush was president, when he started, 39.6 percent. That’s where it was when George W. was president.
We’re going to get rid of the loopholes that allow Americans to make more than $1 million a year and pay a lower tax rate on their capital gains than Americans who receive a paycheck. We’re only going to affect three-tenths of 1 percent of all Americans by that action. Three-tenths of 1 percent. The I.R.S. is going to crack down on millionaires and billionaires who cheat on their taxes. It’s estimated to be billions of dollars by think tanks left, right and center.
I’m not looking to punish anybody. But I will not add a tax burden, additional tax burden on the middle class of this country. They’re already paying enough. I believe what I propose is fair, fiscally responsible, and it raises revenue to pay for the plans I propose and will create millions of jobs that will grow the economy and enhance our financial standing in the country. And here some would say they don’t want to raise taxes on the wealthiest 1 percent, or corporate America. Ask them, whose taxes do you want to raise? Instead, whose are you going to cut?
Look, the big tax cut of 2017. Remember, it was supposed to pay for itself — that was how it was sold — and generate vast economic growth. Instead, it added $2 trillion to the deficit. It was a huge windfall for corporate America and those at the very top. Instead of using the tax saving to raise wages and invest in research and development, it poured billions of dollars into the pockets of C.E.O.s. In fact the pay gap between C.E.O.s and their workers is now among the largest in history. According to one study, C.E.O.s make 320 times what the average worker in a corporation makes. It used to be below 100.
Continue reading the main story
The pandemic has only made things worse. Twenty million Americans lost their job in the pandemic, working- and middle-class Americans. At the same time, roughly 650 billionaires in America saw their net worth increase by more than $1 trillion, in the same exact period. Let me say it again. 650 people increased their wealth by more than $1 trillion during this pandemic and they’re now worth more than $4 trillion. My fellow Americans, trickle-down, trickle-down economics has never worked. It’s time to grow the economy from the bottom and the middle out.
You know, there’s a broad consensus of economists left, right and center, and they agree what I’m proposing will create millions of jobs and generate historic economic growth. These are among the highest-value investments we can make as a nation. I’ve often said our greatest strength is the power of our example, not just the example of our power. My conversations with world leaders — and I’ve spoken to 38, 40 of them now — I’ve made it known, I’ve made it known, that America is back.
You know what they say? The comment I hear most of all from them? They say: “We see America’s back, but for how long? But for how long?” My fellow Americans, we have to show not just that we’re back, but that we’re back to stay, and that we aren’t going to go alone. We’re going to do it by leading with our allies. No one nation can deal with all the crises of our time, from terrorism to nuclear proliferation, mass migration, cybersecurity, climate change, as well as what we’re experiencing now, pandemics.
There’s no wall high enough to keep any virus out. And our own vaccine supply, as it grows to meet our needs — and we’re meeting them — will become an arsenal for vaccines for other countries, just as America was the arsenal for democracy for the world. And in consequence, influenced the world. Every American will have access before that occurs, every American will have access to be fully covered by Covid-19 from the vaccines we have.
Look, the climate crisis is not our fight alone. It’s a global fight. The United States accounts, as all of you know, for less than 15 percent of carbon emissions. The rest of the world accounts for 85 percent. That’s why I kept my commitment to rejoin the Paris Accord, because if we do everything perfectly, it’s not going to matter. I kept my commitment to convene a climate summit right here in America with all the major economies of the world: China, Russia, India, European Union. I said I would do it in my first hundred days.
I want to be very blunt about it. I had — my intent was to make sure that the world could see that there was a consensus, that we are at an inflection point in history. The consensus is, if we act to save the planet, we can create millions of jobs and economic growth and opportunity to raise the standard of living of almost everyone around the world. If you’ve watched any of it — and you were all busy, I’m sure you didn’t have much time — that’s what virtually every nation said, even the ones who aren’t doing their fair share.
The investments I propose tonight also advance a foreign policy, in my view, that benefits the middle class. That means making sure that every nation plays by the same rules in the global economy, including China. In my discussions with President Xi, I told him we welcome the competition. We’re not looking for conflict.
Continue reading the main story
But I made absolutely clear that we’ll defend America’s interests across the board. America will stand up to unfair trade practices that undercut workers and American industries like subsidies from state to state-owned operations and enterprises and the theft of American technology and intellectual property. I also told President Xi that we’ll maintain a strong relationship in the Indo-Pacific, just as we do for NATO and Europe. Not to start a conflict, but to prevent one.
I told him what I said to many world leaders, that America will not back away from our commitments, our commitments to human rights and our fundamental freedom and our alliances. I pointed out to him, no responsible American president could remain silent when basic human rights are being so blatantly violated. An American president has to represent the essence of what our country stands for.
America is an idea, the most unique idea in history. We are created, all of us equal. It is who we are. And we cannot walk away from that principle and in fact say we are dealing with the American idea. With regards to Russia, I know it concerns some of you. I made it clear to Putin that we are not going to seek — excuse me — escalation but their actions will have consequences if they turned out to be true. And they turned out to be true. So I responded directly and proportionally to Russia’s interference to our elections and the cyberattacks on our government and our business.
They did both of these things, and I told them we would respond, and we have. We’ll also cooperate when it is our mutual interest. We did it when we extended the New Start Treaty on nuclear arms and we are working on climate change. But he understands, we will respond. On Iran and North Korea, nuclear programs present serious threats to American security and the security of the world. We’re going to be working closely with our allies to address the threats posed by both of these countries through diplomacy as well as stern deterrence.
And American leadership meaning ending the forever war in Afghanistan. We have — we have, without hyperbole, the greatest fighting force in the history of the world. I am the first president in 40 years who knows what it means to have a son serving in a war zone. Today we have service members serving in the same war zone as their parents did. We have service members in Afghanistan who were not yet born on 9/11. The war in Afghanistan, as we remember the debates here, were never meant to be multigenerational undertakings of nation building.
We want Afghanistan to get terrorists, the terrorists who attacked us on 9/11. And we said we would follow Osama bin Laden to the gates of hell to do it. And if you’ve been to the Upper Kunar Valley, you’ve kind of seen the gates of hell. And we delivered justice to bin Laden. We degraded the terrorist threat in Afghanistan. And after 20 years of value — valor and sacrifice, it is time to bring those troops home.
Look, even as we do, we’ll maintain over the horizon the capacity to suppress future threats to the homeland. Make no mistake, in 20 years, terrorists — terrorism has been metastasized. The threat evolved way beyond Afghanistan. Those in the intelligence committees, the foreign relations committee, defense committees, you know well we have to remain vigilant against the threats to the United States wherever they come from. Al Qaeda and ISIS are in Yemen, Syria, Somalia, other places in Africa and the Middle East and beyond.
Continue reading the main story
And we won’t ignore what our intelligence agents have determined to be the most lethal terrorist threat to our homeland today: White supremacy is terrorism. We are not going to ignore that either. My fellow Americans, look, we have to come together to heal the soul of this nation. It was nearly a year ago before her father’s funeral when I spoke to Gianna Floyd, George Floyd’s young daughter.
She’s a little tyke, so I was kneeling down to talk to her, so I can look at her in the eye. She looked at me, she said, “My daddy changed the world.” Well, after the conviction of George Floyd’s murderer, we can see how right she was — if, if we have the courage to act as a Congress. We have all seen the knee of injustice on the neck of Black Americans. Now is our opportunity to make some real progress.
The vast majority, men and women wearing the uniform and a badge, serve our communities and they serve them honorably. I know them, I know they want — I know they want to help meet this moment as well. My fellow Americans, we have to come together to rebuild trust between law enforcement and the people they serve, to root out systematic racism in our criminal justice system and enact police reform in George Floyd’s name that passed the House already.
I know Republicans have their own ideas and are engaged in productive discussions with Democrats in the Senate. We need to work together to find a consensus. But let’s get it done next month, by the first anniversary of George Floyd’s death. The country supports this reform and Congress should act. We have the giant opportunity to bend the arc of the moral universe toward justice, real justice.
And with the plans outlined tonight, we have a real chance to root out systematic racism that plagues America and American lives in other ways. A chance to deliver real equity: good jobs, good schools, affordable housing, clean air, clean water, the ability to generate wealth and pass it down to generations because you have an access to purchase a house. Real opportunities in the lives of more Americans — Black, white, Latino, Asian-Americans, Native Americans.
Look, I also want to thank the United States Senate for voting 94-1 to pass Covid-19 Hate Crimes Act to protect Asian-Americans and Pacific Islanders. You acted decisively. You can see on television the viciousness of the hate crimes we’ve have seen over the past year and for too long. I urge the House to do the same and send that legislation to my desk, which I will glad, anxiously sign.
I also hope that Congress will get to my desk the Equality Act, to protect L.G.B.T.Q. Americans. To all transgender Americans watching at home, especially young people, who are so brave, I want you to know, your president has your back. Another thing, let’s reauthorize the Violence Against Women Act, which has been law for 27 years. Twenty-seven years ago, I wrote it.
Continue reading the main story
It will close — the act that has to be authorized now — will close the boyfriend loophole to keep guns out of the hands of abusers. The court order said this is an abuser, you can’t own a gun. It’s to close that loophole that exists. You know it is estimated that 50 women are shot and killed by an intimate partner every month in America, 50 a month. Let’s pass it and save some lives.
Now I need not tell anyone this, but gun violence is becoming an epidemic in America. The flag at the White House was still flying at half-mast for the eight victims of the mass shooting in Georgia when 10 more lives were taken in a mass shooting in Colorado. And in the weekend between those two events, 250 other Americans were shot dead in the streets of America. 250 shot dead. I know how hard it is to make progress in this issue. In the ’90s we passed universal background checks, a ban on assault weapons and high-capacity magazines that hold 100 rounds that can be fired off in seconds. We beat the N.R.A. Mass shootings and gun violence declined, check out the report, over 10 years.
But in the early 2000s, the law expired. We have seen daily bloodshed since then. I’m not saying that if the law had continued, we wouldn’t have seen bloodshed. More than two weeks ago in the Rose Garden, surrounded by some of the bravest people I know, the survivors and families who lost loved ones to gun violence, I laid out several of the Department of Justice actions that being taken to impact this epidemic. One of them is banning so-called ghost guns.
These are homemade guns built from a kit including directions how to finish the firearm. The parts have no serial numbers. So they show up at crime scenes and they can’t be traced. The buyers of those ghost kits are not required to pass any background checks. Anyone, from a criminal or terrorist, could buy this kit and within 30 minutes have a weapon that’s lethal. But no more. And I will do everything in my power to protect the American people from this epidemic of gun violence, but it’s time for Congress to act as well.
Look. I don’t want to be become confrontational. We need more Senate Republicans to join the overall majority of Senate Democrat colleagues and close the loopholes required in background check purchases of guns. We need a ban on assault weapons and high-capacity magazines. And don’t tell me it can’t be done. We did it before and it worked. Talk to most responsible hunters and gun owners. They’ll tell you there’s no possible justification for having 100 rounds in a weapon. You think they’re wearing Kevlar vests?
These kinds of reasonable reforms have overwhelming support from the American people, including many gun owners. The country supports reform, and Congress should act. This shouldn’t be a red or blue issue. And no amendment to the Constitution is absolute. You can’t yell fire in a crowded theater. From the very beginning, there were certain guns, weapons that could not be owned by Americans. Certain people could not own those weapons, ever. We’re not changing the Constitution. We’re being reasonable. I think this is not a Democrat or Republican issue, I think it’s a Republican issue.
And here’s what else we can do. Immigration has always been essential to America. Let’s end our exhausting war over immigration. For more than 30 years, politicians have talked about immigration reform and we’ve done nothing about it. It’s time to fix it. On Day 1 of my presidency, I kept my commitment and sent a comprehensive immigration bill to the United States Congress.
Continue reading the main story
If you believe we need a secure border, pass it, because it has a lot of money for high-tech border security. If you believe in a pathway to citizenship, pass it. There’s over 11 million undocumented folks, the vast majority here overstayed visas. Pass it. We can actually — if you actually want to solve the problem, I have sent a bill to you, take a close look at it.
We also have to get at the root of the problem of why people are fleeing particularly to our southern border from Guatemala, Honduras, El Salvador. The violence. The corruption. The gangs. The political instability. Hunger. Hurricanes. Earthquakes. Natural disasters.
When I was president, my president — when I was vice president, the president asked me to focus on providing help needed to address the root causes of migration. And it helped keep people in their own countries instead of being forced to leave. And the plan was working, but the last administration decided it was not worth it. I’m restoring the program and asked Vice President Harris to lead our diplomatic effort to take care of this. I have absolute confidence she will get the job done.
Now look, if you don’t like my plan, let’s at least pass what we all agree on. Congress needs to pass legislation this year to finally secure protection for Dreamers, the young people who have only known America as their home. And, permanent protection for immigrants who are here on temporary protective status who came from countries beset by man-made and natural-made violence and disaster. As well as a pathway to citizenship for farmworkers who put food on our tables.
Look, immigrants have done so much for America during this pandemic and throughout our history. The country supports immigration reform. We should act. Let’s argue over it. Let’s debate over it. But let’s act.
And if we are to truly restore the soul of America, we need to protect the sacred right to vote. Most people — more people voted in the last presidential election than any time in American history, in the middle of the worst pandemic ever. That should be celebrated. Instead, it’s being attacked. Congress should pass H.R. 1 and the John Lewis Voting Rights Act and send them to my desk right away. The country supports it. And Congress should act now.
Look, in conclusion, as we gather here tonight, the images of a violent mob assaulting this Capitol — desecrating our democracy — remain vivid in all our minds. Lives were put at risk, many of your lives. Lives were lost. Extraordinary courage was summoned. The insurrection was an existential crisis, a test of whether our democracy could survive. And it did.
Continue reading the main story
But the struggle is far from over. The question of whether our democracy will long endure is both ancient and urgent, as old as our republic, still vital today? Can our democracy deliver on its promise that all of us — created equal in the image of God — have a chance to lead lives of dignity, respect and possibility? Can our democracy deliver on the most pressing needs of our people? Can our democracy overcome the lies, anger, hate and fears that have pulled us apart?
America’s adversaries, the autocrats of the world, are betting we can’t. And I promise you, they’re betting we can’t. They believe we are too full of anger and division and rage. They look at the images of the mob that assaulted this Capitol as proof that the sun is setting on American democracy. But they are wrong. You know it, I know it. But we have to prove them wrong. We have to prove democracy still works, that our government still works, and we can deliver for our people.
In our first 100 days together, we have acted to restore the people’s faith in our democracy to deliver. We’re vaccinating the nation, creating hundreds of thousands of jobs. We’re delivering real results, people, they can see it, feel in their own lives. Opening doors of opportunity. Guaranteeing some more fairness and justice. That’s the essence of America. That’s democracy in action.
Our Constitution opens to the words, as trite as it sounds, “We the people.” It’s time we remembered that “We the people” are the government. You and I. Not some force in a distant capital. Not some powerful force that we have no control over. It’s us. It’s “We the people.”
In another era when our democracy was tested, Franklin Roosevelt reminded us, in America, we do our part. We all do our part. That’s all I’m asking. That we do our part, all of us. If we do that, we’ll meet the central challenge of the age by proving that democracy is durable and strong. Autocrats will not win the future. We will. America will. And the future belongs to America.
As I stand here tonight before you in a new and vital hour of life in democracy of our nation, and I can say with absolute confidence: I have never been more confident or optimistic about America. Not because I am president. Because of what’s happening with the American people. We’ve stared into the abyss of insurrection and autocracy, pandemic and pain, and “We the people” did not flinch.
At the very moment our adversaries were certain we would pull apart and fail, we came together. We united, with light and hope, we summoned a new strength, new resolve to position us to win the competition of the 21st century. On our way forward to a union, more perfect, more prosperous and more just, as one people, one nation and one America.
Continue reading the main story
Folks — as I’ve told every world leader I’ve met with over the years — it’s never, ever, ever been a good bet to bet against America and it still isn’t. We are the United States of America. There is not a single thing — nothing, nothing beyond our capacity. We can do whatever we set our mind to if we do it together. So let’s begin to get together.
God bless you all, and may God protect our troops. Thank you for your patience.
Full transcript of Joe Biden’s inauguration speech - BBC News
Chief Justice Roberts, Vice-President Harris, Speaker Pelosi, Leader Schumer, Leader McConnell, Vice-President Pence. My distinguished guests, my fellow Americans.
This is America’s day. This is democracy’s day. A day of history and hope, of renewal and resolve. Through a crucible for the ages, America has been tested anew and America has risen to the challenge. Today we celebrate the triumph not of a candidate but of a cause, a cause of democracy. The people - the will of the people - has been heard, and the will of the people has been heeded.
We’ve learned again that democracy is precious, democracy is fragile and, at this hour my friends, democracy has prevailed. So now on this hallowed ground where just a few days ago violence sought to shake the Capitol’s very foundations, we come together as one nation under God - indivisible - to carry out the peaceful transfer of power as we have for more than two centuries.
As we look ahead in our uniquely American way, restless, bold, optimistic, and set our sights on a nation we know we can be and must be, I thank my predecessors of both parties for their presence here. I thank them from the bottom of my heart. And I know the resilience of our Constitution and the strength, the strength of our nation, as does President Carter, who I spoke with last night who cannot be with us today, but who we salute for his lifetime of service.
I’ve just taken a sacred oath each of those patriots have taken. The oath first sworn by George Washington. But the American story depends not on any one of us, not on some of us, but on all of us. On we the people who seek a more perfect union. This is a great nation, we are good people. And over the centuries through storm and strife in peace and in war we’ve come so far. But we still have far to go.
We’ll press forward with speed and urgency for we have much to do in this winter of peril and significant possibility. Much to do, much to heal, much to restore, much to build and much to gain. Few people in our nation’s history have been more challenged or found a time more challenging or difficult than the time we’re in now. A once in a century virus that silently stalks the country has taken as many lives in one year as in all of World War Two.
Millions of jobs have been lost. Hundreds of thousands of businesses closed. A cry for racial justice, some 400 years in the making, moves us. The dream of justice for all will be deferred no longer. A cry for survival comes from the planet itself, a cry that can’t be any more desperate or any more clear now. The rise of political extremism, white supremacy, domestic terrorism, that we must confront and we will defeat.
To overcome these challenges, to restore the soul and secure the future of America, requires so much more than words. It requires the most elusive of all things in a democracy - unity. Unity. In another January on New Year’s Day in 1863 Abraham Lincoln signed the Emancipation Proclamation. When he put pen to paper the president said, and I quote, ‘if my name ever goes down in history, it’ll be for this act, and my whole soul is in it’.
My whole soul is in it today, on this January day. My whole soul is in this. Bringing America together, uniting our people, uniting our nation. And I ask every American to join me in this cause. Uniting to fight the foes we face - anger, resentment and hatred. Extremism, lawlessness, violence, disease, joblessness, and hopelessness.
With unity we can do great things, important things. We can right wrongs, we can put people to work in good jobs, we can teach our children in safe schools. We can overcome the deadly virus, we can rebuild work, we can rebuild the middle class and make work secure, we can secure racial justice and we can make America once again the leading force for good in the world.
I know speaking of unity can sound to some like a foolish fantasy these days. I know the forces that divide us are deep and they are real. But I also know they are not new. Our history has been a constant struggle between the American ideal, that we are all created equal, and the harsh ugly reality that racism, nativism and fear have torn us apart. The battle is perennial and victory is never secure.
Through civil war, the Great Depression, World War, 9/11, through struggle, sacrifice, and setback, our better angels have always prevailed. In each of our moments enough of us have come together to carry all of us forward and we can do that now. History, faith and reason show the way. The way of unity.
We can see each other not as adversaries but as neighbours. We can treat each other with dignity and respect. We can join forces, stop the shouting and lower the temperature. For without unity there is no peace, only bitterness and fury, no progress, only exhausting outrage. No nation, only a state of chaos. This is our historic moment of crisis and challenge. And unity is the path forward. And we must meet this moment as the United States of America.
If we do that, I guarantee we will not failed. We have never, ever, ever, ever failed in America when we’ve acted together. And so today at this time in this place, let’s start afresh, all of us. Let’s begin to listen to one another again, hear one another, see one another. Show respect to one another. Politics doesn’t have to be a raging fire destroying everything in its path. Every disagreement doesn’t have to be a cause for total war and we must reject the culture in which facts themselves are manipulated and even manufactured.
My fellow Americans, we have to be different than this. We have to be better than this and I believe America is so much better than this. Just look around. Here we stand in the shadow of the Capitol dome. As mentioned earlier, completed in the shadow of the Civil War. When the union itself was literally hanging in the balance. We endure, we prevail. Here we stand, looking out on the great Mall, where Dr King spoke of his dream.
Here we stand, where 108 years ago at another inaugural, thousands of protesters tried to block brave women marching for the right to vote. And today we mark the swearing in of the first woman elected to national office, Vice President Kamala Harris. Don’t tell me things can’t change. Here we stand where heroes who gave the last full measure of devotion rest in eternal peace.
And here we stand just days after a riotous mob thought they could use violence to silence the will of the people, to stop the work of our democracy, to drive us from this sacred ground. It did not happen, it will never happen, not today, not tomorrow, not ever. Not ever. To all those who supported our campaign, I’m humbled by the faith you placed in us. To all those who did not support us, let me say this. Hear us out as we move forward. Take a measure of me and my heart.
If you still disagree, so be it. That’s democracy. That’s America. The right to dissent peacefully. And the guardrail of our democracy is perhaps our nation’s greatest strength. If you hear me clearly, disagreement must not lead to disunion. And I pledge this to you. I will be a President for all Americans, all Americans. And I promise you I will fight for those who did not support me as for those who did.
Many centuries ago, St Augustine - the saint of my church - wrote that a people was a multitude defined by the common objects of their love. Defined by the common objects of their love. What are the common objects we as Americans love, that define us as Americans? I think we know. Opportunity, security, liberty, dignity, respect, honour, and yes, the truth.
Recent weeks and months have taught us a painful lesson. There is truth and there are lies. Lies told for power and for profit. And each of us has a duty and a responsibility as citizens as Americans and especially as leaders. Leaders who are pledged to honour our Constitution to protect our nation. To defend the truth and defeat the lies.
Look, I understand that many of my fellow Americans view the future with fear and trepidation. I understand they worry about their jobs. I understand like their dad they lay in bed at night staring at the ceiling thinking: ‘Can I keep my healthcare? Can I pay my mortgage?’ Thinking about their families, about what comes next. I promise you, I get it. But the answer’s not to turn inward. To retreat into competing factions. Distrusting those who don’t look like you, or worship the way you do, who don’t get their news from the same source as you do.
We must end this uncivil war that pits red against blue, rural versus urban, conservative versus liberal. We can do this if we open our souls instead of hardening our hearts, if we show a little tolerance and humility, and if we’re willing to stand in the other person’s shoes, as my mom would say. Just for a moment, stand in their shoes.
Because here’s the thing about life. There’s no accounting for what fate will deal you. Some days you need a hand. There are other days when we’re called to lend a hand. That’s how it has to be, that’s what we do for one another. And if we are that way our country will be stronger, more prosperous, more ready for the future. And we can still disagree.
My fellow Americans, in the work ahead of us we’re going to need each other. We need all our strength to persevere through this dark winter. We’re entering what may be the darkest and deadliest period of the virus. We must set aside politics and finally face this pandemic as one nation, one nation. And I promise this, as the Bible says, ‘Weeping may endure for a night, joy cometh in the morning’. We will get through this together. Together.
Look folks, all my colleagues I serve with in the House and the Senate up here, we all understand the world is watching. Watching all of us today. So here’s my message to those beyond our borders. America has been tested and we’ve come out stronger for it. We will repair our alliances, and engage with the world once again. Not to meet yesterday’s challenges but today’s and tomorrow’s challenges. And we’ll lead not merely by the example of our power but the power of our example.
Fellow Americans, moms, dads, sons, daughters, friends, neighbours and co-workers. We will honour them by becoming the people and the nation we can and should be. So I ask you let’s say a silent prayer for those who lost their lives, those left behind and for our country. Amen.
Folks, it’s a time of testing. We face an attack on our democracy, and on truth, a raging virus, a stinging inequity, systemic racism, a climate in crisis, America’s role in the world. Any one of these would be enough to challenge us in profound ways. But the fact is we face them all at once, presenting this nation with one of the greatest responsibilities we’ve had. Now we’re going to be tested. Are we going to step up?
It’s time for boldness for there is so much to do. And this is certain, I promise you. We will be judged, you and I, by how we resolve these cascading crises of our era. We will rise to the occasion. Will we master this rare and difficult hour? Will we meet our obligations and pass along a new and better world to our children? I believe we must and I’m sure you do as well. I believe we will, and when we do, we’ll write the next great chapter in the history of the United States of America. The American story.
A story that might sound like a song that means a lot to me, it’s called American Anthem. And there’s one verse that stands out at least for me and it goes like this:
‘The work and prayers of centuries have brought us to this day, which shall be our legacy, what will our children say?
Let me know in my heart when my days are through, America, America, I gave my best to you.’
Let us add our own work and prayers to the unfolding story of our great nation. If we do this, then when our days are through, our children and our children’s children will say of us: ‘They gave their best, they did their duty, they healed a broken land.’
My fellow Americans I close the day where I began, with a sacred oath. Before God and all of you, I give you my word. I will always level with you. I will defend the Constitution, I’ll defend our democracy.
I’ll defend America and I will give all - all of you - keep everything I do in your service. Thinking not of power but of possibilities. Not of personal interest but of public good.
And together we will write an American story of hope, not fear. Of unity not division, of light not darkness. A story of decency and dignity, love and healing, greatness and goodness. May this be the story that guides us. The story that inspires us. And the story that tells ages yet to come that we answered the call of history, we met the moment. Democracy and hope, truth and justice, did not die on our watch but thrive.
That America secured liberty at home and stood once again as a beacon to the world. That is what we owe our forbearers, one another, and generations to follow.
So with purpose and resolve, we turn to those tasks of our time. Sustained by faith, driven by conviction and devoted to one another and the country we love with all our hearts. May God bless America and God protect our troops.
Termux
1 | setsid chromium-browser 'https://www.cnblogs.com/cutesnow/p/11430833.html' 'https://www.sqlsec.com/2018/05/termux.html' |
简介
Termux
是一个Android
下一个高级的终端模拟器,开源且不需要root
,支持apt
管理软件包,十分方便安装软件包,完美支持Python
,PHP
,Ruby
,Go
,Nodejs
,MySQL
等。随着智能设备的普及和性能的不断提升,如今的手机、平板等的硬件标准已达到了初级桌面计算机的硬件标准,用心去打造完全可以把手机变成一个强大的工具.
Google Play下载的版本比酷安要新,有能力建议下载Google PLay版本的.
基本操作
长按屏幕
显示菜单项(包括复制、粘贴、更多),此时屏幕出现可选择的复制光标
1 | 长按屏幕 |
从左向右滑动
显示隐藏式导航栏,可以新建、切换、重命名会话session和调用弹出输入法
显示扩展功能按键
扩展功能键是什么?就是PC端常用的按键如:ESC键,CTR键,TAB键,但是手机上难以操作的一些按键.
效果图
方法一
从左向右滑动,显示隐藏式导航栏,长按左下角的KEYBOARD
.
方法二
使用Termux
快捷键:音量+
+Q
键
常用快捷键
Ctrl
键是终端用户常用的按键 - 但大多数触摸键盘都没有这个按键。为此,Termux使用音量减小按钮
来模拟Ctrl
键。
例如,在触摸键盘上按音量减小
+ L
发送与在硬件键盘上按Ctrl + L
相同的输入。
-
Ctrl+A
-> 将光标移动到行首 -
Ctrl+C
-> 中止当前进程 -
Ctrl+D
-> 注销终端会话 -
Ctrl+E
-> 将光标移动到行尾 -
Ctrl+K
-> 从光标删除到行尾 -
Ctrl+L
-> 清除终端 -
Ctrl+Z
-> 挂起(发送SIGTSTP到)当前进程
音量加键
也可以作为产生特定输入的特殊键
.
-
音量加+E
-> Esc键 -
音量加+T
-> Tab键 -
音量加+1
-> F1(和音量增加+ 2→F2等) -
音量加+0
-> F10 -
音量加+B
-> Alt + B,使用readline时返回一个单词 -
音量加+F
-> Alt + F,使用readline时转发一个单词 -
音量加+X
-> Alt+X -
音量加+W
-> 向上箭头键 -
音量加+A
-> 向左箭头键 -
音量加+S
-> 向下箭头键 -
音量加+D
-> 向右箭头键 -
音量加+L
-> | (管道字符) -
音量加+H
-> 〜(波浪号字符) -
音量加+U
-> _ (下划线字符) -
音量加+P
-> 上一页 -
音量加+N
-> 下一页 -
音量加+.
-> Ctrl + \(SIGQUIT) -
音量加+V
-> 显示音量控制 -
音量加+Q
-> 显示额外的按键视图
基本命令
Termux
除了支持apt
命令外,还在此基础上封装了pkg
命令,pkg
命令向下兼容apt
命令.apt
命令大家应该都比较熟悉了,这里直接简单的介绍下pkg
命令:
1 | pkg search <query> 搜索包 |
目录环境结构
1 | ~ > echo $HOME |
长期使用Linux的朋友可能会发现,这个HOME路径看上去可能不太一样,为了方便,Termux
提供了一个特殊的环境变量:PREFIX
更换国内源
更换Termux
清华大学源,加快软件包下载速度.
设置默认编辑器
1 | export EDITOR=vi |
编辑源文件
1 | apt edit-sources |
将原来的https://termux.net
官方源替换为http://mirrors.tuna.tsinghua.edu.cn/termux
保存并退出
直接编辑源文件
上面是官方推荐的方法,其实还有更简单的方法,类似于Linux下直接去编辑源文件:
1 | vi $PREFIX/etc/apt/sources.list |
安装基本工具
1 | pkg update |
Termux优化
终端配色
主要使用了zsh
来替代bash
作为默认shell
.
使用一键安装脚本来安装,一步到位,顺便启动了外置存储,可以直接访问SD卡下的目录.
执行下面这个命令确保已经安装好了curl
1 | sh -c "$(curl -fsSL https://github.com/Cabbagec/termux-ohmyzsh/raw/master/install.sh)" |
Android6.0以上会弹框确认是否授权,允许
授权后Termux
可以方便的访问SD卡文件.
脚本允许后先后有如下两个选项:
1 | Enter a number, leave blank to not to change: 14 |
分别选择背景色
和字体
想要继续更改挑选配色的话,继续运行脚本来再次筛选:
1 | $ ~/termux-ohmyzsh/install.sh |
exit
重启sessions
会话生效配置
访问外置存储优化
执行过上面的zsh
一键配置脚本后,并且授予文件访问权限的话,会在家目录生成storage
目录,并且生成若干目录,软连接都指向外置存储卡的相应目录
创建QQ文件夹软连接
手机上一般经常使用手机QQ来接收文件,这里为了方便文件传输,直接在storage
目录下创建软链接.
QQ
1 | ln -s /data/data/com.termux/files/home/storage/shared/tencent/QQfile_recv QQ |
TIM
1 | ln -s /data/data/com.termux/files/home/storage/shared/tencent/TIMfile_recv TIM |
最后效果图如下:
这样可以直接在home
目录下去访问QQ文件夹,非常方便文件的传输,大大提升了工作效率.
http://mirrors.tuna.tsinghua.edu.cn/termux
oh my zsh主题配色
编辑.zshrc
配置文件
1 | $ vim .zshrc |
第一行可以看到,默认的主题是agnoster
主题:
在.oh-my-zsh/themes
目录下放着oh-my-zsh
所有的主题配置文件.
下面是国光认为还不错的几款主题
agnoster
robbyrussell
jaischeema
re5et
junkfood
cloud
random
当然如果你是个变态的话,可以尝试random
主题,每打开一个会话配色主题都是随机的.
1 | ZSH_THEME="random" |
修改启动问候语
默认的启动问候语如下:
这个对于初学者有一定的帮助在前期,随着对Termux
的熟悉,这个默认的问候语就会显得比较臃肿.
编辑问候语文件直接修改问候语:
1 | vim $PREFIX/etc/motd |
修改完的效果如下:
这样启动新的会话的时候看上去就会简洁很多.
管理员身份
手机没有root
利用proot
工具来模拟某些需要root的环境
1 | pkg install proot |
然后终端下面输入:
1 | termux-chroot |
即可模拟root
环境
在这个proot
环境下面,相当于是进入了home
目录,可以很方便地进行一些配置.
在管理员身份下,输入exit
可回到普通用户身份。
手机已经root
安装tsu
,这是一个su
的termux版本,用来在termux上替代su
:
1 | pkg install tsu |
然后终端下面输入:
1 | tsu |
即可切换root
用户,这个时候会弹出root
授权提示,给予其root
权限,效果图如下:
在管理员身份下,输入exit
可回到普通用户身份。
信息安全
因为termux
可以很好的支持Python
,所以几乎所有用Python
编写的安全工具都是可以完美的运行使用的. 总的来说可玩性还是比较高的.
Metasploit
安装Metasploit
Termux官方提供的自动话脚本安装方法如下:
1 | cd ~ |
注 在x86平台下自动化安装失败,想在x86平台下安装的参考 官方的文档 手动去安装.
这个过程平均耗时大约3分钟左右(使用国内的清华源的情况下).
配置msf数据库缓存
意外发现数据库居然都配置好了,启动msfconsole会
自动连接数据库了.
接下来重建数据库缓存
1 | msf > db_rebuild_cache |
这个时候立刻去搜索发现缓存依然没有建立,只能使用慢速搜索,这里其实是这个缓存建立需要时间,只要稍微等待一下就可以了.
国光以前这里做过测试,缓存建立的平均时间是3分钟左右.
然后就可以实现msf
秒搜索的效果了,无需等待,感觉比电脑上还要快呐
解决metasploit启动后无法连接数据库
使用自动化脚本安装好Metasploit
后使用db_status
发现数据库是处于连接状态的,然后在使用db_rebuild_cache
重新建立缓存,等待大约3分钟后,便可以使用快速搜索了,没毛病~
但是
在一段日子过后,可能会出现以下情况:
1 | msfconsole |
报这个错误是因为postgresql
数据库没有启动造成的.解决方法就是启动数据库:
本方法只针对termux上使用自动化脚本安装msf
1 | pg_ctl -D $PREFIX/var/lib/postgresql start |
启动数据库后重新进入msfconsole
会发现启动没有报错了,db_status
查看下数据库连接,也正常了:
Nmap
端口扫描必备工具
1 | pkg install nmap |
hydra
Hydra是著名的黑客组织THC的一款开源暴力破解工具这是一个验证性质的工具,主要目的是:展示安全研究人员从远程获取一个系统认证权限。
1 | pkg install hydra |
sslscan
SSLscan主要探测基于ssl的服务,如https。SSLscan是一款探测目标服务器所支持的SSL加密算法工具。
SSlscan的代码托管在Github
1 | pkg install sslscan |
whatportis
whatportis是一款可以通过服务查询默认端口,或者是通过端口查询默认服务的工具,简单易用。在渗透测试过程中,如果需要查询某个端口绑定什么服务器,或者某个应用绑定的默认端口,可以使用whatportis查询。
1 | pip2 install whatportis |
SQLmap
SQLmap是一款用来检测与利用SQL注入漏洞的免费开源工具 官方项目地址
直接git clone
源码
1 | git clone https://github.com/sqlmapproject/sqlmap.git |
sqlmap支持pip安装了,所以建议直接 pip install sqlmap 来进行安装,然后终端下直接sqlmap就可以了,十分方便.
RouterSploit
RouteSploit框架是一款开源的路由器等嵌入式设备漏洞检测及利用框架。
1 | pip2 install requests |
Slowloris
低带宽的DoS工具
1 | git clone https://github.com/gkbrk/slowloris.git |
RED_HAWK
一款采用PHP语言开发的多合一型渗透测试工具,它可以帮助我们完成信息采集、SQL漏洞扫描和资源爬取等任务。
1 | pkg install php |
Cupp
Cupp是一款用Python语言写成的可交互性的字典生成脚本。尤其适合社会工程学,当你收集到目标的具体信息后,你就可以通过这个工具来智能化生成关于目标的字典。
1 | git clone https://github.com/Mebus/cupp.git |
Hash-Buster
Hash Buster是一个用python编写的在线破解Hash的脚本,官方说5秒内破解,速度实际测试还不错哦~
1 | git clone https://github.com/UltimateHackers/Hash-Buster.git |
D-TECT
D-TECT是一个用Python编写的先进的渗透测试工具,
- wordpress用户名枚举
- 敏感文件检测
- 子域名爆破
- 端口扫描
- Wordperss扫描
- XSS扫描
- SQL注入扫描等
1 | git clone https://github.com/shawarkhanethicalhacker/D-TECT.git |
WPSeku
WPSeku 是一个用 Python 写的简单的 WordPress 漏洞扫描器,它可以被用来扫描本地以及远程安装的 WordPress 来找出安全问题。被评为2017年最受欢迎的十大开源黑客工具.
1 | git clone https://github.com/m4ll0k/WPSeku.git |
XSStrike
XSStrike是一种先进的XSS检测工具。它具有强大的模糊测试引擎.
1 | git clone https://github.com/UltimateHackers/XSStrike.git |
小结
因为Termux完美的支持Python
和Perl
等语言,所以有太多优秀的信息安全工具值得大家去发现了,这里我就不一一列举了.
Python环境部署
安装python2.7
1 | pkg install python2 |
安装完成后,使用python2
命令启动python 2.7.14
环境.
安装python3
1 | pkg install python |
安装完成后,使用python
命令启动python 3.6.5
环境.
升级pip版本
1 | python2 -m pip install --upgrade pip |
这两条命令分别升级了pip2
和pip3
到最新版.
pip版本查看
ipython
ipython是一个python的交互式shell,支持变量自动补全,自动缩进,支持bash shell命令,内置了许多很有用的功能和函数。学习ipython将会让我们以一种更高的效率来使用python。
先安装clang
,否则直接使用pip
安装ipython
会失败报错.
1 | pkg install clang |
然后分别使用ipython
和ipython2
进入py2
和py3
控制台:
编辑器
终端下有vim
神器,并且官方也已经封装了vim-python
,对vim
进行了Python相关的优化.
1 | pkg install vim-python |
解决termux下的vim汉字乱码
在家目录下,新建.vimrc
文件
1 | vim .vimrc |
添加内容如下:
1 | set fileencodings=utf-8,gb2312,gb18030,gbk,ucs-bom,cp936,latin1 |
然后source
下变量:
1 | source .vimrc |
效果图
nodejs
安装nodejs
1 | pkg install nodejs |
安装比较方便,但是在安装的时候报错了
1 | Cannot read property 'length' of undefined |
查了下是这边版本的问题
官方的解决方法如下
disable concurrency in case of libuv/libuv#1459
解决npm安装报错
1 | vim $PREFIX/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js |
我这里修改length的是4
,这个好像和CPU有关,总之这里的length得指定一个数字.
然后在重新安装下npm install hexo-cli -g
成功.
MariaDB(MySQL)安装
MariaDB数据库管理系统是MySQL的一个分支,主要由开源社区在维护,采用GPL授权许可。开发这个分支的原因之一是:甲骨文公司收购了MySQL后,有将MySQL闭源的潜在风险,因此社区采用分支的方式来避开这个风险。
安装mariadb
1 | pkg install mariadb |
安装基本数据
1 | mysql_install_db |
启动mariadb服务
1 | mysqld |
启动完成后,这个会话就一直存活,类似与debug调试一样,只有新建会话才可以操作.
关于隐藏会话可以使用nohup
命令和tmux
命令,这里我建议使用tmux
命令
新建termux会话
由于mariadb安装的时候没有设置密码,当前的mariadb
密码为空
.
1 | mysql |
直接进入mariadb
数据库.输入exit
退出数据库.
修改密码
输入一下命令,进行密码相关的安全设置:
1 | mysql_secure_installation |
输入当前输入密码
因为是空
密码,这里默认 回车
1 | Enter current password for root (enter for none): |
设置新密码
这里设置新的root密码
1 | Set root password? [Y/n] y |
其他设置
下面根据个人偏好来进行设置,没有绝对的要求
1 | Remove anonymous users? [Y/n] Y #是否移除匿名用户 |
使用密码登录数据库
1 | $ mysql -uroot -p |
tmux
Tmux是一个优秀的终端复用软件,类似GNU Screen,但来自于OpenBSD,采用BSD授权。一旦你熟悉了 tmux 后, 它就像一个加速器一样加速你的工作效率。
安装tmux
1 | pkg install tmux |
新建mysql会话
上面介绍的mysqld
后会一直卡在那里,强迫症表示接受不了,重启手机
,现在尝试使用tmux
来管理会话.
1 | tmux new -s mysql |
可以看到最下面的提示,表明现在是在mysql
的会话下面操作
启动mysqld并断开会话
启动mysqld
1 | mysqld |
让会话后台运行
使用快捷键组合Ctrl
+b
+ d
,三次按键就可以断开当前会话。
使用mysql
现在那个mysqld
会话被放在后台运行了,整个界面看上去很简介,使用
1 | mysql -uroot -p |
可以优雅的使用数据库了.
效果图
关于tmux
更多进阶的用法这里不在过多介绍了.
php
termux
封装的php版本是php 7.2.5
安装PHP
1 | pkg install php |
查看下版本
自
PHP5.4
之后 PHP内置了一个Web 服务器,来在termux
下尝试下PHP Web Server的简单使.
编写测试文件
在家目录下建一个www
文件夹:mkdir www
在www
文件夹下新建一个index.php
文件,其内容为
1 | phpinfo(); |
启动WebServer
1 | php -S 127.0.0.1:8080 -t www/ |
浏览器访问效果如下:
nginx
Nginx 是一个高性能的 Web 和反向代理服务器, 它具有有很多非常优越的特性.
安装nginx包
1 | pkg install nginx |
切换root用户
尝试下能不能解析默认的index.html
主页
这个文件在termux
上的默认位置为/data/data/com.termux/files/usr/share/nginx/html/index.html
切换root用户
默认的普通权限无法启动nginx,需要模拟
root
权限才可以
没有这个命令的话,手动安装pkg install proot
包
1 | termux-chroot |
进入模拟的root环境
启动nginx
在模拟的root环境下启动nginx
1 | nginx |
termux
上nginx
默认的端口是8080
查看下8080
端口是否在运行
1 | netstat -an |grep 8080 |
然后手机本地直接访问:http://127.0.0.1:8080
查看下nginx
是否正常启动.
效果图
这样一个默认的nginx
服务就起来了,但是意义不大,得配置一下可以解析php
才会有更大的意义.
停止nginx服务
这里是直接杀掉占用端口的进程,具体端口以实际情况为准.
1 | fuser -k 8080/tcp |
重启nginx服务
1 | nginx -s reload |
nginx解析PHP
nginx
解析PHP
这里单独拿出一级标题来叙述,成功解析的话,下面安装wordpress
等cms就会轻松很多.
nginx本身不能处理PHP,它只是个web服务器,当接收到php请求后发给php解释器处理,nginx一般是把请求发fastcgi管理进程处理,PHP-FPM是一个PHP FastCGI管理器,所以这里得先安装php-fpm
.
这里默已经安装了nginx和php,没有安装的话,使用
pkg install php nginx
来进行安装,参考上面部分进行配置
安装并配置php-fpm
安装php-fpm
1 | pkg install php-fpm |
配置php-fpm
进入proot
环境,然后编辑配置文件www.conf
(先进proot可以更方便操作编写相关配置文件)
1 | termux-chroot |
定位搜索listen
找到
1 | listen = /data/data/com.termux/files/usr/var/run/php-fpm.sock |
将其改为
1 | listen = 127.0.0.1:9000 |
配置nginx
在proot
环境下,然后编辑配置文件nginx.conf
1 | vim /etc/nginx/nginx.conf |
下面给出已经配置好的模板文件,直接编辑替换整个文件即可:
1 |
|
里面的网站默认路径就是nginx
默认的网站根目录:
1 | root /data/data/com.termux/files/usr/share/nginx/html; |
要修改网站默认路径的话,只需要修改这两处即可.
建立php测试文件
在/usr/share/nginx/html
目录下新建一个phpinfo.php
文件,其内容是:<?php phpinfo();?>
went
启动php-fpm和nginx
在proot
环境下面分别启动php-fpm
和nginx
,这里的nginx
不在proot
环境下启动后会出一些问题,感兴趣的可以自己去研究看看.
1 | php-fpm |
浏览器访问测试
浏览器访问http://127.0.0.1:8080/phpinfo.php
查询php
文件是否解析了.
搭建WordPress
这里只是用wordpress
做个典型安利来讲解,类似地可以安装Discuz
,DeDecms
等国内主流的PHP应用程序.
方法一 使用PHP内置的Web Server
确保安装并配置了php
和mariadb
,没有安装好的话,参考本文中具体细节部分来进行安装.
新建数据库
***
这里是mysql的密码
1 | mysql -uroot -p*** -e"create database wordpress;show databases;" |
下载解压wordpress
1 | wget https://cn.wordpress.org/wordpress-4.9.4-zh_CN.zip |
启动PHP Web Server
到解压后的wordpress
目录下,执行
1 | cd wordpress |
然后浏览器访问127.0.0.1:8080
开始进行wordperss
的安装.
效果图
方法二 nginx+PHP+Mariadb
上面使用的方法一是直接使用PHP自带的PHP Web Server
来运行的,看上去不够严谨~,所以这里用nginx
来部署wordpress
.
确保安装了PHP
,php-fpm
,mariadb
,没有安装的话,参考本文中具体细节部分来进行安装和配置.
新建数据和wordpress下载参考上面的方法一
,这里主要介绍使用nginx
去解析wordpress
源文件.
当前解压后wordpress
的绝对路径是:
1 | /data/data/com.termux/files/home/wordpress |
编辑nginx.conf
1 | vim /etc/nginx/nginx.conf |
修改为如下几处:
1 | root /data/data/com.termux/files/home/wordpress; |
启动php-fpm和nginx
在proot
环境下面分别启动php-fpm
和nginx
,这里的nginx
不在proot
环境下启动后会出一些问题,感兴趣的可以自己去研究看看.
1 | php-fpm |
安装wordpress
浏览器访问:http://127.0.0.1:8080/wp-admin/setup-config.php
进行安装.
效果图
同理安装其他博客也就轻而易举了,可玩性大大增加~
搭建hexo博客
安装hexo
1 | npm install hexo-cli -g |
部署hexo博客环境
然后建立一个目录,然后到这个目录下初始化hexo环境
1 | mkdir hexoblog #手动创建一个目录 |
然后就跑起来一个最基本的hexo博客
关于hexo博客的详细教程,建议搭建去参考hexo官方文档,我这里重点在于 termux 其他的不作过多的叙述.
效果图
termux ssh 连接电脑
有时候要操作电脑,这个时候有了termux
,躺在床上就可以操作电脑了,岂不是美滋滋~~
安装openssh
1 | pkg install openssh |
然后就可以直接ssh连接你的电脑了
前提是电脑安装了ssh服务
1 | $ ssh sqlsec@192.168.1.8 |
手机连接操作电脑效果图:
电脑ssh连接Termux
emmm 这个需求比较鸡肋,但是写文字嘛就得写全了~
安装openssh
同样也需要openssh
才可以
1 | pkg install openssh |
启动sshd
安装完成后,sshd
服务默认没有启动,所以得手动启动下:
1 | sshd |
因为手机上面低的端口有安全限制,所以这里的openssh
默认的sshd
默认的服务是8022
端口上的.ssh
的用户名用whoami
命令看下.
可以看到sshd
启动后,端口才可以看到.
PC端生成公钥
ssh
登录是key公钥模式登录,首先在PC端生成秘钥:
1 | sqlsec@ubuntu:-> ssh-keygen -t rsa |
执行完成后,会在家目录下创建3个文件id_rsa
, id_rsa.pub
, known_hosts
拷贝公钥到手机
然后把公钥id_rsa.pub
拷贝到手机的data\data\com.termux\files\home\.ssh
文件夹中.
将公钥拷贝到验证文件中
在Termux
下操作
1 | cat id_rsa.pub > authorized_keys |
PC端连接手机termux
1 | sqlsec@ubuntu-> ssh -p8022 u0_a119@192.168.1.3 |
效果图
pc端连接手机termux 真心鸡肋呀~(忍不住自己吐槽下自己)
使用Aria2打造自己的下载工具
Aria2是一个轻量级多协议和多源命令行下载实用工具。它支持 HTTP / HTTPS, FTP, SFTP, bt 和 Metalink。通过内置 Aria2 可以操作 json - rpc 和 xml - rpc。配置好的话还可以高速下载百度云文件.
安装aria2
1 | pkg install aria2 |
本地启动服务
1 | aria2c --enable-rpc --rpc-listen-all |
这个rpc
服务默认监听的是6800
端口,启动后方便下面的Web界面连接操作.
webui-aria2
这是个Aria2的热门项目,把Aria2封装在了Web平台,操作起来更加简单便捷。
1 | git clone https://github.com/ziahamza/webui-aria2.git |
需要node来运行,没有安装的 话使用
pkg install nodejs
来安装
使用效果图 ,速度蛮快的 ,有兴趣的可以研究如何利用aria2
来下载百度云文件,等你们来探索.
多功能文件分享
安装caddy
官方:到目前为止,在Android上运行Caddy有两种方式:Termux
和adb
,所以那就顺便折腾一下看看吧:
1 | cd ~ |
这一步可能执行要3
番钟左右,耐心等待一下即可.
编写配置文件
1 | cd ~ |
内容如下:
1 | :8080 { |
这里的8080
端口号可以随意指定,因为手机权限比较低,所以一般设置1024
以上的端口.
注意8080
和{
之间有一个空格
注意/ / sdcard
两个斜杠之间也有一个空格
启动caddy
1 | caddy |
效果
浏览器访问:http://127.0.0.1:8080
即可,局域网内的用户访问手机ip地址即可.
默认账号和密码为admin
,admin
.
可以在设置界面里面 设置简体中文
,可以修改更新默认密码
.
可以直接查看文件,也支持Linux
命令搜索.
Termux-api
Termux:API,用于访问手机硬件,实现更多的可玩性,可以实现如下等功能:
- 访问电池信息
- 获取相机设备信息
- 获取本机设备信息
- 获取设置剪贴板信息
- 获取通讯录信息
- 获取设置手机短信
- 拨打号码
- 振动设备
安装Termux-api
补充一下链接如何在电脑上下载Google play上的应用?
安装Termux-api软件包
安装完Termux-api
APP后,Termux
里面必须安装对应的包后才可以实现操作手机底层.
1 | pkg install termux-api |
下面只列举一些可能会用到的,想要获取更多关于Termux-api
的话,那就去参考官方文档.
获取电池信息
1 | termux-battery-status |
可以看到电池的-健康状况-电量百分比-温度情况等
1 | { |
获取相机信息
1 | termux-camera-info |
获取与设置剪贴板
查看当前剪贴板内容
1 | termux-clipboard-get |
设置新的剪贴板内容
1 | termux-clipboard-set PHP是世界上最好的语言 |
效果演示
获取通讯录列表
1 | termux-contact-list |
查看短信内容列表
1 | termux-sms-inbox |
发送短信
1 | termux-sms-send |
支持同时发送多个号码,实现群发的效果,官方介绍如下:
1 | termux-sms-send -n number(s) recipient number(s) - separate multiple numbers by commas |
发送测试
1 | termux-sms-send -n 10001 cxll |
拨打电话
1 | termux-telephony-call |
拨打电话给10001
中国电信,查看下话费有没有欠费~?
1 | termux-telephony-call 10001 |
WiFi相关
获取当前WiFi连接信息
1 | termux-wifi-connectioninfo |
获取最近一次WiFi扫描信息
1 | termux-wifi-scaninfo |
小结
直接操作调动系统底层的话,可以通过编程来实现自动定时短信发送,语音播报等 DIY空间无线
一些无聊的尝试
一些无聊有趣的版块,如果你是一个正经讲究人,可以跳过这个板块以节约你的阅读时间.
nyancat 彩虹猫
彩虹貓(英语:Nyan Cat)是在2011年4月上传在Youtube 的视频,并且迅速爆红于网络,並在2011年YouTube浏览量最高的视频中排名第五.
1 | pkg install nyancat |
什么鬼完全Get不到国外人的趣味点
终端二维码
Linux 命令行下的二维码,主要核心是这个网址:http://qrenco.de/
1 | echo "http://www.sqlsec.com" |curl -F-=\<- qrenco.de |
如果你不嫌无聊的话还可以扫描这个二维码,然后就打开我的博客了.
终端地图
一个基于nodejs
编写的命令行下的地图.
1 | npm install mapscii -g |
进入终端地图
操作方法
- 方向键 移动
-
a
和z
键 放大缩小 -
q
键 退出
终端下的地图!讲究人~ 如果你足够无聊的话,还可以尝试能不能在这个地图上找到自己所在的位置.
其他没有写到的内容
安装Linux
甚至还可以在Termux
里面在安装其他的Linux
发行版.
由于本文篇幅已经过长了,这里不在叙述了,感兴趣,能折腾的自己去找一些资料.下面列出目前网友们用Termux
可以成功安装的发行版:
- Ubuntu
- Arch
- Fedora
- Kali Nethunter
Ubuntu
Fedora
内网穿透
使用ngrok
或者frp
可以将Termux
上面搭建的网站映射到外网上去,手机建站
也不是不可能了.
Python Jupyter Notebook
Jupyter notebook(又称IPython notebook),支持运行超过40种编程语言。Python的一个强大的模块,成功安装的话可以实现比caddy
的效果,支持web
下的终端操作,支持代码高亮运行.由于这里需要安装大量文件,加上用户需求比较少,这一块感兴趣的话可以自己去探索.
下载工具
- you-get
是一款命令行工具,用来下载网页中的视频、音频、图片,支持众多网站,包含 41 家国内主流视频、音乐网站,如 网易云音乐、AB
站、百度贴吧、斗鱼、熊猫、爱奇艺、凤凰视频、酷狗音乐、乐视、荔枝FM、秒拍、腾讯视频、优酷土豆、央视网、芒果TV
等等,只需一个命令就能直接下载视频、音频以及图片回来,并且可以自动合并视频。而对于有弹幕的网站,比如 B 站,还可以将弹幕下载回来
- BaiduPCS-Go
仿 Linux shell 文件处理命令的百度网盘命令行客户端.
可以完美在Termux
上运行.
总结
相对来说 国外的Termux DIY的氛围比国内好很多,Youtube上的视频都有很高的播放量:
-—– 往事如烟,伴着远去的步伐而愈加朦胧。未来似雾,和着前进的风儿而逐渐清晰!
Termux 高级终端安装使用配置教程 | 国光
Termux 高级终端安装使用配置教程,刚写这篇文章的时候,当时国内 Termux 相关的文章和资料相对来说还是比较少的,就花了几天写了这一篇文章,没想到居然火了,受宠若惊。所以这篇文章国光就打算定期更新了,想打造成 termux 的中文文档,希望本文可以帮助到更多对 Termux 感兴趣的朋友,发挥 Android 平台更大的 DIY 空间。
版权声明
17 年开始接触到 Termux,就发现它有很多值得挖掘的潜力,于是抽空在 18 年的某一个法定的整整花了三天假期开才写完第一版文章,然后文章陆陆续续更新到现在,期间有一次误操作不小心把博客所有的评论都删了,否则这篇文章的评论数会更多。现在本文的截图数量达到了150张左右了,文字数目已经数万多了。自己花了很长时间写出来的原创文章,抄袭白嫖党直接Ctrl+C Ctrl+V只要几秒钟。原创很辛苦,抄袭的成本却很低,维权的成本又很高,虽然国内目前的抄袭风气很严重,但是我相信尊重原创,保护原创从现在做起从大家做起,tomorrow is another day! 如果大面转载引用的话 希望标明文章出处:
Termux 高级终端安装使用配置教程
https://www.sqlsec.com/2018/05/termux.html
学习资源
考虑到手机用户体验和离线观看教程的需求,国光打包了几种风格的 PDF版本,并且已经插入好目录,阅读体验会比较友好。
黑色背景的 PDF : Termux入门指南(Vue 黑)
白色背景的 PDF : Termux入门指南(Github 白)
macOS light风格 : Termux入门指南(macOS 白)
Gothic风格 : Termux入门指南(简约线条)
早期我的信息安全交流群里面陆陆续续加了很多 Temux 玩家,然而那是一个信息安全交流群,Termux 的提问经常没有人回答,所以后来我就把博客所有的加群链接给去了。现在国光我单独建立了 1 个Temux 群,加群链接藏在本文当中,是一个彩蛋,缘妙不可言,随缘入群吧。好了话不多说,教程开始了,希望本文可以帮助到大家。
Termux 简介
文档相关
下载地址
Google Play 下载的版本比酷安要新,而且插件这块安装也很方便,有能力的朋友建议首先考虑下载Google PLay版本的,然后考虑 F-Droid版本,最后再考虑可怜兮兮的酷安版本。
Termux 是一个 Android 下一个高级的终端模拟器,开源且不需要 root,支持 apt 管理软件包,十分方便安装软件包,完美支持 Python、 PHP、 Ruby、 Nodejs、 MySQL等。随着智能设备的普及和性能的不断提升,如今的手机、平板等的硬件标准已达到了初级桌面计算机的硬件标准,用心去打造 DIY 的话完全可以把手机变成一个强大的极客工具。
初始化
第一次启动Termux的时候需要从远程服务器加载数据,然而可能会遇到这种问题:
Verilog
1 | Ubable to install |
这里的Termux官方远程的服务器地址是: http://termux.net/bootstrap/
目前解决方法有两种:
- VPN 全局代理 (成功率很高)
- 如果你是 WiFi 的话尝试切换到运营商流量 (有一定成功率)
- ① Google Play ② F-Droid ③ 酷安 根据这个顺序重复1、2操作
基本操作
基本操作还是要学习一下的,可以事半功倍。
缩放文本
可以使用缩放手势来调整其字体大小。 对就是 双指放大缩小照片那样操作。
长按屏幕
长按屏幕会调出显示菜单项(包括复制、粘贴、更多),方便我们进行复制或者粘贴
More
菜单的说明如下:
Bash
1 | 长按屏幕 |
会话管理
显示隐藏式导航栏,可以新建、切换、重命名会话session和调用弹出输入法
同时在Android的通知栏中也可以看到当前Termux运行的会话数:
常用按键
常用键是PC端常用的按键如: ESC键、Tab键、CTR键、ALT键,有了这些按键后可以提高我们日常操作的效率,所以Termux后面的版本默认都是显示这个扩展功能按键的。 (18年的时候默认是不显示的)
打开和隐藏这个扩展功能按键目前有下面两种方法:
方法一
从左向右滑动,显示隐藏式导航栏,长按左下角的KEYBOARD
方法二
使用Termux
快捷键:音量+
+Q
键 或者 音量+
+K
键
当然这个常用按键在 Termux 后面的版本也支持自定义的,详情见本文的「进阶配置」-「定制常用按键」这一小节。
基础知识
这些基础知识简单了解一下就可以了,Linux 用的多了 就会慢慢熟悉理解了。
快捷键表
Ctrl
键是终端用户常用的按键,但大多数触摸键盘都没有这个按键,因此 Termux 使用音量减小按钮
来模拟Ctrl
键。
例如,在触摸键盘上按音量减小
+ L
就相当于是键盘上按Ctrl + L
的效果一样,达到清屏的效果。
-
Ctrl + A
-> 将光标移动到行首 -
Ctrl + C
-> 中止当前进程 -
Ctrl + D
-> 注销终端会话 -
Ctrl + E
-> 将光标移动到行尾 -
Ctrl + K
-> 从光标删除到行尾 -
Ctrl + U
-> 从光标删除到行首 -
Ctrl + L
-> 清除终端 -
Ctrl + Z
-> 挂起(发送SIGTSTP到)当前进程 -
Ctrl + alt + C
-> 打开新会话(仅适用于 黑客键盘)
音量加键
也可以作为产生特定输入的特殊键
.
-
音量加 + E
-> Esc键 -
音量加 + T
-> Tab键 -
音量加 + 1
-> F1(音量增加 + 2
→ F2…以此类推) -
音量加 + 0
-> F10 -
音量加 + B
-> Alt + B,使用readline时返回一个单词 -
音量加 + F
-> Alt + F,使用readline时转发一个单词 -
音量加 + X
-> Alt+X -
音量加 + W
-> 向上箭头键 -
音量加 + A
-> 向左箭头键 -
音量加 + S
-> 向下箭头键 -
音量加 + D
-> 向右箭头键 -
音量加 + L
-> | (管道字符) -
音量加 + H
-> 〜(波浪号字符) -
音量加 + U
-> _ (下划线字符) -
音量加 + P
-> 上一页 -
音量加 + N
-> 下一页 -
音量加 + .
-> Ctrl + \(SIGQUIT) -
音量加 + V
-> 显示音量控制 -
音量加 + Q
-> 切换显示的功能键视 -
音量加 + K
-> 切换显示的功能键视图
快捷键用的熟悉的话也可以极大提高操作的效率。
基本命令
Termux 除了支持 apt
命令外,还在此基础上封装了pkg
命令,pkg
命令向下兼容 apt
命令。apt
命令大家应该都比较熟悉了,这里直接简单的介绍下pkg
命令:
Bash
1 | pkg search <query> ## 搜索包 |
国光建议大家使用 pkg 命令,因为 pkg 命令每次安装的时候自动执行 apt update 命令,很是方便
软件安装
除了通过上述的 pkg
命令安装软件以外,如果我们有 .deb
软件包文件,也可以使用 dpkg
进行安装。
Bash
1 | dpkg -i ./package.de ## 安装 deb 包 |
目录结构
Bash
1 | echo $HOME |
长期使用 Linux 的朋友可能会发现,这个HOME路径看上去和我们电脑端的不太一样,这是为了方便 Termux 提供的特殊的环境变量。
端口查看
Android 10 以下版本
Andorid 10 以下的版本是可以正常使用netstat 命令的,这样可以方便的查看端口开放信息
Bash
1 | ## 查看所有端口 |
Android 10 版本
Andorid 10 版本的Termux 下无法正常使用 netstat -an 命令,国光的解决方法是安装一个 nmap,然后扫描本地端口(弯道超车):
Bash
1 | ## 安装nmap端口扫描神器 |
使用 nmap 操作 纯属无奈之举,但是又不是不能用(源于:罗永浩名言 :-))
进阶配置
要想使用体验好,进阶配置少不了。(单押)
更换国内源
使用pkg update
更新一下的时候发现默认的官方源网速有点慢,在这个喧嚣浮躁的时代,我们难以静下心等待,这个时候就得更换成国内的Termux
清华大学源了,加快软件包下载速度。
方法一:自动替换(推荐)
可以使用如下命令自动替换官方源为 TUNA 镜像源
pkg update
卡住的话多按几次回车 不要傻乎乎的等
Bash
1 | sed -i 's@^\(deb.*stable main\)$@#\1\ndeb https://mirrors.tuna.tsinghua.edu.cn/termux/termux-packages-24 stable main@' $PREFIX/etc/apt/sources.list |
更换源几秒钟就可以执行完pkg update
了,心里顿时乐开了花。
方法二:手动修改
请使用内置或安装在 Termux 里的文本编辑器,例如 vi
/ vim
/ nano
等直接编辑源文件,不要使用 RE 管理器等其他具有 ROOT 权限的外部 APP 来修改 Termux 的文件
编辑 $PREFIX/etc/apt/sources.list
修改为如下内容
Bash
1 | ## The termux repository mirror from TUNA: |
编辑 $PREFIX/etc/apt/sources.list.d/science.list
修改为如下内容
Bash
1 | ## The termux repository mirror from TUNA: |
编辑 $PREFIX/etc/apt/sources.list.d/game.list
修改为如下内容
Bash
1 | ## The termux repository mirror from TUNA: |
安装基础工具
更换源之后来赶紧来下载安装一些基本工具吧,这些工具基本上是 Linux 系统自带的,因为 Termux 为了体积不过大,默认是没有带这些工具的,执行下面的命令来安装:
Bash
1 | pkg update |
终端配色方案
脚本项目地址:https://github.com/Cabbagec/termux-ohmyzsh/
该脚本主要使用了zsh
来替代bash
作为默认 shell,并且支持色彩和字体样式,同时也激活了外置存储,可以直接访问SD卡下的目录。主题默认为 agnoster,颜色样式默认为 Tango,字体默认为 Ubuntu。
执行下面这个命令确保已经安装好了 curl 命令
Bash
1 | sh -c "$(curl -fsSL https://github.com/Cabbagec/termux-ohmyzsh/raw/master/install.sh)" |
如果因为不可抗力的原因,出现port 443: Connection refused
网络超时的情况,那么执行下面国光迁移到国内的地址的命令即可:
Bash
1 | sh -c "$(curl -fsSL https://html.sqlsec.com/termux-install.sh)" |
Android6.0 以上会弹框确认是否授权访问文件,点击始终允许
授权后 Termux 可以方便的访问SD卡文件。
手机 App 默认只能访问自己的数据,如果要访问手机的存储,需要请求权限,如果你刚刚不小心点了拒绝的话,那么可以执行以下命令来重新获取访问权限:
Bash
1 | termux-setup-storage |
脚本允许后先后有如下两个选项:
Bash
1 | Enter a number, leave blank to not to change: 14 |
分别选择色彩样式
和字体样式
,重启Termux app后生效配置。不满意刚刚的效果,想要继续更改配色方案的话,可以根据下面命令来更改对应的色彩配色方案:
设置色彩样式:
输入chcolor
命令更换色彩样式,或者:~/.termux/colors.sh
命令
设置字体
运行chfont
更换字体,或者:~/.termux/fonts.sh
命令
创建目录软连接
执行过上面的一键配置脚本后,并且授予 Termux 文件访问权限的话,会在家目录生成storage
目录,并且生成若干目录,软连接都指向外置存储卡的相应目录:
创建QQ文件夹软连接
手机上一般经常使用手机QQ来接收文件,这里为了方便文件传输,直接在storage
目录下创建软链接.
QQ
Bash
1 | ln -s /data/data/com.termux/files/home/storage/shared/tencent/QQfile_recv QQ |
TIM
Bash
1 | ln -s /data/data/com.termux/files/home/storage/shared/tencent/TIMfile_recv TIM |
这样可以直接在home
目录下去访问QQ文件夹,大大提升了工作效率。
定制常用按键
在 Termux v0.66 的版本之后我们可以通过 ~/.termux/termux.properties
文件来定制我们的常用功能按键,默认是不存在这个文件的,我们得自己配置创建一下这个文件。
下面做尝试简单配置一下这个文件:
Bash
1 | ## 新建并编辑配置文件 |
内容为:
Bash
1 | extra-keys = [ \ |
如果无法创建这个文件,那么得首先新建一下这个目录 mkdir ~/.termux
修改完成保存文件后,重启 Termux app生效配置:
可以直接输入特殊的字符串,例如上面的例子中的|
就是一个字符串,此外 Termux 还有封装了一些特殊按键,入上面例子中的ESC
就是 Termux 自带的按键,完整的特殊按键表如下:
按键
说明
CTRL
特殊按键
ALT
特殊按键
FN
特殊按键
ESC
退出键
TAB
表格键
HOME
原位键
END
结尾键
PGUP
上翻页键
PGDN
下翻页键
INS
插入键
DEL
删除键
BKSP
退格键
UP
方向键 上
LEFT
方向键 左
RIGHT
方向键 右
DOWN
方向键 下
ENTER
回车键
BACKSLASH
反斜杠 \
QUOTE
双引号键
APOSTROPHE
单引号键
F1~F12
F1-F12按键
上面列出的三个特殊键中的每一个最多只能在附加键定义中列出一次,超过次数将会报错。
下面是国光我自用的按键表:
Bash
1 | extra-keys = [ \ |
zsh 主题配色
编辑家目录下的.zshrc
配置文件
Bash
1 | $ vim .zshrc |
第一行可以看到,默认的主题是agnoster
主题:
实际上这个主题也蛮酷的,如果你还想更换其他主题的话,那么在.oh-my-zsh/themes
目录下放着oh-my-zsh
所有的主题配置文件,只要将默认的 agnoster 更换为其他的主题文件名即可。
下面是国光认为还不错的几款主题
agnoster
ys
robbyrussell
主题比较多,国光这里就不列举了,感兴趣大家可以一个个尝试去看看。 当然如果你是个变态的话,可以尝试random
主题,每打开一个会话配色主题都是随机的.
Bash
1 | ZSH_THEME="random" |
zsh 插件推荐
zsh 之所以受欢迎除了好看的配色以为,另一个原因就是强大的插件了。下面国光列举一款比较实用的插件的安装方法,更多强大的插件等待大家自己去探索。
autosuggestions
根据用户的平时使用习惯,终端会自动提示接下来可能要输入的命令,这个实际使用效率还是比较高的:
Bash
1 | ## 拷贝到 plugins 目录下 |
在 ~/.zshrc
中配置:
Ini
1 | plugins=(其他的插件 zsh-autosuggestions) |
输入zsh
命令生效配置:
效果图
可以看到国光我只敲了一个v
后面的命令就自动提示补全了,这时候只要按右方向键
,在 Termux 里面的快捷键是 音量加 + D
,就可以直接补全命令了。
修改启动问候语
默认的启动问候语如下:
这个启动问候语在前期对于初学者有一定的帮助,但是随着你们 Termux 的熟悉,这个默认的问候语就会显得比较臃肿。编辑问候语文件可以直接修改启动显示的问候语:
Bash
1 | vim $PREFIX/etc/motd |
修改完的效果如下:
本文版本归国光所有 转载注明出处哦
这样启动新的会话的时候看上去就会简洁很多。什么你也想要这个效果? 呐 下面是国光自己生成的,可以直接复制粘贴:
Ini
1 | _____ |
超级管理员身份
实际上 Termux 不需要 root 权限也可以折腾各种各样的操作的,大家不必对 root 抱有啥幻想,本文的操作基本上没有涉及到手机要用到 root 的地步。
手机没有root
利用proot
可以为手机没有root的用户来模拟一个root的环境,这里主要是经典的 Linux 文件系统布局上的模拟。
Bash
1 | pkg install proot -y |
然后终端下面输入:
Bash
1 | termux-chroot |
即可模拟root
环境,该环境模仿 Termux 中的常规Linux文件系统,但是不是真正的 root。
输入exit
可回到普通用户的文件系统。
手机已经root
安装tsu
,这是一个su
的 Termux 版本,是一个真正的root权限,用来在termux上替代su
,操作不慎可能对手机有安全风险。因为官方封装了,所以安装也很简单:
Bash
1 | pkg install tsu -y |
然后终端下面输入:
Bash
1 | tsu |
即可切换root
用户,这个时候会弹出root
授权提示,给予其root
权限,效果图如下:
18年的老图了 将就着看吧
在管理员身份下,输入exit
可回到普通用户身份。不过本文没有设计到 root 权限的操作,一些底层的工具可能才会需要,考虑到 root 的不安全性 和 那些工具的冷门性,国光这里就没有继续拓展。
开发环境
Termux 支持的开发环境很强,可以完美的运行 C、Python、Java、PHP、Ruby等开发环境,建议读者朋友们选择自己需要的开发环境折腾。
编辑器
写代码前总得折腾一下编辑器,毕竟磨刀不误砍柴工嘛。Termux 支持多种编辑器,完全可以满足日常使用需求。
Emacs
据说Emacs是神的编辑器,国光我这种小菜鸡还不会使用哎,但是 Termux 官方已经封装好了 Emacs了,我们安装起来就会简单很多:
Bash
1 | pkg install emacs |
nano
nano 是一个小而美的编辑器。具有如下:打开多个文件,每行滚动,撤消/重做,语法着色,行编号等功能
同样安装起来也很简单:
Bash
1 | pkg install nano |
Vim
Vim 被称为编辑器之神,基本上 Linux 发行版都会自带 Vim,这个在前文基本工具已经安装了,如果你没有安装的话,可以使用如下命令安装:
Bash
1 | pkg install vim |
并且官方也已经封装了vim-python
,对Python相关的优化。
Bash
1 | pkg install vim-python |
解决汉字乱码
如果你的Vim打开汉字出现乱码的话,那么在家目录(~
)下,新建.vimrc
文件
Bash
1 | vim .vimrc |
添加内容如下:
Ini
1 | set fileencodings=utf-8,gb2312,gb18030,gbk,ucs-bom,cp936,latin1 |
然后source
下变量:
Bash
1 | source .vimrc |
效果图
Vim 配色
Termux Vim 自带了如下的配色:
Bash
1 | ls /data/data/com.termux/files/usr/share/vim/vim82/colors |
配色可以自己一个个尝试一下,还是向上面的汉字乱码那样,编辑家目录下的.vimrc
文件:
Bash
1 | vim ~/.vimrc |
新增如下内容:
Ini
1 | set nu " 显示行号 |
下面是国光随便找的几个颜色主题效果,感兴趣的朋友可以自己一个个尝试:
slate
murphy
peachpuff
Apache
Apache是一个开源网页服务器软件,由于其跨平台和安全性,被广泛使用,是最流行的Web服务器软件之一。
安装 Apache
Bash
1 | pkg install apache2 |
启动 Apache
Bash
1 | apachectl start |
然后浏览器访问: http://127.0.0.1:8080
访问是否成功启动:
Termux 自带的 Apache 的网站默认路径为:
$PREFIX/share/apache2/default-site/htdocs/index.html
停止 Apache
Bash
1 | apachectl stop |
重启 Apache
Bash
1 | apachectl restart |
Apache 解析 PHP
既然Apache、PHP、MySQL都成功安装的话,那么现在只要配置好 Apache 解析 PHP 之后就可以打造一个 Android 平台上的 LAMPP平台了。
安装 php-apache
默认的 Apache 是无法解析 PHP的,我们需要安装相应的包:
Bash
1 | pkg install php-apache |
配置 Apache
Termux 上的 Apache 默认配置文件的路径为:
$PREFIX/etc/apache2/httpd.conf
直接编辑配置文件:
Bash
1 | vim /data/data/com.termux/files/usr/etc/apache2/httpd.conf |
配置文件里面搜索 PHP 没有相关的模块,所以需要我们手动添加 PHP7 的模块:
Bash
1 | LoadModule php7_module /data/data/com.termux/files/usr/libexec/apache2/libphp7.so |
并在刚刚这个语句下方添加解析器,内容如下:
Properties
1 | \.php$> |
接着继续往下找配置文件里面配置默认首页的地方,我们添加 index.php
到默认首页的规则里面:
Properties
1 | dir_module> |
这表示网站目录的默认首页是 index.php,如果没有 index.php 系统会自动寻找 index.html做为默认首页了。
修改完 Apache 的配置文件后,记得使用 apachectl restart
重启 Apache 服务,然后这个时候回发现我们重启居然报错了:
Verilog
1 | Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP. |
不要慌问题不大,下面来解决这个问题
解决 Apache PHP 报错
先找到如下行
Properties
1 | LoadModule mpm_worker_module libexec/apache2/mod_mpm_worker.so |
给他注释掉为:
Properties
1 | #LoadModule mpm_worker_module libexec/apache2/mod_mpm_worker.so |
然后找到如下行:
Properties
1 | #LoadModule mpm_prefork_module libexec/apache2/mod_mpm_prefork.so |
取消注释为:
Properties
1 | LoadModule mpm_prefork_module libexec/apache2/mod_mpm_prefork.so |
最终的示例图如下:
解析 PHP 测试
在 Apache 的网站根目录下,创建一个 index.php ,测试一下 phpinfo() 函数能否正常运行:
Bash
1 | echo '<?php phpinfo(); ?>' > $PREFIX/share/apache2/default-site/htdocs/index.php |
然后浏览访问: http://127.0.0.1:8080
查看效果:
OK
C
Termux 官方封装了 Clang,他是一个C、C++、Objective-C和Objective-C++编程语言的编译器前端。
安装 clang
Bash
1 | pkg install clang |
编译测试
clang 在编译这一块很强大,感兴趣的朋友可以去网上查看详细的教程,国光这里只演示基本的 Hello World使用。写一个Hello World的C程序,如下 hello.c
:
C
1 |
|
编辑完成后,使用 clang 来编译生成 hello 的可执行文件:
Bash
1 | clang hello.c -o hello |
效果图
Java
Termux 原生编译JAVA只能使用 ecj
(Eclipse Compiler for Java) 和 dx
了,然后使用 Android 自带的 dalvikvm 运行。如果想要完整体验JAVA环境的话,另一个方法就是 Termux 里面安装一个完整的 Linux 系统,然后在 Linux里面运行Java,安装系统部分下面文章会详细介绍,这一节国光只介绍最基本的操作。
安装编译工具
Bash
1 | pkg install ecj dx -y |
国光这里只演示基本的 Hello World 使用。写一个Hello World的 JAVA 程序,如下 HelloWorld.java
:
Java
1 | public class HelloWorld { |
编译生成 class 文件
Bash
1 | ecj HelloWorld.java |
编译生成 dex 文件
Bash
1 | dx --dex --output=hello.dex HelloWorld.class |
使用 dalvikvm 运行
格式规范如下:
dalvikvm -cp dex文件名 类名
Bash
1 | dalvikvm -cp hello.dex HelloWorld |
效果图
MariaDB(MySQL)
MariaDB 是 MySQL 关系数据库管理系统的一个复刻,由社区开发,有商业支持,旨在继续保持在GNU GPL下开源。开发这个分支的原因之一是:甲骨文公司收购了 MySQL 后,有将 MySQL 闭源的潜在风险,因此社区采用分支的方式来避开这个风险。
安装 MariaDB
Termux 官方也封装了MariaDB,所以安装起来很方便:
Bash
1 | pkg install mariadb |
这里基本上会安装很顺利,但是早期用户可能出现安装失败的情况,如果安装失败的话,这个时候手动在配置目录下创建my.cnf.d
文件夹即可:
Bash
1 | $ cd /data/data/com.termux/files/usr/etc/ |
初始化数据库
早期的 Termux 安装完 MySQL是需要初始化数据库的,新版本在安装时候就已经初始化了数据库
Bash
1 | mysql_install_db |
2020年4月19日:国光今天安装的 MySQL 发现已经存在 mysql.user 表了,无需初始化:
启动 MySQL 服务
因为正常启动完成后,MySQL 这个会话就一直存活,类似与 Debug 调试一样,此时使用Ctrl + C
-> 中止当前进程也无济于事,体验式就一点都不优雅,所以这里国光使用Linux自带的nohup
命令将其放到后台启动。
Bash
1 | nohup mysqld & |
图片上这个17115
此时就是mysqld
的进程PID号,我们使用如下命令验证一下是否正确:
Bash
1 | ps aux|grep mysql |
可以看到果然是进程的 PID 号:
至于 nohup 运行的提示
Ini
1 | nohup: ignoring input and appending output to `nohup.out' |
这个是正常现象,无伤大雅,Termux 下就这样将就着用吧。
停止 MySQL 服务
Termux 下没有好的办法退出 MySQL 服务,只能强制杀掉进程了,使用如下命令格式可以轻松杀掉进程:
Bash
1 | kill -9 PID |
成功kill掉
当然每次查看进程的PID号,再杀掉进程有点繁琐了,实际上这一步可以直接这样操作:
Bash
1 | kill -9 `pgrep mysql` |
Awesome ! 优雅!
默认的两个用户
用户登录的前提是 MySQL 服务在后台运行,如果你按照上一小节操作把 MySQL kill 掉的话,请重新启动一下MySQL 服务
新版本的 Termux 安装初始化数据库的时候包含两个高权限用户,一个是无法访问的 root 用户
提示拒绝root登录
另一个用户就是 Termux 的用户名,默认密码为空
,我们来登录看看:
Bash
1 | mysql -u $(whoami) |
可以成功登录 并执行SQL语句
那么这个无法登录的 root 用户该怎么办呢 ?不要着急 继续往下看
修改 root 密码
老版本的 Termux 的直接使用mysql_secure_installation
可以设置密码,但是新版本的安全策略变更了 我们在设置密码的时候回提示当前密码不正确,所以这条路行不通了。
这里我们只能使用 MySQL 的另一个用户名,即 Termux 用户名登录,然后来修改 root 的密码,使用如下命令修改 root 密码:
Bash
1 | ## 登录 Termux 用户 |
细节图片
OK! 如何和图片上差不的效果,那么修改 root 密码就成功了。
root 用户登录
修改完密码之后我们就可以美滋滋地使用 root 用户来登录了:
Bash
1 | mysql -u root -p |
远程登录 MySQL
使用 ip a
后查看 IP 地址后,尝试电脑端远程访问 Termux 的数据库:
发现默认是无法成功连接的,这个时候我们需要到数据库手动开启 root 用户的远程访问权限:
这里的 P@ssw0rd 是我的 root 密码
Sql
1 | grant all on *.* to root@'%' identified by 'P@ssw0rd' with grant option; |
执行完成后 尝试 PC 端远程过去看看:
Nginx
Nginx 是一个高性能的 Web 和反向代理服务器,Nginx 用的熟悉的话,下面搭建各种网站也就轻而易举了。
安装 Nginx
Termux 安装 Nginx 也很简单,一条命令即可:
Bash
1 | pkg install nginx |
安装完成后,国光的习惯是查看一下版本信息:
1.17.10 版本
测试 Nginx
测试检查 Nginx 的配置文件是否正常:
Bash
1 | nginx -t |
现在测试肯定是OK的,这个多用于我们修改完 Nginx 的配置文件后的检查。
启动 Nginx
早期版本的 Termux 需要在termux-chroot
环境下才可以成功启动 Nginx ,新版本的 Termux 可以直接启动,很是方便:
Bash
1 | nginx |
Termux 在 Nginx 上默认运行的端口号是 8080, 使用pgrep
命令也可以查看 Nginx 进程相关的PID号。
然后手机本地直接访问http://127.0.0.1:8080
查看 Nginx 是否正常启动:
重启 Nginx
一般当修改完 Nginx 相关的配置文件时,我们需要重启 Nginx,使用如下命令即可重启:
Bash
1 | nginx -s reload |
停止 Nginx
方法一 原生停止
Bash
1 | nginx -s stop |
或者
Bash
1 | nginx -s quit |
quit 是一个优雅的关闭方式,Nginx在退出前完成已经接受的连接请求。Stop 是快速关闭,不管有没有正在处理的请求。
方法二 杀掉进程
只需三番钟,里造会干我一样,爱象节款游戏 扯远了,只需要1条命令,即可优雅的终止掉 Nginx 服务:
Bash
1 | kill -9 `pgrep nginx` |
貌似手机党 并不好敲 这个 ` 符号 =,= ,如果实在敲不出来,那就分两步走吧:
Bash
1 | ## 查询 nginx 进程相关的 PID 号 |
Nginx 解析 PHP
Termux 下的 Nginx 解析 PHP 这里单独拿出一级标题来叙述,成功解析的话,下面安装 wordpress等 PHP网站就会轻松很多。
安装 php-fpm
Nginx 本身不能处理 PHP,它只是个 Web 服务器,当接收到 PHP 请求后发给 PHP 解释器处理。Nginx 一般是把请求转发给 fastcgi 管理进程处理,PHP-FPM 是一个PHP FastCGI管理器,所以这里得先安装它:
Bash
1 | pkg install php-fpm |
安装完成顺便检查一下版本信息吧:
配置 php-fpm
编辑 php-fpm 的配置文件 www.conf
:
Bash
1 | vim $PREFIX/etc/php-fpm.d/www.conf |
定位搜索 listen =
找到
Ini
1 | listen = /data/data/com.termux/files/usr/var/run/php-fpm.sock |
将其改为:
Ini
1 | listen = 127.0.0.1:9000 |
???啥 你不会使用 vim 搜索 ㄟ(▔,▔)ㄏ 那就老老实实一个个翻页吧。
配置 Nginx
编辑 Nginx 的配置文件 nginx.conf
:
Bash
1 | vim $PREFIX/etc/nginx/nginx.conf |
下面国光贴出配置好的完整配置文件,大家可以参考下面这些图,只需要2大步骤:
- 添加 index.php 到默认首页的规则里面
- 取消
location ~ \.php$
这些注释,按照图片上的 提示修改:
Termux 里面的 Nginx 默认网站的根目为:
1 | /data/data/com.termux/files/usr/share/nginx/html |
如果想要修改默认路径的话 只需要在配置文件中 替换2处出现的这个路径即可
下面贴一份完整的配置文件:
Nginx
1 |
|
测试 PHP 解析
Nginx 默认网站的根目录为:
Bash
1 | /data/data/com.termux/files/usr/share/nginx/html |
在这个网站根目录下新建 info.php
内容为:<?php phpinfo(); ?>
Bash
1 | echo '<?php phpinfo(); ?>' > $PREFIX/share/nginx/html/info.php |
启动服务
先启动 php-fpm 服务:
Bash
1 | php-fpm |
然后再启动 Nginx 服务
Bash
1 | nginx |
如果你的 Nginx 已经启动了的话,使用
nginx -s reload
重启 Nginx
访问测试
浏览器访问http://127.0.0.1:8080/info.php
来看看刚刚新建的测试文件是否解析了:
哇哦~ awesome
Nodejs
Node.js 是能够在服务器端运行 JavaScript 的开放源代码、跨平台 JavaScript 运行环境。
安装 Nodejs
nodejs-lts
是长期支持版本,如果执行 pkg install nodejs
版本后,发现 npm 报如下错误:
Bah
1 | segmentation fault |
那么这个时候可以尝试卸载当前版本 pkg uninstall nodejs
然后执行下面命令安装长期稳定版本:
Bash
1 | pkg install nodejs-lts |
安装完成后使用如下命令查看版本信息:
Bash
1 | node -V |
Hello World
新建一个 hello.js
脚本,内容如下:
Javascript
1 | console.log('Hello Termux'); |
然后尝试运行:
Bash
1 | $ node hello.js |
http-server
http-server 是一个基于 Node.js 的简单零配置命令行 HTTP 服务器。
Bash
1 | ## 安装 http-server |
尝试电脑端浏览器直接访问看看:
OK
安装报错
早期版本的 Termux 的 npm 安装一些包的时候会报如下错误:
Verilog
1 | Cannot read property 'length' of undefined |
查了下是这边版本的问题
新版本貌似npm正常
这是一个 BUG,官方的解决方法如下:
disable concurrency in case of libuv/libuv#1459
编辑如下文件:
Bash
1 | vim $PREFIX/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js |
我这里修改length的是4
,这个好像和CPU有关,总之这里的 length 得指定一个数字。
新版本貌似npm正常
然后在重新安装下npm install hexo-cli -g
成功。
PHP
PHP 是一种开源的脚本语言,适用于网络开发。语法借鉴吸收C语言、Java 和 Perl 等流行计算机语言的特点,易于学习,PHP 是世界上最好的语言(手动狗头)。
安装PHP
Termux 官方封装了 PHP,所以我们安装起来就很方便:
Bash
1 | pkg install php |
安装完成后查看下版本信息:
Bash
1 | php --version |
运行测试文件
自
PHP5.4
之后 PHP内置了一个 Web 服务器。在 Termux 下可以很方便地测试 PHP 文件
首先在家(~
)目录下建一个www
文件夹,然后在www
文件夹下新建一个index.php
文件,内容为:
Php
1 | phpinfo(); |
完整的步骤如下:
Bash
1 | ## 新建 www 文件夹 |
编写完成index.php
文件后,尝试使用 PHP 内置的 WebServer 直接启动:
Bash
1 | ## 进入家目录 |
自己制定端口后,浏览器访问http://127.0.0.1:8888
效果如下:
Python
Python 是近几年非常流行的语言,Python 相关的书籍和资料也如雨后春笋一般不断涌现,带来了活跃了 Python 学习氛围。
安装python2
Python2 版本要淘汰了,大家简单了解一下就好:
Bash
1 | pkg install python2 -y |
安装完成后,使用python2
命令启动 Python2.7 的环境
安装python3
Termux 安装 Python 默认版本是 Python3 的版本,与此同时也顺便安装了clang
Bash
1 | pkg install python -y |
安装完成后,查看下clang
和Python
的版本:
注意版本区分
如果你同时安装了 Python3 和 Python2 版本的话,最好向下图中这样验证一下各个版本情况,做到心知肚明,国光我是先安装 Python3 然后再安装 Python2 的:
安装顺序不一样 pip 这种图片应该也就不一样
升级pip版本
pip 保持最新是一个好习惯,升级方式很简单:
Bash
1 | ## 升级 pip2 |
这两条命令分别升级了pip2
和pip3
到最新版。升级完成后你会惊讶的发现你的pip3
命令不见了???然后这个时候就开始吐槽国光了(内心OS:国光 非要强迫症升级 pip 版本,这下好了吧!)
国光:不要慌 问题不大,我们可以手动查看当前有哪些可执行的 pip 文件,使用如下命令:
Bash
1 | ls /data/data/com.termux/files/usr/bin|grep pip |
原来我们的pip3变成了pip3.8了啊
接下来分别查看对应 pip 可执行文件的版本:
现在全都是最新版的 pip 了哦
iPython
iPython是一个 Python 的增强版本的交互式 shell,支持变量自动补全,自动缩进,支持shell命令等,内置了许多很有用的功能和函数。iPython 可以提高我们的学习效率!
先安装
clang
,否则直接使用pip
安装ipython
会失败报错. 没有安装的话使用pkg install clang
安装
Bash
1 | ## -i 手动指定国内清华 pip 源 提高下载速度 |
执行完上述命令分别安装好对应版本的iPython
后,然后分别查看对应版本信息:
Bash
1 | ipython2 -V |
Jupyter Notebook
Jupyter Notebook(此前被称为 iPython notebook)可以在 Web 端提供Python交互,虽然和iPython共享同一个内核,但是更强大。
Jupyter notebook 相关的依赖比较多 安装起来较为耗时 国光就只用 Python3 版本来演示了,另外请务必要使用国内的 pip 源来安装
下面官方建议安装的完整的命令:
Bash
1 | pkg update |
如果你一步步跟着本文安装顺序操作的话,发现很多工具我们都安装过了(国光我真的有先见之明…),那么直接参考如下命令安装即可:
Bash
1 | ## -i 手动指定国内中清华 pip 源 提高下载速度 |
安装好之后查看一下版本信息:
Bash
1 | jupyter --version |
所有插件均安装完成
Jupyter Notebook 就安装好了,这个比较强大更详细的教程大家可以自行去谷歌或者百度一下,国光这里只演示基本的功能。
先启动 notebook
Bash
1 | jupyter notebook |
然后会看到运行的日志,我们复制出 提示的URL:
复制出的这个 URL 地址 在浏览器中打开:
可以看到成功运行了,那我们按照图片提示走个形式,输出个 Hello World 就跑路:
OK 运行成功,那么回到 Termux 里面使用组合键 Ctrl + C
-> 中止当前的 Jupyter 进程
网站搭建
网站搭建这一块实际上原理是大同小异的,国光这里只写几个网站的安装方法,给大家提供一个思路。
DVWA
DVWA 是一个用来搞 Web 安全从业者入门使用的一个练习靶场,用来学习掌握基本的漏洞原理使用的,如果你对 Web 安全不感兴趣的话可以直接跳过这一个小节。
国光建议 DVWA 练习的时候 要结合源码去分析漏洞 不要直接把网上攻击流程走一步就草草了之了 不看源码的学习 等于啥都没有学
环境准备
因为 DVWA 靶场是 PHP编写的,所以你需要 提前配置好 Nginx 、PHP 以及 数据库,关于这方面配置可以参考前面开发环境下分类的「Nginx」、「MariaDB(MySQL)」和 「Nginx 解析 PHP」章节
下载 DVWA
Bash
1 | wget https://github.com/ethicalhack3r/DVWA/archive/master.zip |
如果访问 Github 比较慢的话,可以尝试如下链接:
Bash
1 | wget https://hub.fastgit.org/ethicalhack3r/DVWA/archive/master.zip |
解压到 Nginx 目录下
Bash
1 | ## 解压 |
新建数据库
Sql
1 | mysql -uroot -p*** -e"create database dvwa;show databases;" |
***
这里是mysql的密码
可以看到 dvwa
数据库已经新建成功了。
编辑 DVWA 配置文件
Bash
1 | ## 将配置文件 还原为 PHP 后缀 |
只需要定位找到如下内容 根据你的实际情况填写就可以了:
初次访问测试网站
按照上述配置好 DVWA 之后,浏览器访问: http://192.168.31.124:8080/dvwa/setup.php
可以看到 allow_url_include
运行 URL 远程包含没有开启,我们得手动开启一下:
实际上正常人是不会去开启这个的,十分危险,但是 DVWA 是一个靶场,有些漏洞实际上就是利用 PHP 配置不当造成的,这样才让新手有攻击下来的信心。
配置 php.ini
Termux 下默认是没有 php.ini 文件的,不信我们手动来查找一下:
Bash
1 | php --ini |
发现 php.ini 的文件应该存放在 /data/data/com.termux/files/usr/lib 目录下,但是 PHP 没有找到配置文件,所以需要我们手动在这个目录下新建 php.ini 配置文件:
Bash
1 | echo 'allow_url_include = On' > $PREFIX/lib/php.ini |
注意这是一个不安全的配置 只是为了配合本地的 DVWA 靶场 做模拟黑客攻击练习使用的
配置完成后,自己尝试使用php --ini
来定位搜索配置文件,会发现 PHP 已经找到了配置文件了。
修改完配置文件后 得重启 php-fpm
服务:
Bash
1 | ## 杀掉 php-fpm 相关的进程 |
再次访问测试网站
浏览器访问: http://192.168.31.124:8080/dvwa/setup.php
可以看到刚刚的配置文件生效了,现在安全检查全部通过
既然 安全检查通过的话,那么就直接页面滚动到最下面直接点击 Create/Reset Database初始化数据库按钮即可,初始化成功后会自动跳转到登录界面。
DVWA 默认的用户有5个,用户名密码如下:
用户名
密码
admin
password
gordonb
abc123
1337
charley
pablo
letmein
smithy
password
登录成功的效果图:
Hexo
Hexo 是一个用 Nodejs 编写的快速、简洁且高效的博客框架。Hexo 使用 Markdown 解析文章,在几秒内,即可利用靓丽的主题生成静态网页。另外大家看到国光我的博客就是使用 Hexo 搭建的哦。
安装 Hexo
Hexo 是用 Nodejs 编写的,所以安装的话得使用 npm 命令来安装:
Bash
1 | npm install hexo-cli -g |
安装完成的话,顺便看一下 Hexo 相关的版本信息吧:
Bash
1 | hexo -v |
Hexo 基本部署
我们建立一个目录,然后到这个目录下初始化Hexo 环境
Bash
1 | ## 手动创建一个目录 |
然后就跑起来一个最基本的 Hexo 博客,关于 Hexo 博客的详细教程,建议搭建去参考Hexo官方文档,我这里重点在于 Termux 其他的不作过多的叙述.
使用浏览器访问: http://127.0.0.1:4000
即可看到 Hexo 的效果图:
Hexo 部署到 Nginx
Hexo 是纯静态博客,官方默认把 Hexo 搭建在 Github Pages 仅仅是把 Hexo 根目录的 public 文件夹即 Hexo 生成的纯 HTML 源码部署到上面而已。所以知道这样原理 我们就可以轻而易举地将 Hexo 部署到 Nginx 下面。
生成 HTML 纯静态源码
Bash
1 | hexo g |
可以看到 Hexo 的根目录下 已经生成了 public 文件夹了
拷贝源码搭到 Nginx
现在我们只需要将 public 的文件夹里面的源码 全部拷贝到 Nginx 的网站根目录下:
Bash
1 | ## 在 nginx 根目录下新建 hexo 文件夹 |
访问效果查看
浏览器访问:http://127.0.0.1:8080/hexo/
即可看到效果:
当然这里网站的CSS等样式没有加载出来,这个原因是 Hexo 对网站目录下部署并不友好 ,大概有如下解决方法:
- Nginx vhosts 配置多域名,这个服务器上常用的操作,但是 Termux 里面实现难度较高
- 将 Hexo 的源码 直接拷贝到 Nginx 的根目录下,不用拷贝到 html/hexo 目录下了,然后直接访问
http://127.0.0.1:8080
即可看到效果
国光这里就只是说一下这个思路,因为强迫症的我 不能忍受 Nginx 根目录的文件 乱七八糟 =,= 大家想尝试的话 按照我这个思路去尝试就可以了
KodExplorer
KodExplorer 是一款开源文件资源管理器,搭建起来很简单,我们也可以在 Termux 搭建,这样就可以实现 Temux 下的文件分享了,十分优雅方便。在我的这篇文章:https://www.sqlsec.com/2019/11/kode.html 里面也讲解了 macOS下的安装。
下载解压 Kod
官网的下载地址:https://kodcloud.com/download/
我们拷贝下载链接后,使用 wegt 可以直接下载:
Bash
1 | ## 下载 |
安装设置 Kod
Nginx 确保已经配置可以解析 PHP,如果没有配置好,那么请惨叫 上文的 「开发环境」小节
手机浏览器访问: http://127.0.0.1:8080/kod 即可进入设置管理密码界面:
设置完密码登录看看,建议大家在 Kod 里面设置电脑版视图,效果很赞,下面是主界面截图:
推荐大家使用电脑版
当然在局域网的情况下,通过IP地址,局域网的其他设备也是可以轻松访问到你的文件的,文件共享目的达成。
WordPress
WordPress 是一个以 PHP 和 MySQL 为平台的自由开源的博客软件和内容管理系统。如果你的 Termux 没有配置好 MySQL、PHP、Nginx 的话 那么请参考上面的 开发环境
章节来进行配置。
新建数据库
网站需要数据库,在安装 WordPress 前我们先需要新建一个数据库,以供后面的网站安装:
Sql
1 | mysql -uroot -p*** -e"create database wordpress;show databases;" |
***
这里是mysql的密码
可以看到 wordpress
数据库已经新建成功了。
下载 WordPress
WordPress 历届版本: https://cn.wordpress.org/download/releases/
选择最新的版本后,复制下载的直链,那么就开始用 wget 下载并解压吧:
Bash
1 | ## wget 下载 |
如果WordPress官网这个下载又问题的话,可以多尝试几次,也可以通过如下渠道来下载
- WordPress Too Many Requests 出现这种报错,多半是中国的IP又被国外屏蔽了,可以尝试使用迅雷来下载
- 挂代理来下载
- 百度找国内的第三方非官方下载站下载(不是很推荐)
配置 Nginx 解析
如果你读过前面的「开发环境」、「Nginx」、「Nginx 解析 PHP」三个小节的话,这里直接启动 php-fpm 和 Nginx 即可:
Bash
1 | php-fpm |
当然如果你的 php-fpm 和 Nginx 服务以及启动的话 就直接跳到下一步吧
安装 WordPress
浏览器访问: http://127/.0.0.1/wordpress/
进行 WordPress 的安装,根据提示填写好自己的 数据库信息即可安装,详细这一步大家都懂的,国光这里直接放安装好的效果图吧:
WordPress的后台
系统安装
Termux 可以安装其他 Linux 发行版系统,核心用到的工具是 chroot ,所以我们得确保安装系统的时候 proot
这个包你是安装好的,然后因为操作系统店都有官方维护的脚本,所以安装起来甚至比我们前面配置的开发环境还要简单,下面来具体的介绍吧。
实用必备工具
有能力的朋友以下工具可以直接在 Google Play 商店里面下载,国光这里就简单列举搬运一下:
软件
下载地址
说明
VNC Viewer 3.6.1.42089 汉化版
远程连接使用
NetHunter KeX 4.0.7-6
Kali 官方 远程连接工具
AnLinux 6.10
提供比较全面的系统安装脚本
AndroNix 4.2
Google Play
提供比较全面的系统安装脚本
VNC 工具的隐藏技巧,首先我们默认使用 VNC Viewer 这个工具远程是下图这张效果,可以看到并没有占满全屏,强迫症无法接受:
VNC Viewer
然后使用 Kali 官方的 NetHunter KeX 远程连接,屏幕就完全被充分利用了:
NetHunter KeX
但是 NetHunter Kex 在远程操作体验上又不如 VNC Viewer舒服,难道鱼和熊掌就无法兼得了吗? 当然可以!!! 经过国光测试,这个时候后台关掉 NetHunter KeX 的时候呢,再用 VNC Viewer 就可以完美的利用手机的全部屏幕空间了,岂不是美哉。
Kali NetHunter
Kali NetHunter 是基于 Kali Linux 的免费、开源的 Android 设备移动渗透测试平台,安全从业者必备的操作系统。
安装 Kali NetHunter
Kali 官网提供的完整的安装命令如下,下面国光标上注释方便大家理解:
Bash
1 | ## 申请存储访问权限 |
里面很多操作我们之前都做了,所以现在只需要如下几步即可:
Bash
1 | ## 下载 安装脚本 |
下载包大概1.2GB左右安装过程比较慢,国光这里建议大家挂代理下载,提供效率和成功率
如果你没有代理怎么办? https://images.kali.org/nethunter/kalifs-arm64-full.tar.xz 这个就是最大的1.2GB的数据包,复制链接地址到迅雷等下载工具里面下载下来,然后拷贝到 Termux 手机的安装脚本同级目录下,或者直接更改脚本把这个数据包的下载地址替换为局域网的地址都可以方法有很多 大家可以自行发挥。
安装成功的效果图如下:
基本使用命令
命令
说明
nethunter
启动 Kali NetHunter 命令行界面
nethunter kex passwd
配置 KeX 密码 (仅在第一次使用前需要)
nethunter kex &
开始 KeX 会话服务
nethunter kex stop
停止 Kali NetHunter 桌面
nethunter
在 NetHunter 环境中运行命令
nethunter -r
以 root 身份启动 Kali NetHunterk 命令行界面
nethunter -r kex passwd
配置 root 用户的 KeX 密码
nethunter -r kex &
以 root 身份开始 KeX 会话服务
nethunter -r kex stop
停止 root 身份运行的 KeX 会话服务
nethunter -r kex kill
杀掉所有的 KeX 会话
nethunter -r
以 root 身份在 NetHunter 环境中运行命令
nethunter 命令可以缩写成 nh ,Kali NetHunter 默认的用户名 kali 的密码也是 kali
root 密码没有设置 可以输入 sudo passwd 来修改 root 用户的密码
Kali 命令行的使用国光不在废话了,下面就列几个点,大家可以关注一下:
- Kali Linux 不需要换源,官方源会自动选择最佳的服务器节点
- root 用户 无法使用 nmap 所以 nmap 的一些需要高权限用户的参数无法正常使用
- 完整安装 kali 工具集合可以使用 apt install kali-linux-default 大小大概为2.6GB左右 国光 不建议这样操作,需要啥工具 自己单独安装即可 没有必要全部安装
- Galaxy 系列手机可能会阻止 非 root 用户使用 sudo,只需使用 su -c 代替
启动 VNC 服务
上面命令表中的 KeX 服务,实际上就是VNC服务,默认的端口是 5901 端口,首先 Termux 下启动 Kali 的 VNC:
Bash
1 | nh kex & |
图片上可以得出 KeX 服务的端口是 5901,然后进程的ID 是17222,可以使用 nmap 或者 netstat 命令再检测一下5901端口是否打开。
VNC 工具连接
VNC 连接还需要密码,所以这里手动设置一下:
Bash
1 | nh kex passwd |
设置完成之后级可以在 VNC 连接工具里面填写相应的信息即可连接了,记得端口号要加上:
VNC 关掉连接后,想要停止 Kex 服务即 VNC 服务,Termu 下使用如下命令即可退出服务:
Bash
1 | nh kex stop |
其他 Linux 系统
Termux 安装 Linux 系统项目地址:https://github.com/sqlsec/termux-install-linux
这个脚本国光我磨磨蹭蹭写了1天才写完,筛选下来的系统都是体验还不错的系统。
下载的主要镜像全部托管在了 Gitee 上,下载速度很快,而且系统对应的更新源国光均替换为国内源了,安装和卸载都很容易上手,用户非预期的输入也都考虑到了,目前完美支持 Ubuntu、Kali、Debian、CentOS、Fedora系统的安装,具体想尝试的话可以输入如下命令体验安装:
确保 Termux 已经安装了 proot 和 Python3 才可以顺利安装
Bash
1 | git clone https://github.com/sqlsec/termux-install-linux |
系统安装的更多细节图可以参考我的这一篇文章: Android Termux 安装 Linux 就是这么简单
极客行为
如果你是一个极客玩家,不折腾会死星人的话,那么本章节比较适合你。祝你折腾愉快!
Aria2
Aria2 是一个轻量级多协议和多源命令行下载实用工具。它支持 HTTP / HTTPS, FTP, SFTP, bt 和 Metalink。最近被封杀的 PanDownload 也是使用的是 Aria2 来加速下载百度网盘里的资源的。本文是一个 Termux 教程,所以关于 Aria2 不会很深入将下去,关于更多 Aria2 的配置教程,大家可以参考网上其他大佬的教程。
安装aria2
Bash
1 | pkg install aria2 |
安装完成后 可以顺便看一下版本信息:
Bash
1 | aria2c -v |
启动 rcp 服务
aria2 支持 rpc 服务,默认监听的是6800
端口。这样我们可以使用开源的 Web 项目来连接操作 aria2
Bash
1 | aria2c --enable-rpc --rpc-listen-all |
webui-aria2
国光这里选的是这个比较流行的 aria2 的开源项目,地址是:https://github.com/ziahamza/webui-aria2 安装运行起来也很简单:
Bash
1 | git clone https://github.com/ziahamza/webui-aria2.git |
需要node来运行,没有安装的 话使用
pkg install nodejs
来安装如果如果下载速度比较慢的话,可以尝试使用 fastgit镜像地址来下载
运行起来后,浏览器访问:http://localhost:8888
查看效果:
速度还算可以,有兴趣的朋友可以研究如何利用 aria2
来下载百度云文件之类的操作,更多姿势等你们来探索。
SSH
有时候我们需要通过 ssh 远程连接服务器,这个时候有 Termux,躺在床上就可以操作电脑了,_哇_!哦哦哦!awesome ,或者我们突然很闲,想要用电脑来远程手机,没错 Termux 都可以做到。
Termux ssh 连接电脑
安装 openssh
OpenSSH 是SSH (Secure SHell) 协议的免费开源实现。SSH协议族可以用来进行远程控制, 或在计算机之间传送文件。Termux 官方已经封装好了,我们安装起来也会很简单:
Bash
1 | pkg install openssh |
远程连接电脑
然后就可以直接ssh连接你的服务器了,(前提是电脑安装了ssh服务)
Bash
1 | ssh sqlsec@192.168.1.8 |
手机连接操作电脑效果图:
附上完整的 Linux SSH 连接命令格式:
Bash
1 | ## ssh -p 端口号 用户名@主机名或者IP |
传输文件
SSH 不仅仅可以远程连接服务器,同样也可以使用SSH自带的scp
命令进行文件传输:
复制文件
Bash
1 | ## scp 本地文件路径 远程主机用户名@远程主机名或IP:远程文件保存的位置路径 |
复制目录
Bash
1 | ## scp -r 本地文件夹路径 远程主机用户名@远程主机名或IP:远程文件夹保存的位置路径 |
看完了 不打算亲自尝试一下文件传输的操作吗? :-)
电脑 ssh 连接 Termux
这个使用场景比较少,但是既然要打造中国的 Termux 文档的效果,还是一起写上去吧,首先确保你已经安装了 openssh 软件包,没有安装的话参考上一个小结进行安装。实现这个效果有两大种方法:
SSH 通过密码认证连接
SSH 通过公私钥连接
PC 端生成公私钥,然后将 公钥 拷贝到 Termux 中,通过公私钥连接。
Termux 端生成公私钥,然后将 私钥拷贝到 PC 中,通过公私钥连接。
启动 ssh 服务
安装完成后,sshd
服务默认没有启动,所以得手动启动下:
Bash
1 | sshd |
因为手机上面低的端口有安全限制,所以这里 openssh 默认的 sshd 默认的服务端口号为 8022
停止 ssh 服务
如果需要停止 ssh 服务,只需要 kill 杀掉进程即可:
Bash
1 | pkill sshd |
通过密码认证链接
Termux 默认是使用密码认证进行连接的,如果要启用密码连接的话要确保你的密码足够安全,否则你的SSH被恶意攻击者连接或者爆破成功的话,那就美滋滋了!
Termux 下的 SSH 默认配置文件的路径为 $PREFIX/etc/ssh/sshd_config
,我们来查看下这个配置文件:
Sshd_config
1 | PrintMotd no |
国光的 Termux 0.94 的版本就这3行配置,下面来逐行解释一下这个配置:
PrintMotd
: 是否显示登录成功的欢迎信息 例如上次登入的时间、地点等
PasswordAuthentication
: 是否启用密码认证
Subsystem
: SFTP 服务相关的设定
设置新密码
执行 passwd
命令可以直接修改密码:
Bash
1 | passwd |
密码不要忘记哦
电脑远程连接测试
国光测试了一下 Termux 的 ssh 和常规 Linux 不太一样,连接的时候不需要指定用户名。
Bash
1 | ssh 192.168.31.124 -p 8022 |
通过公私钥连接
公私钥连接更加安全,再也不用但你的Termux SSH被黑客爆破攻击的情况了
PC 端生成公私钥
首先在PC端生成秘钥对:
Bash
1 | ssh-keygen |
默认一直回车下去:
此时会在~/.ssh
目录下生成 3 个文件id_rsa
, id_rsa.pub
,known_hosts
然后需要把公钥 id_rsa.pub
拷贝到手机的 data\data\com.termux\files\home\.ssh 文件夹中。然后
将公钥拷贝到验证文件中
在Termux
下操作
Bash
1 | cat id_rsa.pub > authorized_keys |
OK 现在你已经设置好公私钥了,那么修改一下 SSH 的配置文件,关掉密码登录吧:
Bash
1 | vim $PREFIX/etc/ssh/sshd_config |
找到
Bash
1 | PasswordAuthentication yes |
修改为
Bash
1 | PasswordAuthentication no |
然后记得重启一下 SSH 服务:
Bash
1 | pkill sshd;sshd |
然后电脑端这边直接就可以通过公私钥连接了,无需输入密码也更加安全:
Bash
1 | ssh 192.168.31.124 -p 8022 |
Termux 端生成公私钥
操作完上一步之后,我想你大概已经知道了公私钥的原理了。那么我们现在尝试在 Termux 端生成公私钥这种方法试试看,理论上也是可以的。
首先在 Termux 端生成秘钥对:
1 | ssh-keyge |
此时会在~/.ssh
目录下生成 3 个文件id_rsa
, id_rsa.pub
,known_hosts
然后将公钥拷贝到验证文件中
Bash
1 | cat id_rsa.pub > authorized_keys |
接着将id_rsa.pub
私钥下载下来,拷贝到PC端上,并赋予 600
的权限:
Bash
1 | chmod 600 id_rsa |
然后通过-i
手动加载私钥的方式也可以成功连接到 Termux:
Bash
1 | ssh -i id_rsa root@192.168.31.124 -p 8022 |
Bingo!
至此,Termux ssh 连接的 3 种方式都演示过了,国光个人比较建议使用 PC 端生成公私钥
的方法,这样可以减少 rsa 私钥泄露的风险,也方便PC端的远程连接与管理。
you-get
一个命令行小程序,支持下载各大网站的视频,具体支持的网站大家可以参考官方项目,国光这里就只作简单的介绍。
安装 you-get
首先得先安装相关的依赖包
Python3 如果没有安装的话 可以参考上文的 「开发环境」-「Python」
Bash
1 | pkg install python3 ffmpeg -y |
安装完成后,直接使用 pip 来 安装,这里通过 -i
指定国内的 pip 源 速度会更快一点:
Bash
1 | pip3 install you-get -i https://pypi.tuna.tsinghua.edu.cn/simple some-package |
升级 you-get
Bash
1 | pip3 install --upgrade you-get |
下载 B 站视频
默认是下载最高画质的,但是我们也可以列出所有可以下载的画质:
Bash
1 | you-get -i https://www.bilibili.com/video/BV1mE411L7Rg |
下载 720P 视频
Bash
1 | you-get --format=dash-flv720 https://www.bilibili.com/video/BV1mE411L7Rg |
下载网易云音乐歌单
下面以我自己的歌单为例子,首先找到自己喜欢的歌单,然后点击复制链接:
链接传送门:渗透测试代码审计程序员必备电音
直接 you-get 歌单的链接地址就可以直接批量下载地址了:
Bash
1 | you-get 'http://music.163.com/playlist?id=489221140' |
下载完成后会以歌单名作为文件夹存放下载好的音乐以及歌单的封面:
信息安全
因为 Termux 可以很好的支持Python
,所以几乎所有用Python
编写的安全工具都是可以完美的运行使用的,所以国光这个版块重点就列举了国光认为实战中比较不错的安全工具。当然大家也可以直接参考本文的 「系统安装」- 「Kali NetHunter」章节,直接在手机里面安装一个 Kali Linux 系统,国光实际体验还是很完美的,里面的信息安全工具要更全面一些。
Exiftool
一个强大的元数据查看修改工具,CTF 的MISC的比赛上也经常露面,实际上 ios 自带的相机拍出的照片里面是携带 GPS 定位的,使用 Exiftool 就可以很轻松的查看到经纬度信息。
Bash
1 | pkg install exiftool |
下面查看一下国光我刚刚保存地理信息拍的照片的元数据信息:
Bash
1 | cd ~/storage/dcim/Camera |
给 GPS 位置信息打马,防止网友顺着网线过来打人。
Metasploit
Metasploite黑客Top10工具之一,漏洞攻击库,安全从业者必备工具之一,也在各大黑客题材的电影中频频出现。
Android 7 +
目前 Termux 官方的 pkg 已经支持直接安装 Metasploit 了,但是仅适用于 Android 7 及其以上版本。通过如下两条命令即可安装,下载过程大约1分钟左右(当然国光我是挂代理的)
Bash
1 | ## 切换不稳定源 |
出现如下字样表明安装就成功了:
Properties
1 | You can now start the database server using: |
可以看到 postgresql 已经成功运行在 127.0.0.1:5432 端口了,metasploit:aarch64
安装成功。
Android 5.x - 6.x
因为老的安卓版本不支持 unstable-repo,所以只能执行如下命令手动安装了:
Bash
1 | curl -LO https://github.com/termux/termux-packages/files/3995119/metasploit_5.0.65-1_all.deb.gz |
安装过程耐心
安装的过程可能会安装其他 Ruby gem,因此能需要很长时间。在安装完成之前,请勿关闭 Termux 会话,否则可能会出一些玄学问题导致安装失败,总之耐心等待即可。
国光强烈建议搭建挂代理安装,这样效率和成功率会高很多,大家看到这个版块说明也是安全从业者了,所以代理对于你来说应该很简单了吧。
Termux 安装 MSF的时候会自动配置好 postgresql 并且更新 ruby 版本,MSF 控制台里面输入db_status
可以查看数据库连接情况。最新的 MSF5 版本已经有 cve-2019-0708 的 exploit 了。
Netcat
nc 被誉为网络安全界的瑞士军刀,一个简单而有用的工具,netcat 是比较新的现代版本,并且作者是着名的Nmap程序的作者。nc 命令的详细教程可以参考我的这篇文章: nc命令教程
目前ncat已经集成到了 nmap 里面,安装完nmap后就可以使用 ncat
命令了,如果你不想安装 nmap 也可以单独安装 ncat 命令:
Bash
1 | ## 安装 |
Nmap
端口扫描必备工具,在最近的国产电视剧《亲爱的,热爱的》也出现过令人叹为观止的操作:nmap -sT -A localhost
!!!
安装 Nmap
Termux源里面封装打包了Nmap,所以安装起来就比较简单:
Bash
1 | pkg install nmap |
Hashcat
Hashcat 是世界上最快的密码破解程序,是一个支持多平台、多算法的开源的分布式工具。
官方:https://hashcat.net/hashcat/
Github:https://github.com/hashcat/hashcat
在我的另一篇文章里面有更详细的教程来介绍这款工具:Hashcat学习记录
安装 Hashcat
Termux unstable 源里面也封装好了 Hastcat,所以我们安装依然一条命令即可:
Bash
1 | pkg install hashcat |
如果提示找不到 Hashcat 包的话,那么手动安装切换不稳定源即可:
Bash
1 | ## 切换不稳定源 |
Hydra
Hydra是著名的黑客组织THC的一款开源暴力破解工具。爆破SSH和MySQL这一块效果还是很不错的,但是爆破Winows的3389 RDP的话 效果就很差了,国光一次线下比赛曾用过Hydra去爆破Windows RDP知道比赛结束都没有成功爆破出来… 如果大家真的要爆破的话,推荐Windows平台的这款爆破工具:https://github.com/shack2/SNETCracker
安装 Hydra
Bash
1 | pkg install hydra |
成功爆破出了SSH的密码
SQLmap
SQLmap 是一款用来检测与利用SQL注入漏洞的免费开源工具 官方项目地址,后面 SQLmap 也支持 Python3 版本了
安装 SQLmap
我们直接git clone
源码,然后运行 sqlmap.py
文件:
Bash
1 | git clone https://github.com/sqlmapproject/sqlmap.git |
sqlmap支持pip安装了,所以建议直接
pip install sqlmap
来进行安装,然后终端下直接sqlmap就可以了,十分方便。
xray
xray 是长亭科技开发的 Web 漏洞扫描器,在圈内的反馈都是还不错的,在我的这篇文章xray Web扫描器学习记录已经讲解了 xray 扫描器的基本使用,但是国光注意到 xray 官方项目居然也发布了 arm64 的版本,那么理论 Termux 应该也就可以愉快地安装了,手机躺着挖洞也不是不可能。
官方版本发布地址: https://github.com/chaitin/xray/releases
下面尝试直接安装运行看看:
Bash
1 | ## 下载并解压 |
小结
因为 Termux 完美的支持Python
和Perl
等语言,所以有太多优秀的信息安全工具值得大家去发现了,这里我就不一一列举了。
官方插件
Termux 有一些额外有趣的功能,我们可以通过安装插件的方式来使用这些功能。网友们反馈 F-Droid 里面的 Termux 插件都是可以免费下载的,唯一的缺点就是可能版本低于 Google Play 的版本,大家自行抉择。
Termux:API
Termux:API,可用于访问手机硬件实现更多的友情的功能。官方唯一一个免费的 API,良心啊。
准备工作
安装Termux:API
下载地址
请勿在Google Play 和 F-Droid 之间混合安装Termux 和 插件。
给 app 权限
因为 Termux-api 可以直接操作手机底层,所以我们需要到手机的设置里面给 这个 APP 的权限全部开了,这样下面操作的时候就不会提示权限不允许的情况了。
安装 Termux-api 软件包
手机安装完 Termux-api 的APP后,Termux 终端里面必须安装对应的包后才可以与手机底层硬件进行交互。
Bash
1 | pkg install termux-api |
下面只列举一些可能会用到的,想要获取更多关于Termux-api
的话,那就去参考官方文档.
获取设备信息相关
获取电池信息
Bash
1 | termux-battery-status |
参数无,返回信息是JSON格式。 可以看到电池的-健康状况-电量百分比-温度情况等
Bash
1 | { |
获取相机信息
Bash
1 | termux-camera-info |
参数无,返回信息是JSON格式。
获取通讯录列表
参数无,返回信息是JSON格式。
Bash
1 | termux-contact-list |
查看红外载波频率
Bash
1 | termux-infrared-frequencies |
获取无线电信息
无参数,返回格式是JSON格式
Bash
1 | termux-telephony-cellinfo |
查看手机运营商信息
无参数,返回格式是JSON格式
Bash
1 | termux-telephony-deviceinfo |
国光的实际测试返回值:
Json
1 | { |
获取 tts 语音引擎信息
Bash
1 | termux-tts-engines |
国光的实际演示:
Json
1 | [ |
获取 USB 设备信息
Bash
1 | termux-usb [-l | [-r] [-e 命令] 设备] |
选项细节
Properties
1 | 列出可用设备 |
Android Termux 下要读取 USB 内容或者 U盘的时候,还需要安装如下依赖包:
Bash
1 | pkg install termux-api libusb clang -y |
有些包我们上面已经安装过了。
下面国光来实际演示一下这个 API 的使用:
查看 次数 Android 的 USB 设备信息:
Bash
1 | $ termux-usb -l |
可以看到国光我这个 512GB 的 M.2 SSD 已经显示在列表中了 (装作不经意间说出来的样子,类似于朱一旦不经意间露出自己的劳力士一样 2333)
请求访问权限:
Bash
1 | termux-usb -r /dev/bus/usb/001/002 |
下面级可以尝试写代码去访问这个 USB 设备内容了:
usbtest.c
C
1 |
|
代码内容主要是 显示有关USB设备的一些基本信息,参数就是我们的设备信息。让我们编译一下:
Bash
1 | gcc usbtest.c -lusb-1.0 -o usbtest |
编译完成后会生成可执行的文件 usbtest
,接下来通过 这个 API 来执行这个文件:
Bash
1 | termux-usb -e ./usbtest /dev/bus/usb/001/002 |
糟糕 暴露了我的 512GB 的 SSD 居然是最廉价的 海康威视,溜了溜了 逃~
获取当前WiFi连接信息
Bash
1 | termux-wifi-connectioninfo |
获取 WiFi 扫描信息
国光在 Android 10 上没有成功执行过这个 API, 不过以前的一加5 是可以执行的下面的图 是以前的老图:
Bash
1 | termux-wifi-scaninfo |
调用设置设备相关
调整屏幕亮度
1 | termux-brightness [亮度] |
亮度的值在 0 ~ 255 之间,国光这里测试了 255 并达不到手机的最大亮度
拍摄照片
Bash
1 | termux-camera-photo [-c camera-id] output-file |
camera-id
: 相机的 id,默认是 0, 相机 id 可以通过隔壁的命令来获取
下面的命令表示 使用 相机id 为 0 即后置的相机来拍摄(id 1 为前置相机),保存的文件在当前路径下 名字叫 guoguang.jpg
Bash
1 | termux-camera-photo -c 0 guoguang.jpg |
国光看了下后置拍摄出来的照片,有点看不下去。前置相机效果还不错,可能是因为现在手机是多个摄像头的原因,Termux 的相机算法上面没有做到足够好的优化。
获取与设置剪贴板
查看当前剪贴板内容
Bash
1 | termux-clipboard-get |
设置新的剪贴板内容
Bash
1 | termux-clipboard-set PHP是世界上最好的语言 |
效果演示
调用系统下载器
直接调用系统下载器,不返回任何值。而且国光我现在还没有搞清楚下载的文件到哪里去了
Bash
1 | termux-download [-d 描述] [-t 标题] 下载的目标地址 |
国光的演示:
Bash
1 | termux-download -d 'Termux下载测试' -t 'QQ.apk' 'https://qd.myapp.com/myapp/qqteam/QQ_JS/qqlite_4.0.0.1025_537062065.apk' |
调用指纹传感器
该 API 仅适用于Android 6 及其以上版本,不接受任何参数,返回 JSON 格式。
Bash
1 | termux-fingerprint |
返回内容:
Json
1 | { |
调用红外发射
Bash
1 | termux-infrared-transmit -f 发射频率 |
频率以逗号分隔,例如 20,50,20,30
,仅传输短于2秒的码型。
调用手机定位
输出格式为JSON格式
Bash
1 | termux-location [-p 定位方式] [-r 定位请求] |
细节参数:
Bash
1 | -p provider [gps/network/passive] (默认: gps) |
实际演示:
Bash
1 | termux-location -p network |
返回内容(关键地方已经打马赛克处理了 防止网友顺着网线打过来):
Json
1 | { |
播放媒体文件
使用Media Player API播放指定的文件。
Bash
1 | termux-media-player [命令] [参数] |
详细参数:
Bash
1 | info ## 显示当前播放信息 |
国光的实际演示:
Bash
1 | ## 播放 hacker.mp4 视频 |
调用麦克风
1 | termux-microphone-record [参数] |
参数细节
Properties
1 | 使用默认设置录制 |
国光的实际演示:
Bash
1 | $ termux-microphone-record -d |
显示系统通知
显示系统通知,通知内容使用 -c
或者 --content
读取,或者从 stdin
读取
Bash
1 | termux-notification [选项] |
选项细节
Properties
1 | action 按下通知时要执行的动作 |
媒体通知参数
当你要使用 --type media
的时候详细参数:
Properties
1 | 在媒体 下一个按钮 上执行的操作 |
国光的演示:
Bash
1 | termux-notification -t '国光的Termu通知测试' -c 'Hello Termux' --type default |
拨打电话
Bash
1 | termux-telephony-call [号码] |
拨打电话给10001
中国电信,查看下话费有没有欠费~?
Bash
1 | termux-telephony-call 10001 |
临时窗口通知
Bash
1 | termux-toast [选项] [通知] |
选项参数
Properties
1 | 显示帮助信息 |
颜色可以是标准名称 比如说:red 也可以是十六进制值如#FF0000
,无效的颜色将恢复为默认值。
国光的实际演示:
Bash
1 | termux-toast -b white -c black Hello Termux |
开关闪光灯
Bash
1 | termux-torch [on | off] |
调用 tts 语音引擎
使用系统文本语音转换(TTS)引擎朗读文本。
Bsah
1 | termux-tts-speak [-e 引擎] [-l 语言] [-n 区域] [-v 变体] [-p 音调] [-r 速率] [-s ] [要说的话] |
选项细节
Bash
1 | -e engine ## 要使用的 tts 语音引擎 (详见 termux-tts-engines 这个命令) |
国光的实际测试:
Bash
1 | termux-tts-speak -e "com.xiaomi.mibrain.speech" '大家转载文章注意标明文章出处啊' |
哦豁,是不是被语音引擎的朗读吓一跳,这样可以就可以用 Termux 去调用小爱语音引擎来说一些骚话了。
震动手机
Bash
1 | termux-vibrate [选项] |
选项细节:
Bash
1 | -d duration ## 以毫秒为单位的振动持续时间(默认值:1000) |
更换手机壁纸
1 | termux-wallpaper [选项] |
选项细节:
Bash
1 | -f <file> ## 将 file 文件设为壁纸 |
国光的测试:
Bash
1 | termux-wallpaper -u 'https://cn.bing.com/th?id=OHR.BluebellWood_ZH-CN8128422960_1920x1080.jpg' |
哦豁,那样自动换壁纸的操作 岂不是就很简单了!这个国光下面单独开章节来讲解。
开启关闭 WiFi
Bash
1 | termux-wifi-enable [true | false] |
交互对话框部件
这个功能有点强大,可以与用户进行交互。输出格式是 JSON
Bash
1 | termux-dialog [选项] |
基本用法:
1 | -l, list 列出所有小部件及其选项 |
选项说明具体看下面国光的实际演示:
confirm
Properties
1 | confirm - 显示确认对话框 |
国光的演示:
Bash
1 | termux-dialog confirm -i 'Hello Termux' -t 'confirm测试' |
返回内容:
Json
1 | { |
checkbox
Properties
1 | checkbox - 使用复选框选择多个值 |
国光的演示:
Bash
1 | termux-dialog checkbox -v 'Overwatch,GTA5,LOL' -t '平时喜欢玩啥游戏' |
返回内容:
Json
1 | { |
counter
Properties
1 | counter - 选择指定范围内的数字 |
国光的演示:
哎呀 国光的身高暴露了
返回内容:
Json
1 | { |
date
Properties
1 | date - 选择一个日期e |
国光的演示:
Bash
1 | termux-dialog date -d 'yyyy-MM-dd' -t '你的出生日期是?' |
返回内容:
Json
1 | { |
radio
Properties
1 | radio - 从单选按钮中选择一个值 |
国光的演示:
Bash
1 | termux-dialog radio -v '小哥哥,小姐姐' -t '你的性别是?' |
返回内容:
Json
1 | { |
sheet
Properties
1 | sheet - 从底部工作表中选择一个值 |
国光的演示:
Bash
1 | termux-dialog sheet -v '菜鸡,国光' |
返回内容:
Json
1 | { |
spinner
Properties
1 | spinner - 从下拉微调器中选择一个值 |
国光的演示:
Bash
1 | termux-dialog spinner -v '国光,光光' -t '你最喜欢的博主是?' |
返回内容:
Json
1 | { |
text
Properties
1 | text - 输入文本(如果未指定小部件,则为默认值) |
国光的演示:
Bash
1 | termux-dialog text -i '密码:' -t '请输入核弹爆炸密码' |
返回内容:
Json
1 | { |
time
Properties
1 | time - 选择一个时间值 |
国光的演示:
Bash
1 | termux-dialog time -t '你每天多少点睡觉?' |
返回内容:
Json
1 | { |
Termux:Boot
用于将自定义命令开机自启使用,不要每次重启完重复敲命令了。(当然你的手机性能很强,从来需要重启)
安装 Termux:Boot
请勿在Google Play 和 F-Droid 之间混合安装Termux 和 插件。
这是一个收费的应用,一贫如洗的国光是买不起的,但是还得写一下这个,万一真的有壕买了这个APP呢
使用方法
安装完成启动这个应用程序后,创建~/.termux/boot/
目录,将需要开机自启的脚本放在这个目录下面,如果有多个文件的话,将他们按照排序顺序执行,如果要确保设备进入睡眠状态,建议脚本前面先运行termux-wake-lock
命令。
下面是一个开机自启 sshd
服务的的脚本,文件的完整路径为: ~/.termux/boot/start-sshd
内容如下:
Bash
1 |
|
Termux:Float
可以将 Termux 悬浮窗形式显示,看上去比较酷炫。
请勿在Google Play 和 F-Droid 之间混合安装Termux 和 插件。
这是依然是一个收费的应用,尽管它看上去很酷炫,但是家境贫寒的国光还是买不起,下面就晒一个效果图吧:
边学习 边操作练习
Termux:Styling
Termux 官方提供了终端的一些美化方案
可以将 Termux 悬浮窗形式显示,看上去比较酷炫。
请勿在Google Play 和 F-Droid 之间混合安装Termux 和 插件。
这是还是一个收费的应用,虽然我们前面的一键安装脚本已经可以达到这个美化效果了,但是如果你想尝试一下官方的可以试试看。
Termux:Widget
提供了 Andorid 的 Termux 小部件。
请勿在Google Play 和 F-Droid 之间混合安装Termux 和 插件。
依然是收费插件,比较冷门,使用场景很少,不推荐大家入手这个,所以用法这里国光就不列出了。(这个偷懒的理由很好 2333)
无聊专区
一些无聊有趣的知识,如果你是一个正经讲究人,可以跳过这个版块以节约你的阅读时间。
cmatrix
《黑客帝国》的代码雨视觉特效。
Bash
1 | pkg install cmatrix |
cowsay
cowsay 命令是一个有趣的命令,它会用 ASCII 字符描绘牛,羊和许多其他动物,还可以附带上个自定义文本,很巧的是 Termux 也封装了这个工具。
Bash
1 | pkg intall cowsay |
内置如下动物:
Bash
1 | $ cowsay -l list |
国光的简单示例:
Bash
1 | cowsay -f eyes '法外狂徒张三' |
figlet
FIGlet 是创建一个简单的命令行实用程序,用于创建 ASCII logo。
Bash
1 | pkg install figlet |
内置如下样式:
Bash
1 | ls $PREFIX/share/figlet |
国光的演示:
Bash
1 | figlet -f future 'www.sqlsec.com' |
hollywood
在 Linux 终端中伪造好莱坞黑客屏幕,假装自己是一名黑客。
Bash
1 | pkg install hollywood |
国光差点就信了
neofetch
Neofetch 是一个简单但有用的命令行系统信息工具。它会收集有关系统软硬件的信息,并在终端中显示结果。
Bash
1 | pkg install neofetch |
nyancat
彩虹貓(英语:Nyan Cat)是在2011年4月上传在Youtube 的视频,并且迅速爆红于网络,並在2011年YouTube浏览量最高的视频中排名第五,B站这个小猫也很多,主要是BGM比较魔性,感兴趣的朋友可以自己去搜索看看。
Bash
1 | pkg install nyancat |
喵喵喵喵
使用 Ctrl + C
快捷键退出魔性循环
screenfetch
Screenfetch 是一个适用于 Linux 的小工具,用于显示系统信息及ASCII化的Linux发行版图标。
1 | pkg install screenfetch |
显示其他 Linux 发行版的 logo:
Bash
1 | screenfetch -A 发行版 |
现在内置的发行版 logo 有:
Properties
1 | Alpine Linux, Amazon Linux, Antergos, Arch Linux (Old and Current |
内置的操作系统 logo 有:
Bash
1 | Dragonfly/Free/Open/Net BSD, Haiku, Mac OS X, Windows |
sl
某编程牛人也经常犯把 ls 敲成 sl 的错误,所以他自己编了一个程序娱乐一下,这个程序的作用很简单,就是当你输入 sl 的时候终端会出现一个火车呼啸而过~~
Bash
1 | pkg install sl |
toilet
toilet 能用字母拼写出更大字母的工具,具体拼出什么字由命令后面的参数决定,不仅如此,它还能打印出各种风格的效果,比如彩色,金属光泽等。
Bash
1 | pkg install toilet |
内置如下字体:
Bash
1 | $ ls $PREFIX/share/figlet |
内置如下颜色效果:
Bash
1 | $ toilet --filter list |
国光的简单演示:
Bash
1 | toilet -f mono12 -F gay 'Bilibili' |
搭建 mc 基岩服务器
本版块由初学生 KeySummer 提供,QQ 为:1505708353 有这方面问题可以找他交流哦。
搭建 mc 基岩服务器首先得了解跨 CPU 技术,具体安装方法可以参考 Gitee -Moe/Tmoe-linux ,在安装过程中请安装ubuntu,以便与直接开服。然后输入debian就可以进入我的跨cpu的容器里了,然后大家可以去:https://www.minecraft.net/zh-hans/download/server/bedrock 网址内找到 Ubuntu 版的下载按钮,然后复制连接回到 Termux 内的 Ubuntu 后输入
Bash
1 | mkdir mc |
然后输入 LD_LIBRARY_PATH=. ./bedrock_server
即可(树莓派和此办法一样,Ubuntu 则不需要前面的跨 CPU 步骤,直接进行最后的2,3两步即可),祝你们好运
终端二维码
Linux 命令行下的二维码,主要核心是这个网址:http://qrenco.de/
Bash
1 | echo "https://www.sqlsec.com" |curl -F-=\<- qrenco.de |
如果你不嫌无聊的话还可以扫描这个二维码,然后就又打开我的这篇文章了。
文章总结
相对来说 国外的 Termux DIY 的氛围比国内好很多,Youtube 上的视频都有很高的播放量。当然国内也有这么一批执着于 Termux
的玩家,当初写完这篇文章的时候,相对来说还比较小众的,写这篇文章只想让更多的人认识到 Termux
的生产力,使用 Termux
来做一些很 cool 的事情。 期待有更多 Termux
的优秀文章出现~
另外如果你喜欢这篇文章的话 不防点一下网站最下方不起眼的广告表示支持!Thanks♪(・ω・)ノ
本文可能实际上也没有啥技术含量,但是写起来还是比较浪费时间的,在这个喧嚣浮躁的时代,个人博客越来越没有人看了,写博客感觉一直是用爱发电的状态。如果你恰巧财力雄厚,感觉本文对你有所帮助的话,可以考虑打赏一下本文,用以维持高昂的服务器运营费用(域名费用、服务器费用、CDN费用等)