Set a simple Linux user password
Sometimes Linux does not allow you to set a short and simple password, so if you get a password too simple error, just use:
sudo passwd [username]
Measure network speed between two computers
Run the server on one end using
iperf -s
On the other end use the client to connect to the server
iperf -c [hostname]
Tunnel through ssh
This command will create a socks proxy at port number on hostname so that you can tunnel your internet traffic through it.
ssh -D [portnumber] [username]@[hostname]
Make a big file quickly on Linux
Create a huge fake file using Linux command line.
truncate -s 1000MB [filename]
Create a new MySQL database using command line
Create a new database with a database user
mysql -u root
CREATE DATABASE [database_name];
GRANT ALL PRIVILEGES ON [database_name].*
TO 'username'@'localhost' IDENTIFIED BY 'password';
EXIT;
Find the largest 10 files or directories
Find out what is taking all the hard disk space
du -a /var | sort -n -r | head -n 10
Click here to suggest a command that would be helpful for others
This website is made to serve as a database
of useful linux commands and command line tools. It is also intended to
serve as a reference in case one of these commands is forgotten.
Although this site looks quite simple, it is
made using Ruby on Rails. More features are planned for future.
The