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]

tags: password, simple

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]

tags: bandwidth, speed, throughput, benchmarking, performance

Extract a tar.gz file

tar -xzvf [filename]

tags: extract, archive

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]

tags: ssh, secure, tunnel, proxy

Make a big file quickly on Linux

Create a huge fake file using Linux command line. truncate -s 1000MB [filename]

tags: file, big, huge, fake

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;

tags: database, sql

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

tags: harddisk, space, large, find