Top 10 command lines of Linux
1. sudo !!
execute the previous command as root user
2. python -m SimpleHTTPServer
set up the simplest Web server using Python, and you can visit it through http://localhost:8000, or change localhost to the ip or domain name of the machine.
3. :w !sudo tee %
When you open a file without the writing privilege or not as the root user, you can use this one to save the change you have made.
4. cd -
change the directory to the one last visited.
5. ^foo^bar
change foo in the previous command to bar, and then execute this command.
6. cp filename{,.bak}
fast bakup or copy files.
7. mtr google.com
traceroute + ping.
8. !whatever:p
search the commands history, but not execute any.
9. ssh-copy-id user@host
copy ssh keys to user@host such that you can ssh login the host without inputting the password.
10. ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq /tmp/out.mpg
video the Linux desktop activity and save to /tmp/out.mpg
Post a Comment