If your computer has a dedicated audio input port, you can connect your guitar directly to it using a 1/4 inch to 1/8 inch adapter cable. However, this may result in lower sound quality and less control over your recordings. Using an audio interface is generally recommended for better results.